A cancellation can be devastating for a locum GP, particularly if it's last-minute. You may have put off other work in order to undertake the planned work, and of course may have dependents, a mortgage, loans. Same applies to anyone, which is why you have legal rights in this situation.
Firstly, refer to the terms and conditions that you agreed to - if you used the NASGP's model T&Cs, you will have a cancellation clause that means the practice must pay you a certain figure if cancelled within the agreed time limit.
If there is no agreement in place and the practice does not pay appropriate compensation the locum may be able to pursue a claim for breach of contract in a small claims court - have a word with your BMA or MPU Industrial Relations Officer or, if you get no joy, your local Citizens Advice Bureau should help you out.