amida-tech / cda-fhir

CDA to FHIR converter
Apache License 2.0
12 stars 5 forks source link

patient identifiers don't go through makeCode translation #27

Open talvola opened 8 years ago

talvola commented 8 years ago

A patient with an SSN in a C-CDA ends up looking like this:

      {
        "system": "urn:oid:2.16.840.1.113883.4.1",
        "value": "111-00-1234"
      }

when it probably could look like this (as in the sample HL7 JSON at https://www.hl7.org/fhir/patient-examples-general.json.html):

      {
        "system": "http://hl7.org/fhir/sid/us-ssn",
        "value": "111-00-1234"
      }

now - that translation isn't in makeCode currently, but even if you add it - the code that creates the identifier is:

        _patient.identifier.push({
            'system': 'urn:oid:' + node.attributes.root,
            'value': node.attributes.extension
        });

so the root is just passed through. There is a comment in makeCode that says 'TODO - complete recoding' - so not sure if this is already in the plans or not to generalize a little.