CH:ELM Fhir Simulator

This is a simulator for the CH:ELM profile: https://fhir.ch/ig/ch-elm/api.html
Link to the project: https://gitlab.inria.fr/gazelle/public/simulation/elm-fhir-simulator

Overview

Here is a quick overview of the available functionality from CH:ELM Simulator

Operation HTTP Methods URL to call Entry parameter Returned value Remarks
Publish A DocumentReference POST https://example.com/elm-simulator/fhir/ch/DocumentReference X - If validation passed: The given DocumentReference with a 201 Created HTTP Code and elm-status=in-progress
- If validation failed : a link to the validation report with an failed status
X
Get DocumentReference GET https://example.com/elm-simulator/fhir/ch/DocumentReference/{id} id = id of the resource The queried resource X
Search DocumentReference GET https://example.com/elm-simulator/fhir/ch/DocumentReference?param1=value1[&paramN=valueN..] elm-status = {completed | in-progress | failed}

date = {dateTime format}

_lastUpdated = {dateTime format}

identifier = {system|value}
The queried resource with the given parameters the params can also be used to sort the result with “_sort=”, pagination is also supported with “_count=” parameter

Capability statement of the application can be found with : https://example.com/elm-simulator/fhir/ch/metadata

Description

The ELM FHIR Simulator acts like a server to return queried resources. It have a validation process to check if the body (usually a FHIR resource) is compliant regarding the specification of the resources profile: https://fhir.ch/ig/ch-elm/profiles.html

Prerequisite

Before deploying the project the system MUST have:

  • a folder /opt/elm-simulator/documentReferences
  • a resourcesSummary.json file in /opt/elm-simulator with the following content
[
  {
    "resourceType": "DocumentReference",
    "resourcesDirectory": "/opt/elm-simulator/documentReferences"
  }
]

  • a deployed Matchbox application: https://github.com/ahdis/matchbox with CH-ELM IG imported and a set up EVSClient application to manage Matchbox validation for ch-elm

  • having these parameters in system environment (or in .env in case of Docker deployment)

elm.server.base.url=https://www.example.com/elm-simulator/fhir
elm.done.elapse.time.ms=10000
elm.server.evs.endpoint=https://example.com/evs/rest/validations
elm.server.validation.enabled=true
fhir.validation.name=MatchboxV3
elm.server.validation.profile.publish.documentReference=http://fhir.ch/ig/ch-elm/StructureDefinition/PublishDocumentReference|1.3.1
Property Value Remarks
elm.server.base.url https://www.example.com/elm-simulator/fhir The URL of the deployed application
elm.done.elapse.time.ms 10000 To simulate the processing in step 4, a timer in millisecond is set. After this specific delay Document elm-status will be automatically updated to “complete” status
datahouse.page.limit 10000 The page limit of datahouse, SHOULD always be superior to elm pagination
elm.server.evs.endpoint https://example.com/evs/rest/validations The URL of Gazelle EVS Client to send validation request
elm.server.validation.enabled true Activate the validation process, should always be true in production
fhir.validation.name MatchboxV3 Name of the validation service set in evs
elm.server.validation.profile.publish.documentReference http://fhir.ch/ig/ch-elm/StructureDefinition/PublishDocumentReference|1.3.1 The canoncial URL of Validation Profile for CH:ELM publish docuementReference