Monday, March 23, 2015

HL7 FHIR Identifiers

Before moving on with this spike, I wanted to better understand how HL7 FHIR deals with identifiers since this is fundamental to actually finding my reports given what we have in a DICOM Study.  The DiagnosticReport resource has a property named identifier which is of type identifier. The documentation states that the identifier is:

"
The local ID assigned to the report by the order filler, usually by the Information System of the diagnostic service provider.
"

When it comes to radiology reports, the order filler number is supposed to match what is in the accession number field in the DICOM study so this is what we need to use to actually find the DiagnosticReport for a given DICOM Study.  Lets take a look at the identifier we sent when we created the diagnosticReport in the prior blog post:

  "identifier": {
    "use" : "official",
    "system" : "?",
    "value" : "1000"
  }

But we know that an accession number is not globally unique so we need additional matching criteria.  The patient identifier (or MRN) is a good secondary key so lets look at that.  The Patient resource has a property named identifier that has zero to many of type identifier.  Here is its documentation:

"
An identifier that applies to this person as a patient.
"

And here is the identifier we used for the Patient resource:

  "identifier": [{
    "use" : "usual",
    "label" : "MRN",
    "system" : "urn:oid:0.1.2.3.4.5.6.7",
    "value" : "654321"
  }],

In both cases the "value" is the actual identifier - but are the "use", "label" and "system" properties for?  Looking at the documentation for the identifier type we learn the following:

Here is the documentation on the use property:

usualthe identifier recommended for display and use in real-world interactions.
officialthe identifier considered to be most trusted for the identification of this item.
tempA temporary identifier.
secondaryAn identifier that was assigned in secondary use - it serves to identify the object in a relative context, but cannot be consistently assigned to the same object again in a different context.
In the above examples we used "usual" and "official" but it isn't clear when (or if) I should use one over the other.  I do a quick google search on the terms "HL7 FHIR identifier use usual official" but none of the results on the first two pages are helpful.  My search terms are very specific so I am thinking this may be an area of HL7 FHIR that is not well documented yet.  Lets analyze the identifiers from the sample DiagnosticReport resources on the spark server and see if there is any consistency.  I use the Advanced REST Client to make an open ended query for DiagnosticReports:

http://spark.furore.com/fhir/DiagnosticReport?_format=application%2fjson%2bfhir


I find two kinds:

identifier: {
  use: "official"
  system: "http://acme.com/lab/reports"
  value: "12Z986912-16258694"
}
identifier: {
  use: "official"
  system: "http://www.bmc.nl/zorgportal/identifiers/reports"
  value: "nr1239044"
}

Since both kinds used the code "official" for "use", I am lead to believe that I should do the same with one reservation - none of these DiagnosticReport examples are radiology reports.  All of the examples with identifiers on the spark server appear to be for lab results of some type.  I don't know much about lab results so it is possible that how they are identified and referenced is different than how radiology reports are.  It is interesting that the system is a url to some other system.  Presumably this other system generated the actual identifier, but given that I am building a radiology report repository from HL7 ORU messages, the originating RIS may not have a URL like this to refer to.  The spark server does not appear to validate the system at all (you will notice I used the system "?" for the diagnostic report I created) so for this spike, it probably doesn't matter what I put in there. 

Looking at the schema for the identifier, I noticed that none of the properties are required!  For this spike, I may be able to simply omit the use and system.  I try creating another DiagnosticReport with this change and the spark server accepts the HTTP POST and creates the resource!

So now I have a bit better understanding of HL7 FHIR identifiers, but still not full understanding.  I have some emails out to people that I am hoping can help provide more information.  For now I am going to leave this and move on with the spike.




No comments:

Post a Comment