Let's get started with the mylookup
routine now. This routine will eventually allow lookups by name, phone, or date of birth. The instructions below contain suggested names and functionality for the procedures you need to write.
Create a brand new routine. Similar to the data entry routine, it will have a main
section at the beginning (not a procedure). The rest of the code is in four procedures: getsubmit
, and display
section will have a loop that calls getsubmit
, which prompts the user for a string. For this version, the user may enter ?
to get help, a date of birth, or press Enter to quit. Use $$validDOB^mydatent()
to verify the date of birth. If the user enters ?
, the help
procedure lists the lookup alternatives (only date of birth so far).
If the user enters a valid date of birth, the dob
procedure checks to see if the internal form of the date of birth is in ^PersonI
, and then loops through the index to find all IDs of the people with that date of birth. Each person is displayed using the display
procedure, which should accept the ID as a parameter, and print all the data for the person.
For instructions, click below.
© 1997-2019 InterSystems Corporation, Cambridge, MA