Prepare state

Note

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

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:
  format: "0.2.0"

  openEHR:
    templateId: "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"

  fhir:
    resourceType: "Bundle"

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: