Mapping: Next Of Kin
MapNextOfKin() function uses the techniques that you have seen used in
MapPatient() to map next of kin data from an NK1 segment to a next-of-kin row in the database table.
It looks like this:
And if you know your sample values, don’t forget to use the magically quick deep auto-completion (see bottom of page) feature.
Simply typing “.g” for Garland brings up a list where you can choose the correct field with one click.
MapNextOfKin() is called more than once in this script, the annotation to the right of the code for this function enables you to select which of the next of kin to display. To select a next of kin, position your cursor at the top left of the annotation, and use the arrow buttons to move through the list of next of kin.
Note: These arrow buttons are provided in an annotation whenever the adjacent script code is used to process repeating fields, groups of fields, database result rows, or any set of multiple items.
For example, the function
ObxWeightFilter() is called once for each segment in the message. You can use the Arrow buttons to navigate through these calls.
ObxWeightFilter() is covered on the next page.
For a detailed explanation of what annotations are and how they work, see Working With Annotations.
Now you understand how
MapNextOfKin() works its mapping magic. Next we will look at how
MapWeight() is used to map weight information.