Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add profiles via the FHIR REST api (HAPI)

I've looked at the documentation for creating profiles for FHIR, and I've used Forge to create some xml that I believe is valid to describe a profile. I can't find in the documentation where it actually states what request I need to make to the RESTful api to actually add a new profile.

Any ideas?

like image 647
Andy Avatar asked Oct 19 '22 00:10

Andy


1 Answers

You can of course just "store" your profiles on a FHIR server by POSTing them to a FHIR endpoint, but you probably mean: can I actively let instances be validated against the StructureDefinition?

There are two ways, both of which require a bit of experimentation to see which public servers support them:

  • Any FHIR instance may declare it adheres to a StructureDefinition, by adding the canononical url (StructureDefinition.url) to the instances meta.profile as shown below. Servers may pick this up on a POST and validate the instance against the stated profile:
  <Patient>
    <id value="44Q3"/>
    <meta>
      <profile value="http://example.org/StructureDefinition/PatientNL"/>
    </meta>
  </Patient>
  • Actively ask a server to validate your instance using the $validate FHIR operation (see http://hl7.org/fhir/resource-operations.html#validate)
like image 146
Ewout Kramer Avatar answered Jan 03 '23 21:01

Ewout Kramer