Proper way to code concepts - gender example

Hi All,

Problem: I have patient data that I want to put in my FHIR server, and I want to know the proper way to convert codes from source to fhir (target).

For example, for patient gender, the source uses codes: 1 = male, 2 = female, and provides a data dictionary. What is the proper way to store this in my fhir server, or said another way, what should an instance of patient look like? Ideally i would have both the number and string value saved.

One solution is to do some conversion from “1” to “male” prior to post-ing it to the server in Patient.gender but than I lose the source code “1”.

Is there a way to do something like this for each patient instance:

{
“resourceType” : “Patient”,

“gender” : {
“coding”: [ {
“system”: “source url”,
“code”: 1
},
{“system”: “http://hl7.org/fhir/ValueSet/administrative-gender”,
“code”: “male”
}
]
}

}

The problem I see with this is that patient.gender is supposed to be a code (string) not a coding.

Or, do I have to create my own concept list or concept map? if so could you provide a quick example?

The only way to capture gender codes other than the ones defined by FHIR is to use an extension. FHIR uses the ‘code’ data type, not CodeableConcept, so there’s no ability to send multiple codes and translations. The expectation is that most systems will just map to the FHIR values and send only those. If you want to send yours too, you’ll need to use an extension.

I think this might be cleaner and easier to interoperate with other systems. You would create a ‘mapping service’ that handles inbound and outbound messages and does the conversion from 1 => ‘male’ or ‘male’ => 1 depending on whether the message is going out or coming in from your FHIR server. That way you don’t ‘lose’ your gender codes

1 Like