Andy
Andy

Reputation: 3522

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?

Upvotes: 5

Views: 2575

Answers (1)

Ewout Kramer
Ewout Kramer

Reputation: 1004

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>

Upvotes: 3

Related Questions