pophealth/popHealth — Issue #11: CCR import: Retrieving Patient ID
Author: kclaes
Created: 2012-03-05 15:41:27+00:00
State: open

Currently, the patient ID is retrieved as the ActorId.
This leads to problems when importing CCR's of different patients but with identical Actor ID's (which are merely references within the CCR).

Proposal to retrieve the ID from the IDs section as such:
```patient['medical_record_number'] = patientActor.at_xpath('./ccr:IDs/ccr:ID[../ccr:Type/ccr:Text=""]').content```

Where is a configurable identifier from pophealth.yml
When no is defined, the first ID could be used:
```patient['medical_record_number'] = patientActor.at_xpath('./ccr:IDs/ccr:ID').content```