You're reading the documentation for a development version. For the latest released version, please have a look at 1.1.1.

Prepare state

Note

A whole tutorial referenced here is available in the following Postman collection: https://documenter.getpostman.com/view/1515623/2sAYdimoej

Note

If running against a public sandbox.open-fhir.com, don’t forget to include Authorization header of type Basic.

First order of business is to prepare a state of the engine. See more about what State of the Engine is at: State configuration.

Persist operational template

POST http://localhost:8080/opt
POST http://localhost:8080/opt HTTP/1.1
Content-Type: application/xml
Body:

growth_chart_template.opt

Create context mapper

POST http://localhost:8080/fc/context
POST http://localhost:8080/fc/context HTTP/1.1
Content-Type: plain/text
Body:
  grammar: FHIRConnect/v0.0.1
  type: context
  metadata:
    name: "Growth chart"
    version: 1.0.0
  spec:
    system: FHIR
    version: R4

  context:
    profile:
        url: "Observation"
    template:
        id: "Growth chart"
    archetypes:
      - "openEHR-EHR-OBSERVATION.body_weight.v2"
      - "openEHR-EHR-OBSERVATION.height.v2"
      - "openEHR-EHR-OBSERVATION.body_mass_index.v2"
      - "openEHR-EHR-OBSERVATION.head_circumference.v1"
    start: "openEHR-EHR-OBSERVATION.body_weight.v2"

Create model mappers

POST http://localhost:8080/fc/model
POST http://localhost:8080/fc/model HTTP/1.1
Content-Type: plain/text
Body: <see below>

Repeat this call for all of the following model mappers. Each of these you add in a body of the request above: