Skip to content

Instantly share code, notes, and snippets.

@citizenrich
Created April 24, 2024 18:18
Show Gist options
  • Save citizenrich/deb89983bac53472e7fc95304ae99be4 to your computer and use it in GitHub Desktop.
Save citizenrich/deb89983bac53472e7fc95304ae99be4 to your computer and use it in GitHub Desktop.
### @host = http://localhost:8080/matchbox/fhir
@host = https://test.ahdis.ch/matchbox/fhir
### Convert FML to StructureMap
POST {{host}}/StructureMap/$convert HTTP/1.1
Accept: application/fhir+json
Content-Type: text/fhir-mapping
< ./HIVObservation-HIVCondition.map
#!/usr/bin/env bash
curl --request POST --url 'https://test.ahdis.ch/matchbox/fhir/StructureMap/$convert' --header 'accept: application/fhir+json' --header 'content-type: text/fhir-mapping' --data @HIVObservation-HIVCondition.map
map "https://path-global-health.github.io/MERindicators/StructureMap/HIVObservation-HIVCondition" = "HIVObservation-HIVCondition"
uses "http://hl7.org/fhir/R4/StructureDefinition/Observation" alias Observation as source
uses "http://hl7.org/fhir/R4/StructureDefinition/Condition" alias Condition as target
group Condition(source src : Observation, target tgt : Condition) extends DomainResource <<type+>> {
src.identifier -> tgt.identifier;
src.active -> tgt.active;
src.subject -> tgt.subject;
src.encounter -> tgt.encounter;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment