Your Cart
Loading

Code Clinic - HL7 Lab - Book 8: Dictionaries: Labels for Data

On Sale
$10.00
$10.00
Added to cart

Stop remembering that the surname lives at position five. A dictionary stores each value under a name, so you ask for the first name by asking for 'first', and code that used to depend on counting becomes code anyone can read. This book builds the dictionary from nothing: how to write one, how to look a value up by its key, and how to add a new pair or change an existing one as you learn more about a patient. Then it handles the failure that catches everyone, asking for a key that is not there, and gives you two answers. The .get() method returns a default instead of raising an error, and in lets you check whether a key exists before you act on it, which is what you want when a field is optional and half the messages leave it out. The final chapter puts it together and does the thing this track has been aiming at: take the list that split() gave you and turn it into a labelled patient record, where the identifier, the name and the date of birth each answer to their own name.


Eighteen A4 pages, in full color. Written in short sentences and plain English, for readers whose first language is not English and clearer for everyone else because of it.


Every code example in this book was run before the page was printed, so the output you read is the output you get. Instant PDF download. By M.R. Sterling.

You will get a PDF (818KB) file