Stream: hapi
Topic: Including codesystems from FHIR
Nils Strelow (Feb 15 2021 at 11:47):
Hello I'm a FHIR newbie and still struggling with some concepts.
How can I use CodeableConcepts or Codesystems in HAPI, especially those defined in FHIR as Extensible or Preferred?
Do I have to define them myself by creating a new CodeSystem instance? Or fetch them from an API?
Example: https://build.fhir.org/researchstudy.html has status
which has a type in HAPI: ResearchStudy.ResearchStudyStatus.INREVIEW
But primaryPurposeType
is a CodeableConcept and does not have a ready made type in HAPI.
How can I integrate its definition (http://hl7.org/fhir/R4/codesystem-research-study-prim-purp-type.html) without typing everything in code like this:
val code = Coding()
.setSystem("http://terminology.hl7.org/CodeSystem/research-study-prim-purp-type")
.setVersion("4.5.0")
.setCode("supportive-care")
.setDisplay("Supportive Care")
Thanks a lot in advance and hopefully have a good Monday :D
Joel Schneider (Feb 15 2021 at 18:42):
The command line tool for HAPI FHIR includes an upload-definitions
command that might meet your needs.
https://hapifhir.io/hapi-fhir/docs/tools/hapi_fhir_cli.html
Nils Strelow (Feb 16 2021 at 11:43):
@Joel Schneider Thanks so much. So this just uploads every official FHIR definition? What are the best practices for using such definitions? Always upload them to my own FHIR server? Or fetch them from the canonical URL?
Grahame Grieve (Feb 17 2021 at 21:11):
you still need to type them in as in your code fragment above
Last updated: Apr 12 2022 at 19:14 UTC