Mandatory input files to upload LOINC 2.65 to HAPI FHIR 3.6.0

625 views
Skip to first unread message

ricar...@gmail.com

unread,
Jan 23, 2019, 2:35:46 PM1/23/19
to HAPI FHIR
Hi everyone,

I managed to import SNOMED CT (2018-07 release) on HAPI FHIR 3.6.0 using the hapi-fhir-cli tool but I'm having some trouble with LOINC (2.65 release). I'm running:

hapi-fhir-cli upload-terminology -d /usr/local/fhir/Loinc_2.65_LoincTableCore.zip -d /usr/local/fhir/Loinc_2.65_MultiAxialHierarchy_2.65.zip -v dstu3 -t http://192.168.61.118:8081/fhir/baseDstu3 -u http://loinc.org

According to the docs (http://hapifhir.io/doc_cli.html#_toc_upload_terminology), it should work, but I get:

Failure during REST processing: ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException: Could not find the following mandatory files in input: [Loinc.csv, loincupload.properties, AnswerList.csv, LoincAnswerListLink.csv, Part.csv, LoincPartLink.csv, PartRelatedCodeMapping.csv, DocumentOntology.csv, LoincRsnaRadiologyPlaybook.csv, Top2000CommonLabResultsUs.csv, Top2000CommonLabResultsSi.csv, LoincUniversalLabOrdersValueSet.csv, LoincIeeeMedicalDeviceCodeMappingTable.csv, ImagingDocumentCodes.csv]

I also checked the Smile CDR docs (https://smilecdr.com/docs/current/fhir_repository/terminology.html) and only two files are listed as mandatory, but I checked the source history on Git (https://github.com/jamesagnew/hapi-fhir/blob/master/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TerminologyLoaderSvcImpl.java) and all the files have been asserted to be present for a while. I can't seem to find some of the files required (e.g LOINC Imaging Document Codes). Am I missing something?

Thank you very much.

James Agnew

unread,
Jan 23, 2019, 4:32:20 PM1/23/19
to ricar...@gmail.com, HAPI FHIR
The Loinc 2.65 release uses a slightly different release format from previous releases.

At present you need to use HAPI FHIR 3.7.0-SNAPSHOT in order to upload it.

Note that you don't necessarily need to use the 3.7.0 CLI tool for the actual upload, but the server needs to be be build with that version in order to understand the new format.

Cheers,
James

--
You received this message because you are subscribed to the Google Groups "HAPI FHIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hapi-fhir+...@googlegroups.com.
To post to this group, send email to hapi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hapi-fhir/925a517c-902c-4edf-82fd-c66de92867bb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Fredrik Duprez

unread,
Mar 12, 2019, 2:02:11 AM3/12/19
to HAPI FHIR
I tried this with HAPI FHIR version 3.7.0 and r4 as the fhir version and I get the same error message:


hapi-fhir-cli upload-terminology -d ~/Downloads/Loinc_2.65_LoincTableCore.zip -d ~/Downloads/Loinc_2.65_MultiAxialHierarchy_2.65.zip -d ~/Downloads/Loinc_2.65_Text_2.65.zip -v r4 -t http://localhost:8080/hapi-fhir-jpaserver/fhir -u http://loinc.org

Error:

ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException: HTTP 422 Unprocessable Entity: Could not find the following mandatory files in input: [LoincTable/Loinc.csv, loincupload.properties, AnswerList.csv, LoincAnswerListLink.csv, Part.csv, LoincPartLink.csv, PartRelatedCodeMapping.csv, DocumentOntology.csv, LoincRsnaRadiologyPlaybook.csv, Top2000CommonLabResultsUs.csv, Top2000CommonLabResultsSi.csv, LoincUniversalLabOrdersValueSet.csv, LoincIeeeMedicalDeviceCodeMappingTable.csv, ImagingDocumentCodes.csv]

James Agnew

unread,
Mar 12, 2019, 5:54:16 AM3/12/19
to Fredrik Duprez, HAPI FHIR
Hi Fredrik,

You need to use the "LOINC Complete Download File" available here: https://loinc.org/downloads/

Cheers,
James

Fredrik Duprez

unread,
Mar 12, 2019, 6:59:34 AM3/12/19
to HAPI FHIR
Thank you,

now I just get one missing file, loincupload.propertes:

hapi-fhir-cli upload-terminology  -d ~/Downloads/Loinc_2.65.zip -v r4 -t http://localhost:8080/hapi-fhir-jpaserver/fhir -u http://loinc.org

ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException: HTTP 422 Unprocessable Entity: Could not find the following mandatory files in input: [loincupload.properties]

Where do I find that one?

Fredrik Duprez

unread,
Mar 12, 2019, 8:52:48 AM3/12/19
to HAPI FHIR
To answer my own question I found this piece of documentation:


In short you need to provide the file yourself, so I tried this:

# This is the version identifier for the AnswerList file
answerlist.version=2.65
# This is the version identifier for uploaded ConceptMap resources
conceptmap.version=2.65

And thus my cli command was:

hapi-fhir-cli upload-terminology  -d ~/Downloads/Loinc_2.65.zip -d ~/Downloads/loincupload.properties -v r4 -t http://localhost:8080/hapi-fhir-jpaserver/fhir -u http://loinc.org


Now it seems to import OK:

2019-03-12 13:47:20 [main] INFO  c.u.f.c.UploadTerminologyCommand Beginning upload - This may take a while...
2019-03-12 13:48:45 [main] INFO  c.u.f.c.UploadTerminologyCommand Upload complete!
2019-03-12 13:48:45 [main] INFO  c.u.f.c.UploadTerminologyCommand Response:
<Parameters xmlns="http://hl7.org/fhir">
   <parameter>
      <name value="conceptCount"/>
      <valueInteger value="183052"/>
   </parameter>
   <parameter>
      <name value="target"/>
      <valueReference>
         <reference value="CodeSystem/loinc"/>
      </valueReference>
   </parameter>
</Parameters>
2019-03-12 13:48:45 [main] INFO  ca.uhn.fhir.cli.App HAPI FHIR is shutting down...
Reply all
Reply to author
Forward
Message has been deleted
0 new messages