Error in FHIR Patient resource?

Situation
Using the FHIR API to retrieve patient records. When inspecting the response the patient.identifier array seems off.

“identifier”: [
{
“use”: “official”,
“type”: {
“coding”: [
{
“system”: “http://terminology.hl7.org/CodeSystem/v2-0203”,
“code”: “PT”
}
]
},
“system”: “http://terminology.hl7.org/CodeSystem/v2-0203”,
“value”: “1”
}
],

I believe that “system”: “http://terminology.hl7.org/CodeSystem/v2-0203” should reference the “assigning authority” (or patient identifier domain) that issues this patient identifier. Since it is coded as “PT” (external patient identifier) it should state systems such as as the “S.S.” identifier (which has system = http://hl7.org/fhir/sid/us-ssn)

Possible solution would be to use the OID linked to the facility that created this patient record.

OpenEMR Version
7.0.1-dev

Browser:
I’m using: none (using Postman)

Operating System
I’m using: Mac Os Ventura

Search
Yes

Logs
No

If there is a SSN populated it shows up in the response. @see here:

The response you are seeing is where someone specifies a value for the pubpid which people usually use as the MRN of the local practice.

The latter is what I thought as well. So if the pubpid = the local MRN I would expect the FHIR response to be something like:

“identifier”: [
{
“use”: “official”,
“type”: {
“coding”: [
{
“system”: “http://terminology.hl7.org/CodeSystem/v2-0203”,
“code”: “SS”
}
]
},
“system”: “http://hl7.org/fhir/sid/us-ssn”,
“value”: “12345”
},
{
“use”: “official”,
“type”: {
“coding”: [
{
“system”: “http://terminology.hl7.org/CodeSystem/v2-0203”,
“code”: “PT”
}
]
},
“system”: “urn:oid:1.20.300.4000.500.60.7”,
“value”: “192”
}
],

In the above snippet the ssn|12345 is the identifier I entered in the S.S. field in the patient demographics window. 192 is the number I entered for External ID. The urn:oid value I entered in the configuration under Admin | Clinic |Facilities | → OID field.

I furthermore would expect that the patient’s License/ID number is also added to the patient.identifier array (if know). I assume this is the patient’s driver license id. As the issue state doesn’t seem to be captured the following identifier seem reasonable.

{
“use”: “official”,
“type”: {
“coding”: [
{
“system”: “http://terminology.hl7.org/CodeSystem/v2-0203”,
“code”: “DL”
}
]
},
“system”: “urn:oid:2.16.840.1.113883.4.3”,
“value”: “123456789”
}

Obviously when SSN and Driver License are not filled in they are not included in the identifier array.

Since patients can attend multiple facilities in the same EMR installation, I’m guessing you’d want to use the primary business facility’s oid. As I mentioned in another post, feel free to open a feature request issue to request this change in the FHIR api.