iNTERFACEWARE Products Manual > Learning Center > Tutorials and Sample Scenarios > Working With a Database > HL7 to Database > Step 6 - One to Many Relationships > Using Python to Copy the Patient ID |
|
Looking for Iguana v.5 or v.6? Learn More or see the Help Center.
As you saw in the previous section, the PID field of the PatientObservation table is not mapped to a field in the OBR segment. This is because this field will contain the patient ID specified in the PID segment. Because this patient ID is also specified in the Patient table, your database will be able to use the patient ID as the key that associates the PatientObservation entries with the Patient to which they belong. To assign the patient ID to the PID field, you need to create the following Python scripts:
To create the Segment Inbound script:
Next, create the Table Inbound script:
This assigns the Patient ID to the PID field in the PatientObservation table. |