Question about CodableConcept
# support
m
From what I see, when a CodeableConcept is included in another data structure (e.g. a Patient), all of the elements of the CodeableConcept are directly copied. It is not included in the data structure as a foreign key. How is is supposed to be guaranteed that the data in the CodeableConcept is valid? Presumably the values in the Coding section have to match in some way with the ones stored in the standard somewhere (but where is that?). But I am not clear if the CodeableConcept stored in the Patient have to match/include all the codes in the standard. Specifically, does the text field in the CodeableConcept have to match? Do the display fields of the Codes have to match? I don't see this stuff explained in the Medplum docs or in the FHIR standard itself (though I could easily have missed that). Along these lines, I note that the MaritialStatus field of the Patients created in the sample data (who are married) have the display field in the Code and the text field in the CodeableConcept set to "M" rather than "Married". It says "Married" in the standard on the FHIR site. However, when I go into the Patient editor and select the Married value for the patient, the display field on the Code is changed to "Married" and the text field in the CodeableConcept is completely removed. Is there somewhere I can look to understand how this works? Does FHIR dictate that the CodeableConcept work in this non-foreign key way? I don't understand how data quality can be maintained.
r
So FHIR (and Medplum) has Profile support - which is the mechanism to make sure that the resources are valid and that specific codesystems are used. https://www.medplum.com/docs/fhir-datastore/profiles For those in the US, USCDI is the recommended profile set to use https://www.medplum.com/docs/fhir-datastore/understanding-uscdi-dataclasses External systems will have all manner of data, so it may be important to support both those with profiles applied and those without. There is a validate function as well that is profile aware https://www.medplum.com/docs/api/fhir/operations/validate-a-resource
179 Views