MeaslesLogicalModelToResources
type: StructureMap
node role: treeRoot
id:
  v: MeaslesLogicalModelToResources
text:
  status:
    v: generated
  div: map "http://worldhealthorganization.github.io/smart-ot/StructureMap/MeaslesLogicalModelToResources" = "MeaslesLogicalModelToResources" uses "http://worldhealthorganization.github.io/smart-ot/StructureDefinition/SOTMeaslesF" alias MeaslesLogicalModel as source uses "http://hl7.org/fhir/StructureDefinition/Bundle" alias MeaslesCIFBundle as target uses "http://worldhealthorganization.github.io/smart-ot/StructureDefinition/MeaslesCIFComposition" alias MeaslesCIFComposition as target imports "http://worldhealthorganization.github.io/smart-ot/StructureMap/MetaDataTypesHelper" group MeaslesLogicalModelToResources(source lm : SOTMeasles, target bundle : Bundle) { lm -> bundle.type = 'document' "set bundle type"; // lm.ReportingSource as reportingSource then { reportingSource.DateReportedNational as date -> bundle.timestamp = date "set date"; } "set timestamp"; lm -> uuid() as bid, bundle.id = bid "set id"; lm -> uuid() as cid, uuid() as pid, uuid() as prid, uuid() as oid, uuid() as eid then { lm -> bundle.entry as entry, entry.resource = create('Composition') as composition, entry.fullUrl = append('urn:uuid:', cid) then { lm -> lm then LmToComposition(lm, composition, cid, pid, prid, oid, eid) "set"; lm -> bundle.entry as entry, entry.fullUrl = append('urn:uuid:', pid), create('Patient') as patient then { lm.Demographics as demographics -> demographics then DemographicsToPatient(demographics, patient, pid) "create patient"; lm -> entry.resource = patient "set patient as entry"; } "map patient resource"; lm -> bundle.entry as entry, entry.fullUrl = append('urn:uuid:', prid), create('Practitioner') as practitioner then { lm.ReportingSource as reportingSource -> reportingSource then ReportingSourceToPractitioner(reportingSource, practitioner, prid) "create practitioner"; lm -> entry.resource = practitioner "set practitioner as entry"; } "map practitioner resource"; lm -> bundle.entry as entry, entry.fullUrl = append('urn:uuid:', oid), create('Organization') as organization the…
url:
  v: http://worldhealthorganization.github.io/smart-ot/StructureMap/MeaslesLogicalModelToResources
version:
  v: 0.2.1
name:
  v: MeaslesLogicalModelToResources
status:
  v: draft
date:
  v: 2023-11-07T05:59:29+00:00
publisher:
  v: WHO
contact:
  name:
    v: WHO
  telecom:
    system:
      v: url
    value:
      v: http://who.int
jurisdiction:
  coding:
    system:
      v: http://unstats.un.org/unsd/methods/m49/m49.htm
    code:
      v: 001
structure:
  url:
    v: http://worldhealthorganization.github.io/smart-ot/StructureDefinition/SOTMeaslesF
    link: http://worldhealthorganization.github.io/smart-ot/StructureDefinition/SOTMeaslesF
  mode:
    v: source
  alias:
    v: MeaslesLogicalModel
structure:
  url:
    v: http://hl7.org/fhir/StructureDefinition/Bundle
    link: http://hl7.org/fhir/StructureDefinition/Bundle
  mode:
    v: target
  alias:
    v: MeaslesCIFBundle
structure:
  url:
    v: http://worldhealthorganization.github.io/smart-ot/StructureDefinition/MeaslesCIFComposition
    link: http://worldhealthorganization.github.io/smart-ot/StructureDefinition/MeaslesCIFComposition
  mode:
    v: target
  alias:
    v: MeaslesCIFComposition
import:
  v: http://worldhealthorganization.github.io/smart-ot/StructureMap/MetaDataTypesHelper
  link: http://worldhealthorganization.github.io/smart-ot/StructureMap/MetaDataTypesHelper
group:
  name:
    v: MeaslesLogicalModelToResources
  type mode:
    v: none
  input:
    name:
      v: lm
    type:
      v: SOTMeasles
    mode:
      v: source
  input:
    name:
      v: bundle
    type:
      v: Bundle
    mode:
      v: target
  rule:
    name:
      v: set bundle type
    source:
      context:
        v: lm
    target:
      context:
        v: bundle
      context type:
        v: variable
      element:
        v: type
      transform:
        v: copy
  rule:
    name:
      v: set id
    source:
      context:
        v: lm
    target:
      context type:
        v: variable
      variable:
        v: bid
      transform:
        v: uuid
    target:
      context:
        v: bundle
      context type:
        v: variable
      element:
        v: id
      transform:
        v: copy
  rule:
    name:
      v: set entries
    source:
      context:
        v: lm
    target:
      context type:
        v: variable
      variable:
        v: cid
      transform:
        v: uuid
    target:
      context type:
        v: variable
      variable:
        v: pid
      transform:
        v: uuid
    target:
      context type:
        v: variable
      variable:
        v: prid
      transform:
        v: uuid
    target:
      context type:
        v: variable
      variable:
        v: oid
      transform:
        v: uuid
    target:
      context type:
        v: variable
      variable:
        v: eid
      transform:
        v: uuid
    rule:
      name:
        v: map composition resource
group:
  name:
    v: mapClassificationToConditions
  type mode:
    v: none
  input:
    name:
      v: lm
    type:
      v: MeaslesLogicalModel
    mode:
      v: source
  input:
    name:
      v: bundle
    type:
      v: Bundle
    mode:
      v: target
  input:
    name:
      v: composition
    type:
      v: MeaslesCIFComposition
    mode:
      v: target
  input:
    name:
      v: pid
    mode:
      v: source
  input:
    name:
      v: eid
    mode:
      v: source
  rule:
    name:
      v: set section
    source:
      context:
        v: lm

v: document

v: bid

v: lm

v: bundle

v: variable

v: entry

v: entry

v: entry

v: variable

v: resource

v: composition

v: create

value:
  v: Composition

v: entry

v: variable

v: fullUrl

v: append

value:
  v: urn:uuid:

value:
  v: cid

v: set

context:
  v: lm

context type:
  v: variable
transform:
  v: copy
parameter:
  value:
    v: lm

name:
  v: LmToComposition
variable:
  v: lm
variable:
  v: composition
variable:
  v: cid
variable:
  v: pid
variable:
  v: prid
variable:
  v: oid
variable:
  v: eid

v: map patient resource

context:
  v: lm

context:
  v: bundle
context type:
  v: variable
element:
  v: entry
variable:
  v: entry

context:
  v: entry
context type:
  v: variable
element:
  v: fullUrl
transform:
  v: append
parameter:
  value:
    v: urn:uuid:
parameter:
  value:
    v: pid

context type:
  v: variable
variable:
  v: patient
transform:
  v: create
parameter:
  value:
    v: Patient

name:
  v: create patient
source:
  context:
    v: lm
  element:
    v: Demographics
  variable:
    v: demographics
target:
  context type:
    v: variable
  transform:
    v: copy
  parameter:
    value:
      v: demographics
dependent:
  name:
    v: DemographicsToPatient
  variable:
    v: demographics
  variable:
    v: patient
  variable:
    v: pid

name:
  v: set patient as entry
source:
  context:
    v: lm
target:
  context:
    v: entry
  context type:
    v: variable
  element:
    v: resource
  transform:
    v: copy
  parameter:
    value:
      v: patient

v: map practitioner resource

context:
  v: lm

context:
  v: bundle
context type:
  v: variable
element:
  v: entry
variable:
  v: entry

context:
  v: entry
context type:
  v: variable
element:
  v: fullUrl
transform:
  v: append
parameter:
  value:
    v: urn:uuid:
parameter:
  value:
    v: prid

context type:
  v: variable
variable:
  v: practitioner
transform:
  v: create
parameter:
  value:
    v: Practitioner

name:
  v: create practitioner
source:
  context:
    v: lm
  element:
    v: ReportingSource
  variable:
    v: reportingSource
target:
  context type:
    v: variable
  transform:
    v: copy
  parameter:
    value:
      v: reportingSource
dependent:
  name:
    v: ReportingSourceToPractitioner
  variable:
    v: reportingSource
  variable:
    v: practitioner
  variable:
    v: prid

name:
  v: set practitioner as entry
source:
  context:
    v: lm
target:
  context:
    v: entry
  context type:
    v: variable
  element:
    v: resource
  transform:
    v: copy
  parameter:
    value:
      v: practitioner

v: map organization resource

context:
  v: lm

context:
  v: bundle
context type:
  v: variable
element:
  v: entry
variable:
  v: entry

context:
  v: entry
context type:
  v: variable
element:
  v: fullUrl
transform:
  v: append
parameter:
  value:
    v: urn:uuid:
parameter:
  value:
    v: oid

context type:
  v: variable
variable:
  v: organization
transform:
  v: create
parameter:
  value:
    v: Organization

name:
  v: create organization
source:
  context:
    v: lm
  element:
    v: ReportingSource
  variable:
    v: reportingSource
target:
  context type:
    v: variable
  transform:
    v: copy
  parameter:
    value:
      v: reportingSource
dependent:
  name:
    v: ReportingSourceToOrganization
  variable:
    v: reportingSource
  variable:
    v: organization
  variable:
    v: oid

name:
  v: set organization as entry
source:
  context:
    v: lm
target:
  context:
    v: entry
  context type:
    v: variable
  element:
    v: resource
  transform:
    v: copy
  parameter:
    value:
      v: organization

v: map encounter resource

context:
  v: lm

context:
  v: bundle
context type:
  v: variable
element:
  v: entry
variable:
  v: entry

context:
  v: entry
context type:
  v: variable
element:
  v: fullUrl
transform:
  v: append
parameter:
  value:
    v: urn:uuid:
parameter:
  value:
    v: eid

context type:
  v: variable
variable:
  v: encounter
transform:
  v: create
parameter:
  value:
    v: Encounter

name:
  v: set encounter
source:
  context:
    v: lm
  element:
    v: ReportingSource
  variable:
    v: reportingSource
rule:
  name:
    v: set encounter
  source:
    context:
      v: reportingSource
    element:
      v: DateOfConsultation
    variable:
      v: date
  rule:
    name:
      v: create encounter
    source:
      context:
        v: date
    target:
      context type:
        v: variable
      variable:
        v: type
      transform:
        v: create
    target:
      context:
        v: type
      context type:
        v: variable
      element:
        v: code
      transform:
        v: copy
    target:
      context:
        v: type
      context type:
        v: variable
      element:
        v: system
      transform:
        v: copy
    target:
      context:
        v: type
      context type:
        v: variable
      element:
        v: display
      transform:
        v: copy
    dependent:
      name:
        v: createCompositionEncounterResource
      variable:
        v: date
      variable:
        v: pid
      variable:
        v: type
      variable:
        v: eid
      variable:
        v: encounter
rule:
  name:
    v: set encounter
  source:
    context:
      v: reportingSource
    element:
      v: DateOfHomeVisit
    variable:
      v: date
  rule:
    name:
      v: create encounter
    source:
      context:
        v: date
    target:
      context type:
        v: variable
      variable:
        v: type
      transform:
        v: create
    target:
      context:
        v: type
      context type:
        v: variable
      element:
        v: code
      transform:
        v: copy
    target:
      context:
        v: type
      context type:
        v: variable
      element:
        v: system
      transform:
        v: copy
    target:
      context:
        v: type
      context type:
        v: variable
      element:
        v: display
      transform:
        v: copy
    dependent:
      name:
        v: createCompositionEncounterResource
      variable:
        v: date
      variable:
        v: pid
      variable:
        v: type
      variable:
        v: eid
      variable:
        v: encounter

v: Coding

v: AMB

v: ambulatory

v: Coding

v: HH

v: home health

name:
  v: set encounter as entry
source:
  context:
    v: lm
target:
  context:
    v: entry
  context type:
    v: variable
  element:
    v: resource
  transform:
    v: copy
  parameter:
    value:
      v: encounter

v: set clinical data

context:
  v: lm

context type:
  v: variable
transform:
  v: copy
parameter:
  value:
    v: lm

name:
  v: mapClinicalToObservations
variable:
  v: lm
variable:
  v: bundle
variable:
  v: composition
variable:
  v: pid

v: set labs data

context:
  v: lm

context type:
  v: variable
transform:
  v: copy
parameter:
  value:
    v: lm

name:
  v: mapLabsToDiagnosticReport
variable:
  v: lm
variable:
  v: bundle
variable:
  v: composition
variable:
  v: pid

v: set immunization data

context:
  v: lm

context type:
  v: variable
transform:
  v: copy
parameter:
  value:
    v: lm

name:
  v: mapVaccinationStatusToImmunization
variable:
  v: lm
variable:
  v: bundle
variable:
  v: composition
variable:
  v: pid

v: set classification

context:
  v: lm

context type:
  v: variable
transform:
  v: copy
parameter:
  value:
    v: lm

name:
  v: mapClassificationToConditions
variable:
  v: lm
variable:
  v: bundle
variable:
  v: composition
variable:
  v: pid
variable:
  v: eid

context:
  v: composition
context type:
  v: variable
element:
  v: section
variable:
  v: section

context:
  v: section
context type:
  v: variable
element:
  v: title
transform:
  v: copy
parameter:
  value:
    v: Classification

name:
  v: Set classification
source:
  context:
    v: lm
  element:
    v: Classification
  variable:
    v: classification
target:
  context type:
    v: variable
  variable:
    v: id
  transform:
    v: uuid
target:
  context:
    v: bundle
  context type:
    v: variable
  element:
    v: entry
  variable:
    v: entry
target:
  context:
    v: entry
  context type:
    v: variable
  element:
    v: fullUrl
  transform:
    v: append
  parameter:
    value:
      v: urn:uuid:
  parameter:
    value:
      v: id
target:
  context:
    v: section
  context type:
    v: variable
  element:
    v: entry
  variable:
    v: sectionEntry
target:
  context:
    v: sectionEntry
  context type:
    v: variable
  element:
    v: reference
  transform:
    v: append
  parameter:
    value:
      v: Condition/
  parameter:
    value:
      v: id
target:
  context:
    v: entry
  context type:
    v: variable
  element:
    v: resource
  variable:
    v: condition
  transform:
    v: create
  parameter:
    value:
      v: Condition
rule:
  name:
    v: set id
  source:
    context:
      v: classification
  target:
    context:
      v: condition
    context type:
      v: variable
    element:
      v: id
    transform:
      v: copy
    parameter:
      value:
        v: id
rule:
  name:
    v: set
  source:
    context:
      v: classification
  target:
    context:
      v: condition
    context type:
      v: variable
    element:
      v: verificationStatus
    variable:
      v: tgtStatus
  target:
    context type:
      v: variable
    variable:
      v: status
    transform:
      v: create
    parameter:
      value:
        v: Coding
  target:
    context:
      v: status
    context type:
      v: variable
    element:
      v: code
    transform:
      v: copy
    parameter:
      value:
        v: confirmed
  target:
    context:
      v: status
    context type:
      v: variable
    element:
      v: system
    transform:
      v: copy
    parameter:
      value:
        v: http://terminology.hl7.org/CodeSystem/condition-ver-status
  target:
    context:
      v: status
    context type:
      v: variable
    element:
      v: display
    transform:
      v: copy
    parameter:
      value:
        v: Confirmed
  dependent:
    name:
      v: mapCodingtoCodeableConcept
    variable:
      v: status
    variable:
      v: tgtStatus
rule:
  name:
    v: set subject
  source:
    context:
      v: classification
  target:
    context:
      v: condition
    context type:
      v: variable
    element:
      v: subject
    variable:
      v: subject
  target:
    context:
      v: subject
    context type:
      v: variable
    element:
      v: reference
    transform:
      v: append
    parameter:
      value:
        v: Patient/
    parameter:
      value:
        v: pid
rule:
  name:
    v: set code
  source:
    context:
      v: classification
    element:
      v: FinalClassification

v: coding

context:
  v: condition
context type:
  v: variable
element:
  v: code
variable:
  v: code

name:
  v: mapCodingtoCodeableConcept
variable:
  v: coding
variable:
  v: code

name:
  v: set subject
source:
  context:
    v: classification
target:
  context:
    v: condition
  context type:
    v: variable
  element:
    v: encounter
  variable:
    v: encounter
target:
  context:
    v: encounter
  context type:
    v: variable
  element:
    v: reference
  transform:
    v: append
  parameter:
    value:
      v: Encounter/
  parameter:
    value:
      v: eid

name:
  v: set
source:
  context:
    v: classification
target:
  context:
    v: condition
  context type:
    v: variable
  element:
    v: category
  variable:
    v: tgt
target:
  context type:
    v: variable
  variable:
    v: status
  transform:
    v: create
  parameter:
    value:
      v: Coding
target:
  context:
    v: status
  context type:
    v: variable
  element:
    v: code
  transform:
    v: copy
  parameter:
    value:
      v: encounter-diagnosis
target:
  context:
    v: status
  context type:
    v: variable
  element:
    v: system
  transform:
    v: copy
  parameter:
    value:
      v: http://terminology.hl7.org/CodeSystem/condition-category
target:
  context:
    v: status
  context type:
    v: variable
  element:
    v: display
  transform:
    v: copy
  parameter:
    value:
      v: Encounter Diagnosis
dependent:
  name:
    v: mapCodingtoCodeableConcept
  variable:
    v: status
  variable:
    v: tgt

name:
  v: set
source:
  context:
    v: classification
  element:
    v: ClassificationDate
  variable:
    v: date
target:
  context:
    v: condition
  context type:
    v: variable
  element:
    v: recordedDate
  transform:
    v: copy
  parameter:
    value:
      v: date

name:
  v: set person
source:
  context:
    v: classification
  element:
    v: ClassifiedBy
  variable:
    v: person
target:
  context type:
    v: variable
  variable:
    v: rpid
  transform:
    v: uuid
target:
  context:
    v: bundle
  context type:
    v: variable
  element:
    v: entry
  variable:
    v: entry
target:
  context:
    v: entry
  context type:
    v: variable
  element:
    v: fullUrl
  transform:
    v: append
  parameter:
    value:
      v: urn:uuid:
  parameter:
    value:
      v: rpid
target:
  context:
    v: section
  context type:
    v: variable
  element:
    v: entry
  variable:
    v: sectionEntry
target:
  context:
    v: sectionEntry
  context type:
    v: variable
  element:
    v: reference
  transform:
    v: append
  parameter:
    value:
      v: RelatedPerson/
  parameter:
    value:
      v: rpid
target:
  context:
    v: entry
  context type:
    v: variable
  element:
    v: resource
  variable:
    v: recorder
  transform:
    v: create
  parameter:
    value:
      v: RelatedPerson
rule:
  name:
    v: set id
  source:
    context:
      v: person
  target:
    context:
      v: recorder
    context type:
      v: variable
    element:
      v: id
    transform:
      v: copy
    parameter:
      value:
        v: rpid
rule:
  name:
    v: set
  source:
    context:
      v: person
  target:
    context:
      v: recorder
    context type:
      v: variable
    element:
      v: name
    variable:
      v: targetName
  target:
    context type:
      v: variable
    variable:
      v: name
    transform:
      v: create
    parameter:
      value:
        v: HumanName
  target:
    context:
      v: name
    context type:
      v: variable
    element:
      v: text
    transform:
      v: copy
    parameter:
      value:
        v: person
  dependent:
    name:
      v: humanNameToHumanName
    variable:
      v: name
    variable:
      v: targetName
rule:
  name:
    v: set patient
  source:
    context:
      v: person
  target:
    context:
      v: recorder
    context type:
      v: variable
    element:
      v: patient
    variable:
      v: patient
  target:
    context:
      v: patient
    context type:
      v: variable
    element:
      v: reference
    transform:
      v: append
    parameter:
      value:
        v: Patient/
    parameter:
      value:
        v: pid

name:
  v: mapContactTracing
type mode:
  v: none
input:
  name:
    v: lm
  type:
    v: MeaslesLogicalModel
  mode:
    v: source
input:
  name:
    v: bundle
  type:
    v: Bundle
  mode:
    v: target
input:
  name:
    v: composition
  type:
    v: MeaslesCIFComposition
  mode:
    v: target
input:
  name:
    v: pid
  mode:
    v: source
rule:
  name:
    v: set
  source:
    context:
      v: lm
  target:
    context:
      v: composition
    context type:
      v: variable
    element:
      v: section
    variable:
      v: section
  target:
    context:
      v: section
    context type:
      v: variable
    element:
      v: title
    transform:
      v: copy
    parameter:
      value:
        v: Contact Tracing

name:
  v: mapClinicalToObservations
type mode:
  v: none
input:
  name:
    v: lm
  type:
    v: SOTMeasles
  mode:
    v: source
input:
  name:
    v: bundle
  type:
    v: Bundle
  mode:
    v: target
input:
  name:
    v: composition
  type:
    v: Composition
  mode:
    v: target
input:
  name:
    v: pid
  mode:
    v: source
rule:
  name:
    v: set section
  source:
    context:
      v: lm
  target:
    context:
      v: composition
    context type:
      v: variable
    element:
      v: section
    variable:
      v: section
  target:
    context:
      v: section
    context type:
      v: variable
    element:
      v: title
    transform:
      v: copy
    parameter:
      value:
        v: Clinical Data, Follow up and Treatment
  rule:
    name:
      v: set clinical
    source:
      context:
        v: lm
      element:
        v: Clinical
      variable:
        v: clinical
    target:
      context type:
        v: variable
      transform:
        v: copy
    rule:
      name:
        v: set fever
    rule:
      name:
        v: set Temperature
    rule:
      name:
        v: set Rash
    rule:
      name:
        v: set haemorrhagic
    rule:
      name:
        v: set erythematous
    rule:
      name:
        v: set vesicularPustular
    rule:
      name:
        v: set petechialPurpuric
    rule:
      name:
        v: set other
    rule:
      name:
        v: set cough
    rule:
      name:
        v: set conjunctivitis
    rule:
      name:
        v: set coryza
    rule:
      name:
        v: set koplikSpots
    rule:
      name:
        v: set lymphadenopathy
    rule:
      name:
        v: set jointPain
    rule:
      name:
        v: set pregnancy
    rule:
      name:
        v: set pregnancy weeks
    rule:
      name:
        v: set outcome
    rule:
      name:
        v: set encounter

v: clinical

v: clinical

v: Fever

v: fever

v: variable

v: obsid

v: uuid

v: bundle

v: variable

v: entry

v: entry

v: entry

v: variable

v: fullUrl

v: append

value:
  v: urn:uuid:

value:
  v: obsid

v: section

v: variable

v: entry

v: sectionEntry

v: sectionEntry

v: variable

v: reference

v: append

value:
  v: Observation/

value:
  v: obsid

v: entry

v: variable

v: resource

v: observation

v: create

value:
  v: Observation

v: set obsid

context:
  v: fever

context:
  v: observation
context type:
  v: variable
element:
  v: id
transform:
  v: copy
parameter:
  value:
    v: obsid

v: set obs

context:
  v: fever

context type:
  v: variable
variable:
  v: coding
transform:
  v: create
parameter:
  value:
    v: Coding

context:
  v: coding
context type:
  v: variable
element:
  v: code
transform:
  v: copy
parameter:
  value:
    v: DE66

context:
  v: coding
context type:
  v: variable
element:
  v: system
transform:
  v: copy
parameter:
  value:
    v: http://worldhealthorganization.github.io/smart-ot/PAHO_MRCIF

context:
  v: coding
context type:
  v: variable
element:
  v: display
transform:
  v: copy
parameter:
  value:
    v: Fever

name:
  v: set obs
source:
  context:
    v: fever
target:
  context type:
    v: variable
  transform:
    v: copy
  parameter:
    value:
      v: fever
dependent:
  name:
    v: createObservationResource
  variable:
    v: fever
  variable:
    v: coding
  variable:
    v: observation
  variable:
    v: pid

name:
  v: set start date
source:
  context:
    v: clinical
  element:
    v: FeverOnsetDate
  variable:
    v: onsetDate
target:
  context type:
    v: variable
  variable:
    v: period
  transform:
    v: create
  parameter:
    value:
      v: Period
target:
  context:
    v: period
  context type:
    v: variable
  element:
    v: start
  transform:
    v: copy
  parameter:
    value:
      v: onsetDate
target:
  context:
    v: observation
  context type:
    v: variable
  element:
    v: effective
  transform:
    v: copy
  parameter:
    value:
      v: period

v: clinical

v: Temperature

v: temperature

v: variable

v: obsid

v: uuid

v: bundle

v: variable

v: entry

v: entry

v: entry

v: variable

v: fullUrl

v: append

value:
  v: urn:uuid:

value:
  v: obsid

v: section

v: variable

v: entry

v: sectionEntry

v: sectionEntry

v: variable

v: reference

v: append

value:
  v: Observation/

value:
  v: obsid

v: entry

v: variable

v: resource

v: observation

v: create

value:
  v: Observation

v: set obsid

context:
  v: temperature

context:
  v: observation
context type:
  v: variable
element:
  v: id
transform:
  v: copy
parameter:
  value:
    v: obsid

v: set obs

context:
  v: temperature

context type:
  v: variable
variable:
  v: coding
transform:
  v: create
parameter:
  value:
    v: Coding

context:
  v: coding
context type:
  v: variable
element:
  v: code
transform:
  v: copy
parameter:
  value:
    v: DE70

context:
  v: coding
context type:
  v: variable
element:
  v: system
transform:
  v: copy
parameter:
  value:
    v: http://worldhealthorganization.github.io/smart-ot/PAHO_MRCIF

context:
  v: coding
context type:
  v: variable
element:
  v: display
transform:
  v: copy
parameter:
  value:
    v: Temperature

name:
  v: set obs
source:
  context:
    v: temperature
target:
  context type:
    v: variable
  transform:
    v: copy
  parameter:
    value:
      v: temperature
dependent:
  name:
    v: createObservationResource
  variable:
    v: temperature
  variable:
    v: coding
  variable:
    v: observation
  variable:
    v: pid

v: clinical

v: Rash

v: rash

v: code != 'Yes'

v: variable

v: obsid

v: uuid

v: bundle

v: variable

v: entry

v: entry

v: entry

v: variable

v: fullUrl

v: append

value:
  v: urn:uuid:

value:
  v: obsid

v: section

v: variable

v: entry

v: sectionEntry

v: sectionEntry

v: variable

v: reference

v: append

value:
  v: Observation/

value:
  v: obsid

v: entry

v: variable

v: resource

v: observation

v: create

value:
  v: Observation

v: set obsid

context:
  v: rash

context:
  v: observation
context type:
  v: variable
element:
  v: id
transform:
  v: copy
parameter:
  value:
    v: obsid

v: set obs

context:
  v: rash

context type:
  v: variable
variable:
  v: coding
transform:
  v: create
parameter:
  value:
    v: Coding

context:
  v: coding
context type:
  v: variable
element:
  v: code
transform:
  v: copy
parameter:
  value:
    v: DE72

context:
  v: coding
context type:
  v: variable
element:
  v: system
transform:
  v: copy
parameter:
  value:
    v: http://worldhealthorganization.github.io/smart-ot/PAHO_MRCIF

context:
  v: coding
context type:
  v: variable
element:
  v: display
transform:
  v: copy
parameter:
  value:
    v: Rash

name:
  v: set obs
source:
  context:
    v: rash
target:
  context type:
    v: variable
  transform:
    v: copy
  parameter:
    value:
      v: rash
dependent:
  name:
    v: createObservationResource
  variable:
    v: rash
  variable:
    v: coding
  variable:
    v: observation
  variable:
    v: pid

v: clinical

v: TypeOfRash

v: haemorrhagic

v: code = 'Haemorrhagic'

v: variable

v: obsid

v: uuid

v: bundle

v: variable

v: entry

v: entry

v: entry

v: variable

v: fullUrl

v: append

value:
  v: urn:uuid:

value:
  v: obsid

v: section

v: variable

v: entry

v: sectionEntry

v: sectionEntry

v: variable

v: reference

v: append

value:
  v: Observation/

value:
  v: obsid

v: entry

v: variable

v: resource

v: observation

v: create

value:
  v: Observation

v: set obsid

context:
  v: haemorrhagic

context:
  v: observation
context type:
  v: variable
element:
  v: id
transform:
  v: copy
parameter:
  value:
    v: obsid

v: set obs

context:
  v: haemorrhagic

context type:
  v: variable
variable:
  v: coding
transform:
  v: create
parameter:
  value:
    v: Coding

context:
  v: coding
context type:
  v: variable
element:
  v: code
transform:
  v: copy
parameter:
  value:
    v: Haemorrhagic

context:
  v: coding
context type:
  v: variable
element:
  v: system
transform:
  v: copy
parameter:
  value:
    v: http://worldhealthorganization.github.io/smart-ot/RashType

context:
  v: coding
context type:
  v: variable
element:
  v: display
transform:
  v: copy
parameter:
  value:
    v: Haemorrhagic

name:
  v: set value
source:
  context:
    v: haemorrhagic
target:
  context type:
    v: variable
  variable:
    v: ValueCoding
  transform:
    v: create
  parameter:
    value:
      v: Coding
target:
  context:
    v: ValueCoding
  context type:
    v: variable
  element:
    v: code
  transform:
    v: copy
  parameter:
    value:
      v: Yes
target:
  context:
    v: ValueCoding
  context type:
    v: variable
  element:
    v: system
  transform:
    v: copy
  parameter:
    value:
      v: http://ritikarawlani.github.io/smart-outbreak-measles/YesNoUnknown
target:
  context:
    v: ValueCoding
  context type:
    v: variable
  element:
    v: display
  transform:
    v: copy
  parameter:
    value:
      v: Yes
rule:
  name:
    v: set obs
  source:
    context:
      v: haemorrhagic
  target:
    context type:
      v: variable
    transform:
      v: copy
    parameter:
      value:
        v: haemorrhagic
  dependent:
    name:
      v: createObservationResource
    variable:
      v: ValueCoding
    variable:
      v: coding
    variable:
      v: observation
    variable:
      v: pid

name:
  v: set start date
source:
  context:
    v: clinical
  element:
    v: RashOnsetDate
  variable:
    v: onsetDate
target:
  context type:
    v: variable
  variable:
    v: period
  transform:
    v: create
  parameter:
    value:
      v: Period
target:
  context:
    v: period
  context type:
    v: variable
  element:
    v: start
  transform:
    v: copy
  parameter:
    value:
      v: onsetDate
target:
  context:
    v: observation
  context type:
    v: variable
  element:
    v: effective
  transform:
    v: copy
  parameter:
    value:
      v: period

v: clinical

v: TypeOfRash

v: erythematous

v: code = 'Erythematous'

v: variable

v: obsid

v: uuid

v: bundle

v: variable

v: entry

v: entry

v: entry

v: variable

v: fullUrl

v: append

value:
  v: urn:uuid:

value:
  v: obsid

v: section

v: variable

v: entry

v: sectionEntry

v: sectionEntry

v: variable

v: reference

v: append

value:
  v: Observation/

value:
  v: obsid

v: entry

v: variable

v: resource

v: observation

v: create

value:
  v: Observation

v: set obsid

context:
  v: erythematous

context:
  v: observation
context type:
  v: variable
element:
  v: id
transform:
  v: copy
parameter:
  value:
    v: obsid

v: set obs

context:
  v: erythematous

context type:
  v: variable
variable:
  v: coding
transform:
  v: create
parameter:
  value:
    v: Coding

context:
  v: coding
context type:
  v: variable
element:
  v: code
transform:
  v: copy
parameter:
  value:
    v: Erythematous

context:
  v: coding
context type:
  v: variable
element:
  v: system
transform:
  v: copy
parameter:
  value:
    v: http://worldhealthorganization.github.io/smart-ot/RashType

context:
  v: coding
context type:
  v: variable
element:
  v: display
transform:
  v: copy
parameter:
  value:
    v: Erythematous

name:
  v: set value
source:
  context:
    v: erythematous
target:
  context type:
    v: variable
  variable:
    v: ValueCoding
  transform:
    v: create
  parameter:
    value:
      v: Coding
target:
  context:
    v: ValueCoding
  context type:
    v: variable
  element:
    v: code
  transform:
    v: copy
  parameter:
    value:
      v: Yes
target:
  context:
    v: ValueCoding
  context type:
    v: variable
  element:
    v: system
  transform:
    v: copy
  parameter:
    value:
      v: http://ritikarawlani.github.io/smart-outbreak-measles/YesNoUnknown
target:
  context:
    v: ValueCoding
  context type:
    v: variable
  element:
    v: display
  transform:
    v: copy
  parameter:
    value:
      v: Yes
rule:
  name:
    v: set obs
  source:
    context:
      v: erythematous
  target:
    context type:
      v: variable
    transform:
      v: copy
    parameter:
      value:
        v: erythematous
  dependent:
    name:
      v: createObservationResource
    variable:
      v: ValueCoding
    variable:
      v: coding
    variable:
      v: observation
    variable:
      v: pid

name:
  v: set start date
source:
  context:
    v: clinical
  element:
    v: RashOnsetDate
  variable:
    v: onsetDate
target:
  context type:
    v: variable
  variable:
    v: period
  transform:
    v: create
  parameter:
    value:
      v: Period
target:
  context:
    v: period
  context type:
    v: variable
  element:
    v: start
  transform:
    v: copy
  parameter:
    value:
      v: onsetDate
target:
  context:
    v: observation
  context type:
    v: variable
  element:
    v: effective
  transform:
    v: copy
  parameter:
    value:
      v: period

v: clinical

v: TypeOfRash

v: vesicularPustular

v: code = 'VesicularPustular'

v: variable

v: obsid

v: uuid

v: bundle

v: variable

v: entry

v: entry

v: entry

v: variable

v: fullUrl

v: append

value:
  v: urn:uuid:

value:
  v: obsid

v: section

v: variable

v: entry

v: sectionEntry

v: sectionEntry

v: variable

v: reference

v: append

value:
  v: Observation/

value:
  v: obsid

v: entry

v: variable

v: resource

v: observation

v: create

value:
  v: Observation

v: set obsid

context:
  v: vesicularPustular

context:
  v: observation
context type:
  v: variable
element:
  v: id
transform:
  v: copy
parameter:
  value:
    v: obsid

v: set obs

context:
  v: vesicularPustular

context type:
  v: variable
variable:
  v: coding
transform:
  v: create
parameter:
  value:
    v: Coding

context:
  v: coding
context type:
  v: variable
element:
  v: code
transform:
  v: copy
parameter:
  value:
    v: Vesicular-pustular

context:
  v: coding
context type:
  v: variable
element:
  v: system
transform:
  v: copy
parameter:
  value:
    v: http://worldhealthorganization.github.io/smart-ot/RashType

context:
  v: coding
context type:
  v: variable
element:
  v: display
transform:
  v: copy
parameter:
  value:
    v: Vesicular Pustular

name:
  v: set value
source:
  context:
    v: vesicularPustular
target:
  context type:
    v: variable
  variable:
    v: ValueCoding
  transform:
    v: create
  parameter:
    value:
      v: Coding
target:
  context:
    v: ValueCoding
  context type:
    v: variable
  element:
    v: code
  transform:
    v: copy
  parameter:
    value:
      v: Yes
target:
  context:
    v: ValueCoding
  context type:
    v: variable
  element:
    v: system
  transform:
    v: copy
  parameter:
    value:
      v: http://ritikarawlani.github.io/smart-outbreak-measles/YesNoUnknown
target:
  context:
    v: ValueCoding
  context type:
    v: variable
  element:
    v: display
  transform:
    v: copy
  parameter:
    value:
      v: Yes
rule:
  name:
    v: set obs
  source:
    context:
      v: vesicularPustular
  target:
    context type:
      v: variable
    transform:
      v: copy
    parameter:
      value:
        v: vesicularPustular
  dependent:
    name:
      v: createObservationResource
    variable:
      v: ValueCoding
    variable:
      v: coding
    variable:
      v: observation
    variable:
      v: pid

v: set start date

context:
  v: clinical
element:
  v: RashOnsetDate
variable:
  v: onsetDate

context type:
  v: variable
variable:
  v: period
transform:
  v: create
parameter:
  value:
    v: Period

context:
  v: period
context type:
  v: variable
element:
  v: start
transform:
  v: copy
parameter:
  value:
    v: onsetDate

context:
  v: observation
context type:
  v: variable
element:
  v: effective
transform:
  v: copy
parameter:
  value:
    v: period

v: clinical

v: TypeOfRash

v: petechialPurpuric

v: code = 'PetechialPurpuric'

v: variable

v: obsid

v: uuid

v: bundle

v: variable

v: entry

v: entry

v: entry

v: variable

v: fullUrl

v: append

value:
  v: urn:uuid:

value:
  v: obsid

v: section

v: variable

v: entry

v: sectionEntry

v: sectionEntry

v: variable

v: reference

v: append

value:
  v: Observation/

value:
  v: obsid

v: entry

v: variable

v: resource

v: observation

v: create

value:
  v: Observation

v: set obsid

context:
  v: petechialPurpuric

context:
  v: observation
context type:
  v: variable
element:
  v: id
transform:
  v: copy
parameter:
  value:
    v: obsid

v: set obs

context:
  v: petechialPurpuric

context type:
  v: variable
variable:
  v: coding
transform:
  v: create
parameter:
  value:
    v: Coding

context:
  v: coding
context type:
  v: variable
element:
  v: code
transform:
  v: copy
parameter:
  value:
    v: Petechial-purpuric

context:
  v: coding
context type:
  v: variable
element:
  v: system
transform:
  v: copy
parameter:
  value:
    v: http://worldhealthorganization.github.io/smart-ot/RashType

context:
  v: coding
context type:
  v: variable
element:
  v: display
transform:
  v: copy
parameter:
  value:
    v: Petechial Purpuric

name:
  v: set value
source:
  context:
    v: petechialPurpuric
target:
  context type:
    v: variable
  variable:
    v: ValueCoding
  transform:
    v: create
  parameter:
    value:
      v: Coding
target:
  context:
    v: ValueCoding
  context type:
    v: variable
  element:
    v: code
  transform:
    v: copy
  parameter:
    value:
      v: Yes
target:
  context:
    v: ValueCoding
  context type:
    v: variable
  element:
    v: system
  transform:
    v: copy
  parameter:
    value:
      v: http://ritikarawlani.github.io/smart-outbreak-measles/YesNoUnknown
target:
  context:
    v: ValueCoding
  context type:
    v: variable
  element:
    v: display
  transform:
    v: copy
  parameter:
    value:
      v: Yes
rule:
  name:
    v: set obs
  source:
    context:
      v: petechialPurpuric
  target:
    context type:
      v: variable
    transform:
      v: copy
    parameter:
      value:
        v: petechialPurpuric
  dependent:
    name:
      v: createObservationResource
    variable:
      v: petechialPurpuric
    variable:
      v: coding
    variable:
      v: observation
    variable:
      v: pid

v: set start date

context:
  v: clinical
element:
  v: RashOnsetDate
variable:
  v: onsetDate

context type:
  v: variable
variable:
  v: period
transform:
  v: create
parameter:
  value:
    v: Period

context:
  v: period
context type:
  v: variable
element:
  v: start
transform:
  v: copy
parameter:
  value:
    v: onsetDate

context:
  v: observation
context type:
  v: variable
element:
  v: effective
transform:
  v: copy
parameter:
  value:
    v: period

v: clinical

v: TypeOfRash

v: other

v: code = 'Other'

v: variable

v: obsid

v: uuid

v: bundle

v: variable

v: entry

v: entry

v: entry

v: variable

v: fullUrl

v: append

value:
  v: urn:uuid:

value:
  v: obsid

v: section

v: variable

v: entry

v: sectionEntry

v: sectionEntry

v: variable

v: reference

v: append

value:
  v: Observation/

value:
  v: obsid

v: entry

v: variable

v: resource

v: observation

v: create

value:
  v: Observation

v: set obsid

context:
  v: other

context:
  v: observation
context type:
  v: variable
element:
  v: id
transform:
  v: copy
parameter:
  value:
    v: obsid

v: set obs

context:
  v: other

context type:
  v: variable
variable:
  v: coding
transform:
  v: create
parameter:
  value:
    v: Coding

context:
  v: coding
context type:
  v: variable
element:
  v: code
transform:
  v: copy
parameter:
  value:
    v: Other

context:
  v: coding
context type:
  v: variable
element:
  v: system
transform:
  v: copy
parameter:
  value:
    v: http://worldhealthorganization.github.io/smart-ot/RashType

context:
  v: coding
context type:
  v: variable
element:
  v: display
transform:
  v: copy
parameter:
  value:
    v: Rash

name:
  v: set value
source:
  context:
    v: other
target:
  context type:
    v: variable
  variable:
    v: ValueCoding
  transform:
    v: create
  parameter:
    value:
      v: Coding
target:
  context:
    v: ValueCoding
  context type:
    v: variable
  element:
    v: code
  transform:
    v: copy
  parameter:
    value:
      v: Yes
target:
  context:
    v: ValueCoding
  context type:
    v: variable
  element:
    v: system
  transform:
    v: copy
  parameter:
    value:
      v: http://ritikarawlani.github.io/smart-outbreak-measles/YesNoUnknown
target:
  context:
    v: ValueCoding
  context type:
    v: variable
  element:
    v: display
  transform:
    v: copy
  parameter:
    value:
      v: Yes
rule:
  name:
    v: set obs
  source:
    context:
      v: other
  target:
    context type:
      v: variable
    transform:
      v: copy
    parameter:
      value:
        v: other
  dependent:
    name:
      v: createObservationResource
    variable:
      v: ValueCoding
    variable:
      v: coding
    variable:
      v: observation
    variable:
      v: pid

v: clinical

v: Cough

v: cough

v: variable

v: obsid

v: uuid

v: bundle

v: variable

v: entry

v: entry

v: entry

v: variable

v: fullUrl

v: append

value:
  v: urn:uuid:

value:
  v: obsid

v: section

v: variable

v: entry

v: sectionEntry

v: sectionEntry

v: variable

v: reference

v: append

value:
  v: Observation/

value:
  v: obsid

v: entry

v: variable

v: resource

v: observation

v: create

value:
  v: Observation

v: set obsid

context:
  v: cough

context:
  v: observation
context type:
  v: variable
element:
  v: id
transform:
  v: copy
parameter:
  value:
    v: obsid

v: set obs

context:
  v: cough

context type:
  v: variable
variable:
  v: coding
transform:
  v: create
parameter:
  value:
    v: Coding

context:
  v: coding
context type:
  v: variable
element:
  v: code
transform:
  v: copy
parameter:
  value:
    v: DE84

context:
  v: coding
context type:
  v: variable
element:
  v: system
transform:
  v: copy
parameter:
  value:
    v: http://worldhealthorganization.github.io/smart-ot/PAHO_MRCIF

context:
  v: coding
context type:
  v: variable
element:
  v: display
transform:
  v: copy
parameter:
  value:
    v: Cough

name:
  v: set obs
source:
  context:
    v: cough
target:
  context type:
    v: variable
  transform:
    v: copy
  parameter:
    value:
      v: cough
dependent:
  name:
    v: createObservationResource
  variable:
    v: cough
  variable:
    v: coding
  variable:
    v: observation
  variable:
    v: pid

v: clinical

v: Conjunctivitis

v: conjunctivitis

v: variable

v: obsid

v: uuid

v: bundle

v: variable

v: entry

v: entry

v: entry

v: variable

v: fullUrl

v: append

value:
  v: urn:uuid:

value:
  v: obsid

v: section

v: variable

v: entry

v: sectionEntry

v: sectionEntry

v: variable

v: reference

v: append

value:
  v: Observation/

value:
  v: obsid

v: entry

v: variable

v: resource

v: observation

v: create

value:
  v: Observation

v: set obsid

context:
  v: conjunctivitis

context:
  v: observation
context type:
  v: variable
element:
  v: id
transform:
  v: copy
parameter:
  value:
    v: obsid

v: set obs

context:
  v: conjunctivitis

context type:
  v: variable
variable:
  v: coding
transform:
  v: create
parameter:
  value:
    v: Coding

context:
  v: coding
context type:
  v: variable
element:
  v: code
transform:
  v: copy
parameter:
  value:
    v: DE88

context:
  v: coding
context type:
  v: variable
element:
  v: system
transform:
  v: copy
parameter:
  value:
    v: http://worldhealthorganization.github.io/smart-ot/PAHO_MRCIF

context:
  v: coding
context type:
  v: variable
element:
  v: display
transform:
  v: copy
parameter:
  value:
    v: Conjunctivitis

name:
  v: set obs
source:
  context:
    v: conjunctivitis
target:
  context type:
    v: variable
  transform:
    v: copy
  parameter:
    value:
      v: conjunctivitis
dependent:
  name:
    v: createObservationResource
  variable:
    v: conjunctivitis
  variable:
    v: coding
  variable:
    v: observation
  variable:
    v: pid

v: clinical

v: Coryza

v: coryza

v: variable

v: obsid

v: uuid

v: bundle

v: variable

v: entry

v: entry

v: entry

v: variable

v: fullUrl

v: append

value:
  v: urn:uuid:

value:
  v: obsid

v: section

v: variable

v: entry

v: sectionEntry

v: sectionEntry

v: variable

v: reference

v: append

value:
  v: Observation/

value:
  v: obsid

v: entry

v: variable

v: resource

v: observation

v: create

value:
  v: Observation

v: set obsid

context:
  v: coryza

context:
  v: observation
context type:
  v: variable
element:
  v: id
transform:
  v: copy
parameter:
  value:
    v: obsid

v: set obs

context:
  v: coryza

context type:
  v: variable
variable:
  v: coding
transform:
  v: create
parameter:
  value:
    v: Coding

context:
  v: coding
context type:
  v: variable
element:
  v: code
transform:
  v: copy
parameter:
  value:
    v: DE92

context:
  v: coding
context type:
  v: variable
element:
  v: system
transform:
  v: copy
parameter:
  value:
    v: http://worldhealthorganization.github.io/smart-ot/PAHO_MRCIF

context:
  v: coding
context type:
  v: variable
element:
  v: display
transform:
  v: copy
parameter:
  value:
    v: Coryza

name:
  v: set obs
source:
  context:
    v: coryza
target:
  context type:
    v: variable
  transform:
    v: copy
  parameter:
    value:
      v: coryza
dependent:
  name:
    v: createObservationResource
  variable:
    v: coryza
  variable:
    v: coding
  variable:
    v: observation
  variable:
    v: pid

v: clinical

v: KoplikSpots

v: koplikSpots

v: variable

v: obsid

v: uuid

v: bundle

v: variable

v: entry

v: entry

v: entry

v: variable

v: fullUrl

v: append

value:
  v: urn:uuid:

value:
  v: obsid

v: section

v: variable

v: entry

v: sectionEntry

v: sectionEntry

v: variable

v: reference

v: append

value:
  v: Observation/

value:
  v: obsid

v: entry

v: variable

v: resource

v: observation

v: create

value:
  v: Observation

v: set obsid

context:
  v: koplikSpots

context:
  v: observation
context type:
  v: variable
element:
  v: id
transform:
  v: copy
parameter:
  value:
    v: obsid

v: set obs

context:
  v: koplikSpots

context type:
  v: variable
variable:
  v: coding
transform:
  v: create
parameter:
  value:
    v: Coding

context:
  v: coding
context type:
  v: variable
element:
  v: code
transform:
  v: copy
parameter:
  value:
    v: DE96

context:
  v: coding
context type:
  v: variable
element:
  v: system
transform:
  v: copy
parameter:
  value:
    v: http://worldhealthorganization.github.io/smart-ot/PAHO_MRCIF

context:
  v: coding
context type:
  v: variable
element:
  v: display
transform:
  v: copy
parameter:
  value:
    v: Koplik Spots

name:
  v: set obs
source:
  context:
    v: koplikSpots
target:
  context type:
    v: variable
  transform:
    v: copy
  parameter:
    value:
      v: koplikSpots
dependent:
  name:
    v: createObservationResource
  variable:
    v: koplikSpots
  variable:
    v: coding
  variable:
    v: observation
  variable:
    v: pid

v: clinical

v: Lymphadenopathy

v: lymphadenopathy

v: variable

v: obsid

v: uuid

v: bundle

v: variable

v: entry

v: entry

v: entry

v: variable

v: fullUrl

v: append

value:
  v: urn:uuid:

value:
  v: obsid

v: section

v: variable

v: entry

v: sectionEntry

v: sectionEntry

v: variable

v: reference

v: append

value:
  v: Observation/

value:
  v: obsid

v: entry

v: variable

v: resource

v: observation

v: create

value:
  v: Observation

v: set obsid

context:
  v: lymphadenopathy

context:
  v: observation
context type:
  v: variable
element:
  v: id
transform:
  v: copy
parameter:
  value:
    v: obsid

v: set obs

context:
  v: lymphadenopathy

context type:
  v: variable
variable:
  v: coding
transform:
  v: create
parameter:
  value:
    v: Coding

context:
  v: coding
context type:
  v: variable
element:
  v: code
transform:
  v: copy
parameter:
  value:
    v: DE100

context:
  v: coding
context type:
  v: variable
element:
  v: system
transform:
  v: copy
parameter:
  value:
    v: http://worldhealthorganization.github.io/smart-ot/PAHO_MRCIF

context:
  v: coding
context type:
  v: variable
element:
  v: display
transform:
  v: copy
parameter:
  value:
    v: Lymphadenopathy

name:
  v: set obs
source:
  context:
    v: lymphadenopathy
target:
  context type:
    v: variable
  transform:
    v: copy
  parameter:
    value:
      v: lymphadenopathy
dependent:
  name:
    v: createObservationResource
  variable:
    v: lymphadenopathy
  variable:
    v: coding
  variable:
    v: observation
  variable:
    v: pid

v: clinical

v: JointPain

v: jointPain

v: variable

v: obsid

v: uuid

v: bundle

v: variable

v: entry

v: entry

v: entry

v: variable

v: fullUrl

v: append

value:
  v: urn:uuid:

value:
  v: obsid

v: section

v: variable

v: entry

v: sectionEntry

v: sectionEntry

v: variable

v: reference

v: append

value:
  v: Observation/

value:
  v: obsid

v: entry

v: variable

v: resource

v: observation

v: create

value:
  v: Observation

v: set obsid

context:
  v: jointPain

context:
  v: observation
context type:
  v: variable
element:
  v: id
transform:
  v: copy
parameter:
  value:
    v: obsid

v: set obs

context:
  v: jointPain

context type:
  v: variable
variable:
  v: coding
transform:
  v: create
parameter:
  value:
    v: Coding

context:
  v: coding
context type:
  v: variable
element:
  v: code
transform:
  v: copy
parameter:
  value:
    v: DE104

context:
  v: coding
context type:
  v: variable
element:
  v: system
transform:
  v: copy
parameter:
  value:
    v: http://worldhealthorganization.github.io/smart-ot/PAHO_MRCIF

context:
  v: coding
context type:
  v: variable
element:
  v: display
transform:
  v: copy
parameter:
  value:
    v: Joint Pain

name:
  v: set obs
source:
  context:
    v: jointPain
target:
  context type:
    v: variable
  transform:
    v: copy
  parameter:
    value:
      v: jointPain
dependent:
  name:
    v: createObservationResource
  variable:
    v: jointPain
  variable:
    v: coding
  variable:
    v: observation
  variable:
    v: pid

v: clinical

v: PregnancyStatus

v: pregnancy

v: variable

v: obsid

v: uuid

v: bundle

v: variable

v: entry

v: entry

v: entry

v: variable

v: fullUrl

v: append

value:
  v: urn:uuid:

value:
  v: obsid

v: section

v: variable

v: entry

v: sectionEntry

v: sectionEntry

v: variable

v: reference

v: append

value:
  v: Observation/

value:
  v: obsid

v: entry

v: variable

v: resource

v: observation

v: create

value:
  v: Observation

v: set obsid

context:
  v: pregnancy

context:
  v: observation
context type:
  v: variable
element:
  v: id
transform:
  v: copy
parameter:
  value:
    v: obsid

v: set obs

context:
  v: pregnancy

context type:
  v: variable
variable:
  v: coding
transform:
  v: create
parameter:
  value:
    v: Coding

context:
  v: coding
context type:
  v: variable
element:
  v: code
transform:
  v: copy
parameter:
  value:
    v: DE108

context:
  v: coding
context type:
  v: variable
element:
  v: system
transform:
  v: copy
parameter:
  value:
    v: http://worldhealthorganization.github.io/smart-ot/PAHO_MRCIF

context:
  v: coding
context type:
  v: variable
element:
  v: display
transform:
  v: copy
parameter:
  value:
    v: Pregnancy

name:
  v: set obs
source:
  context:
    v: pregnancy
target:
  context type:
    v: variable
  transform:
    v: copy
  parameter:
    value:
      v: pregnancy
dependent:
  name:
    v: createObservationResource
  variable:
    v: pregnancy
  variable:
    v: coding
  variable:
    v: observation
  variable:
    v: pid

v: clinical

v: PregnancyStatus

v: pregnancy

v: code = 'Yes'

v: variable

v: obsid

v: uuid

v: bundle

v: variable

v: entry

v: entry

v: entry

v: variable

v: fullUrl

v: append

value:
  v: urn:uuid:

value:
  v: obsid

v: section

v: variable

v: entry

v: sectionEntry

v: sectionEntry

v: variable

v: reference

v: append

value:
  v: Observation/

value:
  v: obsid

v: entry

v: variable

v: resource

v: observation

v: create

value:
  v: Observation

v: set obsid

context:
  v: pregnancy

context:
  v: observation
context type:
  v: variable
element:
  v: id
transform:
  v: copy
parameter:
  value:
    v: obsid

v: set obs

context:
  v: clinical
element:
  v: GestationWeeks
variable:
  v: weeks

context type:
  v: variable
variable:
  v: coding
transform:
  v: create
parameter:
  value:
    v: Coding

context:
  v: coding
context type:
  v: variable
element:
  v: code
transform:
  v: copy
parameter:
  value:
    v: DE112

context:
  v: coding
context type:
  v: variable
element:
  v: system
transform:
  v: copy
parameter:
  value:
    v: http://worldhealthorganization.github.io/smart-ot/PAHO_MRCIF

context:
  v: coding
context type:
  v: variable
element:
  v: display
transform:
  v: copy
parameter:
  value:
    v: Weeks Pregnant

name:
  v: set obs
source:
  context:
    v: weeks
target:
  context type:
    v: variable
  transform:
    v: copy
  parameter:
    value:
      v: weeks
dependent:
  name:
    v: createObservationResource
  variable:
    v: weeks
  variable:
    v: coding
  variable:
    v: observation
  variable:
    v: pid

v: clinical

v: Outcome

v: outcome

v: variable

v: obsid

v: uuid

v: bundle

v: variable

v: entry

v: entry

v: entry

v: variable

v: fullUrl

v: append

value:
  v: urn:uuid:

value:
  v: obsid

v: section

v: variable

v: entry

v: sectionEntry

v: sectionEntry

v: variable

v: reference

v: append

value:
  v: Observation/

value:
  v: obsid

v: entry

v: variable

v: resource

v: observation

v: create

value:
  v: Observation

v: set obsid

context:
  v: outcome

context:
  v: observation
context type:
  v: variable
element:
  v: id
transform:
  v: copy
parameter:
  value:
    v: obsid

v: set obs

context:
  v: outcome

context type:
  v: variable
variable:
  v: coding
transform:
  v: create
parameter:
  value:
    v: Coding

context:
  v: coding
context type:
  v: variable
element:
  v: code
transform:
  v: copy
parameter:
  value:
    v: DE121

context:
  v: coding
context type:
  v: variable
element:
  v: system
transform:
  v: copy
parameter:
  value:
    v: http://worldhealthorganization.github.io/smart-ot/PAHO_MRCIF

context:
  v: coding
context type:
  v: variable
element:
  v: display
transform:
  v: copy
parameter:
  value:
    v: Outcome

name:
  v: set obs
source:
  context:
    v: outcome
target:
  context type:
    v: variable
  transform:
    v: copy
  parameter:
    value:
      v: outcome
dependent:
  name:
    v: createObservationResource
  variable:
    v: outcome
  variable:
    v: coding
  variable:
    v: observation
  variable:
    v: pid

v: set start date

context:
  v: clinical
element:
  v: DateOfDeath
variable:
  v: onsetDate

context:
  v: observation
context type:
  v: variable
element:
  v: effective
transform:
  v: copy
parameter:
  value:
    v: onsetDate

v: clinical

v: variable

v: copy

value:
  v: clinical

v: mapEncounters

v: clinical

v: bundle

v: section

v: pid

name:
  v: createObservationResource
type mode:
  v: none
input:
  name:
    v: src
  mode:
    v: source
input:
  name:
    v: coding
  type:
    v: Coding
  mode:
    v: source
input:
  name:
    v: observation
  type:
    v: Observation
  mode:
    v: target
input:
  name:
    v: pid
  mode:
    v: source
rule:
  name:
    v: set code
  source:
    context:
      v: src
  target:
    context type:
      v: variable
    variable:
      v: code
    transform:
      v: create
    parameter:
      value:
        v: CodeableConcept
  target:
    context:
      v: code
    context type:
      v: variable
    element:
      v: coding
    transform:
      v: copy
    parameter:
      value:
        v: coding
  target:
    context:
      v: observation
    context type:
      v: variable
    element:
      v: code
    transform:
      v: copy
    parameter:
      value:
        v: code
rule:
  name:
    v: set value
  source:
    context:
      v: src
  target:
    context type:
      v: variable
    variable:
      v: value
    transform:
      v: create
    parameter:
      value:
        v: CodeableConcept
  target:
    context:
      v: value
    context type:
      v: variable
    element:
      v: coding
    transform:
      v: copy
    parameter:
      value:
        v: src
  target:
    context:
      v: observation
    context type:
      v: variable
    element:
      v: value
    transform:
      v: copy
    parameter:
      value:
        v: value
rule:
  name:
    v: set status
  source:
    context:
      v: src
  target:
    context:
      v: observation
    context type:
      v: variable
    element:
      v: status
    transform:
      v: copy
    parameter:
      value:
        v: registered
rule:
  name:
    v: set subject
  source:
    context:
      v: src
  target:
    context:
      v: observation
    context type:
      v: variable
    element:
      v: subject
    variable:
      v: subject
  rule:
    name:
      v: set subject
    source:
      context:
        v: src
    target:
      context:
        v: subject
      context type:
        v: variable
      element:
        v: reference
      transform:
        v: append

v: Patient/

v: pid

name:
  v: mapLabsToDiagnosticReport
type mode:
  v: none
input:
  name:
    v: lm
  type:
    v: MeaslesLogicalModel
  mode:
    v: source
input:
  name:
    v: bundle
  type:
    v: Bundle
  mode:
    v: target
input:
  name:
    v: composition
  type:
    v: MeaslesCIFComposition
  mode:
    v: target
input:
  name:
    v: pid
  mode:
    v: source
rule:
  name:
    v: set section
  source:
    context:
      v: lm
  target:
    context:
      v: composition
    context type:
      v: variable
    element:
      v: section
    variable:
      v: section
  target:
    context:
      v: section
    context type:
      v: variable
    element:
      v: title
    transform:
      v: copy
    parameter:
      value:
        v: Specimens & Laboratory Testing
  rule:
    name:
      v: set diagnosticReport
    source:
      context:
        v: lm
      element:
        v: LaboratoryResults
      variable:
        v: labs
    target:
      context type:
        v: variable
      variable:
        v: id
      transform:
        v: uuid
    target:
      context:
        v: bundle
      context type:
        v: variable
      element:
        v: entry
      variable:
        v: entry
    target:
      context:
        v: entry
      context type:
        v: variable
      element:
        v: fullUrl
      transform:
        v: append
    target:
      context:
        v: section
      context type:
        v: variable
      element:
        v: entry
      variable:
        v: sectionEntry
    target:
      context:
        v: sectionEntry
      context type:
        v: variable
      element:
        v: reference
      transform:
        v: append
    target:
      context:
        v: entry
      context type:
        v: variable
      element:
        v: resource
      variable:
        v: diagnosticReport
      transform:
        v: create
    rule:
      name:
        v: set id
    rule:
      name:
        v: set status
    rule:
      name:
        v: set subject
    rule:
      name:
        v: set code
    rule:
      name:
        v: set specimen
    rule:
      name:
        v: set performer
    rule:
      name:
        v: set results
    rule:
      name:
        v: set code
    rule:
      name:
        v: set date

v: urn:uuid:

v: id

v: DiagnosticReport/

v: id

v: DiagnosticReport

v: labs

v: diagnosticReport

v: variable

v: id

v: copy

value:
  v: id

v: labs

v: diagnosticReport

v: variable

v: status

v: copy

value:
  v: registered

v: labs

v: diagnosticReport

v: variable

v: subject

v: subject

v: subject

v: variable

v: reference

v: append

value:
  v: Patient/

value:
  v: pid

v: labs

v: Antigen

v: antigen

v: diagnosticReport

v: variable

v: code

v: code

v: mapCodingtoCodeableConcept

v: antigen

v: code

v: labs

v: variable

v: id

v: uuid

v: bundle

v: variable

v: entry

v: entry

v: entry

v: variable

v: fullUrl

v: append

value:
  v: urn:uuid:

value:
  v: id

v: diagnosticReport

v: variable

v: specimen

v: refSpecimen

v: refSpecimen

v: variable

v: reference

v: append

value:
  v: Specimen/

value:
  v: id

v: entry

v: variable

v: resource

v: specimen

v: create

value:
  v: Specimen

v: Set idn

context:
  v: labs

context:
  v: specimen
context type:
  v: variable
element:
  v: id
transform:
  v: copy
parameter:
  value:
    v: id

v: set date

context:
  v: labs
element:
  v: SpecimenCollectionDate
variable:
  v: collectDate

context:
  v: specimen
context type:
  v: variable
element:
  v: collection
variable:
  v: collection

context:
  v: collection
context type:
  v: variable
element:
  v: collected
transform:
  v: copy
parameter:
  value:
    v: collectDate

v: set date

context:
  v: labs
element:
  v: SpecimenRecdDate
variable:
  v: recdDate

context:
  v: specimen
context type:
  v: variable
element:
  v: receivedTime
transform:
  v: copy
parameter:
  value:
    v: recdDate

v: set identifier

context:
  v: labs
element:
  v: SampleId
variable:
  v: sampleId

context:
  v: specimen
context type:
  v: variable
element:
  v: identifier
variable:
  v: identifier

context:
  v: identifier
context type:
  v: variable
element:
  v: value
transform:
  v: copy
parameter:
  value:
    v: sampleId

v: set type

context:
  v: labs
element:
  v: SampleType
variable:
  v: sampleType

context:
  v: specimen
context type:
  v: variable
element:
  v: type
transform:
  v: copy
parameter:
  value:
    v: sampleType

v: set note

context:
  v: labs
element:
  v: SpecimenNumber
variable:
  v: number

name:
  v: set note
source:
  context:
    v: number
  element:
    v: display
  variable:
    v: text
target:
  context:
    v: specimen
  context type:
    v: variable
  element:
    v: note
  variable:
    v: note
target:
  context:
    v: note
  context type:
    v: variable
  element:
    v: text
  transform:
    v: copy
  parameter:
    value:
      v: text

v: labs

v: variable

v: id

v: uuid

v: bundle

v: variable

v: entry

v: entry

v: entry

v: variable

v: fullUrl

v: append

value:
  v: urn:uuid:

value:
  v: id

v: diagnosticReport

v: variable

v: performer

v: performer

v: performer

v: variable

v: reference

v: append

value:
  v: Organization/

value:
  v: id

v: entry

v: variable

v: resource

v: perfOrg

v: create

value:
  v: Organization

v: set name

context:
  v: labs
element:
  v: LabName
variable:
  v: labName

context:
  v: perfOrg
context type:
  v: variable
element:
  v: name
transform:
  v: copy
parameter:
  value:
    v: labName

v: set id

context:
  v: labs

context:
  v: perfOrg
context type:
  v: variable
element:
  v: id
transform:
  v: copy
parameter:
  value:
    v: id

v: labs

v: variable

v: obsid

v: uuid

v: bundle

v: variable

v: entry

v: entry

v: entry

v: variable

v: fullUrl

v: append

value:
  v: urn:uuid:

value:
  v: obsid

v: diagnosticReport

v: variable

v: result

v: result

v: result

v: variable

v: reference

v: append

value:
  v: Observation/

value:
  v: obsid

v: entry

v: variable

v: resource

v: observation

v: create

value:
  v: Observation

v: set obsid

context:
  v: labs

context:
  v: observation
context type:
  v: variable
element:
  v: id
transform:
  v: copy
parameter:
  value:
    v: obsid

v: set antigen

context:
  v: labs
element:
  v: Antigen
variable:
  v: antigen

context type:
  v: variable
transform:
  v: copy
parameter:
  value:
    v: antigen

name:
  v: set obs
source:
  context:
    v: labs
  element:
    v: Results
  variable:
    v: result
target:
  context type:
    v: variable
  transform:
    v: copy
  parameter:
    value:
      v: result
dependent:
  name:
    v: createObservationResource
  variable:
    v: result
  variable:
    v: antigen
  variable:
    v: observation
  variable:
    v: pid

name:
  v: set start date
source:
  context:
    v: labs
  element:
    v: LabResultsDate
  variable:
    v: resultDate
target:
  context:
    v: observation
  context type:
    v: variable
  element:
    v: effective
  transform:
    v: copy
  parameter:
    value:
      v: resultDate

v: labs

v: Antigen

v: antigen

v: diagnosticReport

v: variable

v: code

v: copy

value:
  v: antigen

v: labs

v: LabResultsDate

v: resultDate

v: diagnosticReport

v: variable

v: effective

v: copy

value:
  v: resultDate

name:
  v: createImmunizationResource
type mode:
  v: none
input:
  name:
    v: vax
  type:
    v: SOTMeaslesVaccinationStatus
  mode:
    v: source
input:
  name:
    v: bundle
  type:
    v: Bundle
  mode:
    v: target
input:
  name:
    v: section
  type:
    v: Element
  mode:
    v: target
input:
  name:
    v: pid
  mode:
    v: source
rule:
  name:
    v: ad
  source:
    context:
      v: vax
  target:
    context type:
      v: variable
    variable:
      v: id
    transform:
      v: uuid
  target:
    context:
      v: bundle
    context type:
      v: variable
    element:
      v: entry
    variable:
      v: entry
  target:
    context:
      v: entry
    context type:
      v: variable
    element:
      v: fullUrl
    transform:
      v: append
    parameter:
      value:
        v: urn:uuid:
    parameter:
      value:
        v: id
  target:
    context:
      v: section
    context type:
      v: variable
    element:
      v: entry
    variable:
      v: sectionEntry
  target:
    context:
      v: sectionEntry
    context type:
      v: variable
    element:
      v: reference
    transform:
      v: append
    parameter:
      value:
        v: Immunization/
    parameter:
      value:
        v: id
  target:
    context:
      v: entry
    context type:
      v: variable
    element:
      v: resource
    variable:
      v: immunization
    transform:
      v: create
    parameter:
      value:
        v: Immunization
  rule:
    name:
      v: set id
    source:
      context:
        v: vax
    target:
      context:
        v: immunization
      context type:
        v: variable
      element:
        v: id
      transform:
        v: copy
  rule:
    name:
      v: set status
    source:
      context:
        v: vax
    target:
      context:
        v: immunization
      context type:
        v: variable
      element:
        v: status
      transform:
        v: copy
  rule:
    name:
      v: set
    source:
      context:
        v: vax
    target:
      context:
        v: immunization
      context type:
        v: variable
      element:
        v: vaccineCode
      variable:
        v: code
    rule:
      name:
        v: set code
  rule:
    name:
      v: set
    source:
      context:
        v: vax
      element:
        v: Source
      variable:
        v: source
    target:
      context:
        v: immunization
      context type:
        v: variable
      element:
        v: reportOrigin
      variable:
        v: origin
    rule:
      name:
        v: set report origin
  rule:
    name:
      v: set date
    source:
      context:
        v: vax
      element:
        v: LastDoseDate
      variable:
        v: date
    target:
      context:
        v: immunization
      context type:
        v: variable
      element:
        v: occurrence
      transform:
        v: copy
  rule:
    name:
      v: set dosenumber
    source:
      context:
        v: vax
      element:
        v: NumberOfDoses
      variable:
        v: doses

v: id

v: completed

v: vax

v: VaccineType

v: vaccineType

v: variable

v: copy

value:
  v: vaccineType

v: mapCodingtoCodeableConcept

v: vaccineType

v: code

v: source

v: variable

v: copy

value:
  v: source

v: mapCodingtoCodeableConcept

v: source

v: origin

v: date

name:
  v: set
source:
  context:
    v: doses
  element:
    v: display
  variable:
    v: seriesDose
target:
  context:
    v: immunization
  context type:
    v: variable
  element:
    v: protocolApplied
  variable:
    v: protocol
target:
  context:
    v: protocol
  context type:
    v: variable
  element:
    v: series
  transform:
    v: copy
  parameter:
    value:
      v: seriesDose

name:
  v: set subject
source:
  context:
    v: vax
target:
  context:
    v: immunization
  context type:
    v: variable
  element:
    v: patient
  variable:
    v: subject
target:
  context:
    v: subject
  context type:
    v: variable
  element:
    v: reference
  transform:
    v: append
  parameter:
    value:
      v: Patient/
  parameter:
    value:
      v: pid

name:
  v: mapVaccinationStatusToImmunization
type mode:
  v: none
input:
  name:
    v: lm
  type:
    v: MeaslesLogicalModel
  mode:
    v: source
input:
  name:
    v: bundle
  type:
    v: Bundle
  mode:
    v: target
input:
  name:
    v: composition
  type:
    v: MeaslesCIFComposition
  mode:
    v: target
input:
  name:
    v: pid
  mode:
    v: source
rule:
  name:
    v: set section
  source:
    context:
      v: lm
  target:
    context:
      v: composition
    context type:
      v: variable
    element:
      v: section
    variable:
      v: section
  target:
    context:
      v: section
    context type:
      v: variable
    element:
      v: title
    transform:
      v: copy
    parameter:
      value:
        v: Vaccination History
  rule:
    name:
      v: set status
    source:
      context:
        v: lm
      element:
        v: VaccinationStatus
      variable:
        v: vax
    rule:
      name:
        v: do
    rule:
      name:
        v: set
    rule:
      name:
        v: set doses
    rule:
      name:
        v: set doses
    rule:
      name:
        v: set doses

v: vax

v: NumberOfDoses

v: doses

v: code = '99'

v: variable

v: copy

value:
  v: doses

v: createImmunizationResource

v: vax

v: bundle

v: section

v: pid

v: vax

v: NumberOfDoses

v: doses

v: code = '1'

v: variable

v: copy

value:
  v: doses

v: do1

context:
  v: vax
element:
  v: LastDoseDate
variable:
  v: date

context type:
  v: variable
transform:
  v: copy
parameter:
  value:
    v: date

name:
  v: createImmunizationResource
variable:
  v: vax
variable:
  v: bundle
variable:
  v: section
variable:
  v: pid

v: vax

v: NumberOfDoses

v: doses

v: code = '2'

v: do2

context:
  v: doses

context type:
  v: variable
transform:
  v: copy
parameter:
  value:
    v: doses

name:
  v: createImmunizationResource
variable:
  v: vax
variable:
  v: bundle
variable:
  v: section
variable:
  v: pid

v: do

context:
  v: vax
element:
  v: LastDoseDate
variable:
  v: date

context type:
  v: variable
transform:
  v: copy
parameter:
  value:
    v: date

name:
  v: createImmunizationResource
variable:
  v: vax
variable:
  v: bundle
variable:
  v: section
variable:
  v: pid

v: vax

v: NumberOfDoses

v: doses

v: code = '3'

v: do

context:
  v: vax

context type:
  v: variable
transform:
  v: copy
parameter:
  value:
    v: doses

name:
  v: createImmunizationResource
variable:
  v: vax
variable:
  v: bundle
variable:
  v: section
variable:
  v: pid

v: do

context:
  v: vax

context type:
  v: variable
transform:
  v: copy
parameter:
  value:
    v: doses

name:
  v: createImmunizationResource
variable:
  v: vax
variable:
  v: bundle
variable:
  v: section
variable:
  v: pid

v: do

context:
  v: vax
element:
  v: LastDoseDate
variable:
  v: date

context type:
  v: variable
transform:
  v: copy
parameter:
  value:
    v: date

name:
  v: createImmunizationResource
variable:
  v: vax
variable:
  v: bundle
variable:
  v: section
variable:
  v: pid

v: vax

v: NumberOfDoses

v: doses

v: code = '4'

v: do

context:
  v: vax

context type:
  v: variable
transform:
  v: copy
parameter:
  value:
    v: doses

name:
  v: createImmunizationResource
variable:
  v: vax
variable:
  v: bundle
variable:
  v: section
variable:
  v: pid

v: do

context:
  v: vax

context type:
  v: variable
transform:
  v: copy
parameter:
  value:
    v: doses

name:
  v: createImmunizationResource
variable:
  v: vax
variable:
  v: bundle
variable:
  v: section
variable:
  v: pid

v: do

context:
  v: vax

context type:
  v: variable
transform:
  v: copy
parameter:
  value:
    v: doses

name:
  v: createImmunizationResource
variable:
  v: vax
variable:
  v: bundle
variable:
  v: section
variable:
  v: pid

v: do

context:
  v: vax
element:
  v: LastDoseDate
variable:
  v: date

context type:
  v: variable
transform:
  v: copy
parameter:
  value:
    v: date

name:
  v: createImmunizationResource
variable:
  v: vax
variable:
  v: bundle
variable:
  v: section
variable:
  v: pid

name:
  v: LmToComposition
type mode:
  v: none
input:
  name:
    v: lm
  type:
    v: SOTMeasles
  mode:
    v: source
input:
  name:
    v: composition
  type:
    v: Composition
  mode:
    v: target
input:
  name:
    v: cid
  mode:
    v: source
input:
  name:
    v: pid
  mode:
    v: source
input:
  name:
    v: prid
  mode:
    v: source
input:
  name:
    v: oid
  mode:
    v: source
input:
  name:
    v: eid
  mode:
    v: source
rule:
  name:
    v: set id
  source:
    context:
      v: cid
  target:
    context:
      v: composition
    context type:
      v: variable
    element:
      v: id
    transform:
      v: copy
    parameter:
      value:
        v: cid
rule:
  name:
    v: set status
  source:
    context:
      v: lm
  target:
    context:
      v: composition
    context type:
      v: variable
    element:
      v: status
    transform:
      v: copy
    parameter:
      value:
        v: final
rule:
  name:
    v: set title
  source:
    context:
      v: lm
  target:
    context:
      v: composition
    context type:
      v: variable
    element:
      v: title
    transform:
      v: copy
    parameter:
      value:
        v: PAHO Measles Case Investigation Form
rule:
  name:
    v: set type
  source:
    context:
      v: lm
  target:
    context type:
      v: variable
    variable:
      v: coding
    transform:
      v: create
    parameter:
      value:
        v: Coding
  target:
    context:
      v: coding
    context type:
      v: variable
    element:
      v: code
    transform:
      v: copy
    parameter:
      value:
        v: 55751-2
  target:
    context:
      v: coding
    context type:
      v: variable
    element:
      v: system
    transform:
      v: copy
    parameter:
      value:
        v: http://loinc.org
  target:
    context:
      v: coding
    context type:
      v: variable
    element:
      v: display
    transform:
      v: copy
    parameter:
      value:
        v: Public health Case report
  target:
    context type:
      v: variable
    variable:
      v: code
    transform:
      v: create
    parameter:
      value:
        v: CodeableConcept
  target:
    context:
      v: code
    context type:
      v: variable
    element:
      v: coding
    transform:
      v: copy
    parameter:
      value:
        v: coding
  target:
    context:
      v: composition
    context type:
      v: variable
    element:
      v: type
    transform:
      v: copy
    parameter:
      value:
        v: code
rule:
  name:
    v: set date reported local
  source:
    context:
      v: lm
    element:
      v: ReportingSource
    variable:
      v: reportingSource
  target:
    context type:
      v: variable
    transform:
      v: copy
    parameter:
      value:
        v: reportingSource

name:
  v: set date
source:
  context:
    v: reportingSource
  element:
    v: DateReportedLocal
  variable:
    v: date
target:
  context:
    v: composition
  context type:
    v: variable
  element:
    v: date
  transform:
    v: copy
  parameter:
    value:
      v: date

name:
  v: set subject
source:
  context:
    v: lm
target:
  context:
    v: composition
  context type:
    v: variable
  element:
    v: subject
  variable:
    v: subject
rule:
  name:
    v: set subject
  source:
    context:
      v: lm
  target:
    context:
      v: subject
    context type:
      v: variable
    element:
      v: reference
    transform:
      v: append
    parameter:
      value:
        v: Patient/
    parameter:
      value:
        v: pid

name:
  v: set author practitioner
source:
  context:
    v: lm
target:
  context:
    v: composition
  context type:
    v: variable
  element:
    v: author
  variable:
    v: practitioner
rule:
  name:
    v: set author practitioner
  source:
    context:
      v: lm
  target:
    context:
      v: practitioner
    context type:
      v: variable
    element:
      v: reference
    transform:
      v: append
    parameter:
      value:
        v: Practitioner/
    parameter:
      value:
        v: prid

name:
  v: set author org
source:
  context:
    v: lm
target:
  context:
    v: composition
  context type:
    v: variable
  element:
    v: author
  variable:
    v: institution
rule:
  name:
    v: set author institution
  source:
    context:
      v: lm
  target:
    context:
      v: institution
    context type:
      v: variable
    element:
      v: reference
    transform:
      v: append
    parameter:
      value:
        v: Organization/
    parameter:
      value:
        v: oid

name:
  v: set encounter
source:
  context:
    v: lm
target:
  context:
    v: composition
  context type:
    v: variable
  element:
    v: encounter
  variable:
    v: encounter
rule:
  name:
    v: set encounter
  source:
    context:
      v: lm
  target:
    context:
      v: encounter
    context type:
      v: variable
    element:
      v: reference
    transform:
      v: append
    parameter:
      value:
        v: Encounter/
    parameter:
      value:
        v: eid

name:
  v: DemographicsToPatient
type mode:
  v: none
input:
  name:
    v: demographics
  type:
    v: DemographicsLogicalModel
  mode:
    v: source
input:
  name:
    v: patient
  type:
    v: MeaslesPatient
  mode:
    v: target
input:
  name:
    v: pid
  mode:
    v: source
rule:
  name:
    v: set patient id
  source:
    context:
      v: pid
  target:
    context:
      v: patient
    context type:
      v: variable
    element:
      v: id
    transform:
      v: copy
    parameter:
      value:
        v: pid
rule:
  name:
    v: Set name
  source:
    context:
      v: demographics
    element:
      v: Name
    variable:
      v: sourceName
  target:
    context:
      v: patient
    context type:
      v: variable
    element:
      v: name
    variable:
      v: targetName
  rule:
    name:
      v: Copy name
    source:
      context:
        v: sourceName
    target:
      context type:
        v: variable
      transform:
        v: copy
    dependent:
      name:
        v: humanNameToHumanName
      variable:
        v: sourceName
      variable:
        v: targetName
rule:
  name:
    v: set date of birth
  source:
    context:
      v: demographics
    element:
      v: DateOfBirth
    variable:
      v: dob
  target:
    context:
      v: patient
    context type:
      v: variable
    element:
      v: birthDate
    transform:
      v: copy
    parameter:
      value:
        v: dob
rule:
  name:
    v: set sex
  source:
    context:
      v: demographics
    element:
      v: Sex
    variable:
      v: sex
  target:
    context:
      v: patient
    context type:
      v: variable
    element:
      v: gender
    transform:
      v: copy
    parameter:
      value:
        v: sex
rule:
  name:
    v: set CountryOfBirth
  source:
    context:
      v: demographics
    element:
      v: CountryOfBirth
    variable:
      v: cob
  target:
    context:
      v: patient
    context type:
      v: variable
    element:
      v: CountryOfBirth
    transform:
      v: copy
    parameter:
      value:
        v: cob
rule:
  name:
    v: set landmark
  source:
    context:
      v: demographics
    element:
      v: Landmark
    variable:
      v: landmark
  target:
    context:
      v: patient
    context type:
      v: variable
    element:
      v: extension
    variable:
      v: ext
  rule:
    name:
      v: set landmark value
    source:
      context:
        v: landmark
    target:
      context:
        v: ext
      context type:
        v: variable
      element:
        v: url
      transform:
        v: copy
    target:
      context:
        v: ext
      context type:
        v: variable
      element:
        v: value
      transform:
        v: copy
rule:
  name:
    v: set guardian
  source:
    context:
      v: demographics
    element:
      v: Guardian
    variable:
      v: guardian
  target:
    context:
      v: patient
    context type:
      v: variable

v: sourceName

v: landmark

v: extension

v: ext

name:
  v: set guardian value
source:
  context:
    v: guardian
target:
  context:
    v: ext
  context type:
    v: variable
  element:
    v: url
  transform:
    v: copy
  parameter:
    value:
      v: http://worldhealthorganization.github.io/smart-ot/StructureDefinition/Guardian
target:
  context:
    v: ext
  context type:
    v: variable
  element:
    v: value
  transform:
    v: copy
  parameter:
    value:
      v: guardian

name:
  v: Set contact
source:
  context:
    v: demographics
  element:
    v: Telephone
  variable:
    v: sourcePhone
target:
  context:
    v: patient
  context type:
    v: variable
  element:
    v: telecom
  variable:
    v: targetPhone
rule:
  name:
    v: Copy contact
  source:
    context:
      v: sourcePhone
  target:
    context type:
      v: variable
    transform:
      v: copy
    parameter:
      value:
        v: sourcePhone
  dependent:
    name:
      v: contactPointToContactPoint
    variable:
      v: sourcePhone
    variable:
      v: targetPhone

name:
  v: set address
source:
  context:
    v: demographics
  element:
    v: PlaceOfResidence
  variable:
    v: sourceAddress
target:
  context:
    v: patient
  context type:
    v: variable
  element:
    v: address
  variable:
    v: targetAddress
rule:
  name:
    v: Copy Address
  source:
    context:
      v: sourceAddress
  target:
    context type:
      v: variable
    transform:
      v: copy
    parameter:
      value:
        v: sourceAddress
  dependent:
    name:
      v: addressToAddress
    variable:
      v: sourceAddress
    variable:
      v: targetAddress

name:
  v: set occupation
source:
  context:
    v: demographics
  element:
    v: Occupation
  variable:
    v: occupation
target:
  context:
    v: patient
  context type:
    v: variable
  element:
    v: extension
  variable:
    v: ext
rule:
  name:
    v: set occupation value
  source:
    context:
      v: occupation
  target:
    context:
      v: ext
    context type:
      v: variable
    element:
      v: url
    transform:
      v: copy
    parameter:
      value:
        v: http://worldhealthorganization.github.io/smart-ot/StructureDefinition/Occupation
  target:
    context:
      v: ext
    context type:
      v: variable
    element:
      v: value
    transform:
      v: copy
    parameter:
      value:
        v: occupation

name:
  v: set work address
source:
  context:
    v: demographics
  element:
    v: WorkAddress
  variable:
    v: workAddress
target:
  context:
    v: patient
  context type:
    v: variable
  element:
    v: extension
  variable:
    v: ext
rule:
  name:
    v: set work address value
  source:
    context:
      v: workAddress
  target:
    context:
      v: ext
    context type:
      v: variable
    element:
      v: url
    transform:
      v: copy
    parameter:
      value:
        v: http://worldhealthorganization.github.io/smart-ot/StructureDefinition/WorkAddress
  target:
    context:
      v: ext
    context type:
      v: variable
    element:
      v: value
    transform:
      v: copy
    parameter:
      value:
        v: workAddress

name:
  v: ReportingSourceToPractitioner
type mode:
  v: none
input:
  name:
    v: reportingSource
  type:
    v: ReportingSourceLogicalModel
  mode:
    v: source
input:
  name:
    v: practitioner
  type:
    v: Practitioner
  mode:
    v: target
input:
  name:
    v: prid
  mode:
    v: source
rule:
  name:
    v: set id
  source:
    context:
      v: prid
  target:
    context:
      v: practitioner
    context type:
      v: variable
    element:
      v: id
    transform:
      v: copy
    parameter:
      value:
        v: prid
rule:
  name:
    v: set name
  source:
    context:
      v: reportingSource
    element:
      v: ReportedBy
    variable:
      v: name
  target:
    context:
      v: practitioner
    context type:
      v: variable
    element:
      v: name
    variable:
      v: humanName
  target:
    context:
      v: humanName
    context type:
      v: variable
    element:
      v: text
    transform:
      v: copy
    parameter:
      value:
        v: name

name:
  v: ReportingSourceToOrganization
type mode:
  v: none
input:
  name:
    v: reportingSource
  type:
    v: ReportingSourceLogicalModel
  mode:
    v: source
input:
  name:
    v: organization
  type:
    v: Organization
  mode:
    v: target
input:
  name:
    v: oid
  mode:
    v: source
rule:
  name:
    v: set id
  source:
    context:
      v: oid
  target:
    context:
      v: organization
    context type:
      v: variable
    element:
      v: id
    transform:
      v: copy
    parameter:
      value:
        v: oid
rule:
  name:
    v: set name
  source:
    context:
      v: reportingSource
    element:
      v: HealthServiceName
    variable:
      v: name
  target:
    context:
      v: organization
    context type:
      v: variable
    element:
      v: name
    transform:
      v: copy
    parameter:
      value:
        v: name
rule:
  name:
    v: set phone
  source:
    context:
      v: reportingSource
    element:
      v: HealthServiceTelephone
    variable:
      v: phoneSource
  target:
    context:
      v: organization
    context type:
      v: variable
    element:
      v: contact
    variable:
      v: contactDetails
  target:
    context:
      v: contactDetails
    context type:
      v: variable
    element:
      v: telecom
    variable:
      v: phoneTarget
  rule:
    name:
      v: set org contact
    source:
      context:
        v: phoneSource
    target:
      context type:
        v: variable
      transform:
        v: copy
    dependent:
      name:
        v: contactPointToContactPoint
      variable:
        v: phoneSource
      variable:
        v: phoneTarget
rule:
  name:
    v: set address
  source:
    context:
      v: reportingSource
    element:
      v: PlaceOfReporting
    variable:
      v: locationSource
  target:
    context:
      v: organization
    context type:
      v: variable
    element:
      v: contact
    variable:
      v: contactDetails
  target:
    context:
      v: contactDetails
    context type:
      v: variable
    element:
      v: address
    variable:
      v: locationTarget
  rule:
    name:
      v: set org address
    source:
      context:
        v: locationSource
    target:
      context type:
        v: variable
      transform:
        v: copy
    dependent:
      name:
        v: contactPointToContactPoint
      variable:
        v: locationSource
      variable:
        v: locationTarget

v: phoneSource

v: locationSource

name:
  v: mapEncounters
type mode:
  v: none
input:
  name:
    v: clinical
  type:
    v: SOTMeaslesClinical
  mode:
    v: source
input:
  name:
    v: bundle
  type:
    v: Bundle
  mode:
    v: target
input:
  name:
    v: section
  type:
    v: Element
  mode:
    v: target
input:
  name:
    v: pid
  mode:
    v: source
rule:
  name:
    v: dff
  source:
    context:
      v: clinical
    element:
      v: HistoryOfHospitalization
    condition:
      v: code = 'Yes'
  rule:
    name:
      v: d
    source:
      context:
        v: clinical
      element:
        v: DateOfAdmission
      variable:
        v: date
    rule:
      name:
        v: create

v: date

v: variable

v: type

v: create

value:
  v: Coding

v: type

v: variable

v: code

v: copy

value:
  v: IMP

v: type

v: variable

v: system

v: copy

v: type

v: variable

v: display

v: copy

value:
  v: inpatient encounter

v: createEncounterResource

v: date

v: bundle

v: section

v: pid

v: type

name:
  v: createEncounterResource
type mode:
  v: none
input:
  name:
    v: date
  mode:
    v: source
input:
  name:
    v: bundle
  type:
    v: Bundle
  mode:
    v: target
input:
  name:
    v: section
  type:
    v: Element
  mode:
    v: target
input:
  name:
    v: pid
  mode:
    v: source
input:
  name:
    v: type
  type:
    v: Coding
  mode:
    v: source
rule:
  name:
    v: dssd
  source:
    context:
      v: date
  target:
    context type:
      v: variable
    variable:
      v: eid
    transform:
      v: uuid
  target:
    context:
      v: bundle
    context type:
      v: variable
    element:
      v: entry
    variable:
      v: entry
  target:
    context:
      v: entry
    context type:
      v: variable
    element:
      v: fullUrl
    transform:
      v: append
    parameter:
      value:
        v: urn:uuid:
    parameter:
      value:
        v: eid
  target:
    context:
      v: section
    context type:
      v: variable
    element:
      v: entry
    variable:
      v: sectionEntry
  target:
    context:
      v: sectionEntry
    context type:
      v: variable
    element:
      v: reference
    transform:
      v: append
    parameter:
      value:
        v: Encounter/
    parameter:
      value:
        v: eid
  target:
    context:
      v: entry
    context type:
      v: variable
    element:
      v: resource
    variable:
      v: encounter
    transform:
      v: create
    parameter:
      value:
        v: Encounter
  rule:
    name:
      v: set id
    source:
      context:
        v: date
    target:
      context:
        v: encounter
      context type:
        v: variable
      element:
        v: id
      transform:
        v: copy
  rule:
    name:
      v: set status
    source:
      context:
        v: date
    target:
      context:
        v: encounter
      context type:
        v: variable
      element:
        v: status
      transform:
        v: copy
  rule:
    name:
      v: set subject
    source:
      context:
        v: pid
    target:
      context:
        v: encounter
      context type:
        v: variable
      element:
        v: subject
      variable:
        v: subject
    target:
      context:
        v: subject
      context type:
        v: variable
      element:
        v: reference
      transform:
        v: append
  rule:
    name:
      v: set date
    source:
      context:
        v: date
    target:
      context:
        v: encounter
      context type:
        v: variable
      element:
        v: period
      variable:
        v: period
    target:
      context:
        v: period
      context type:
        v: variable
      element:
        v: start
      transform:
        v: copy
  rule:
    name:
      v: set type
    source:
      context:
        v: type
    target:
      context:
        v: encounter
      context type:
        v: variable
      element:
        v: class
      transform:
        v: copy

v: eid

v: finished

v: Patient/

v: pid

v: date

value:
  v: type

name:
  v: createCompositionEncounterResource
type mode:
  v: none
input:
  name:
    v: date
  mode:
    v: source
input:
  name:
    v: pid
  mode:
    v: source
input:
  name:
    v: type
  type:
    v: Coding
  mode:
    v: source
input:
  name:
    v: eid
  mode:
    v: source
input:
  name:
    v: encounter
  type:
    v: Encounter
  mode:
    v: target
rule:
  name:
    v: set id
  source:
    context:
      v: date
  target:
    context:
      v: encounter
    context type:
      v: variable
    element:
      v: id
    transform:
      v: copy
    parameter:
      value:
        v: eid
rule:
  name:
    v: set status
  source:
    context:
      v: date
  target:
    context:
      v: encounter
    context type:
      v: variable
    element:
      v: status
    transform:
      v: copy
    parameter:
      value:
        v: finished
rule:
  name:
    v: set subject
  source:
    context:
      v: pid
  target:
    context:
      v: encounter
    context type:
      v: variable
    element:
      v: subject
    variable:
      v: subject
  target:
    context:
      v: subject
    context type:
      v: variable
    element:
      v: reference
    transform:
      v: append
    parameter:
      value:
        v: Patient/
    parameter:
      value:
        v: pid
rule:
  name:
    v: set date
  source:
    context:
      v: date
  target:
    context:
      v: encounter
    context type:
      v: variable
    element:
      v: period
    variable:
      v: period
  target:
    context:
      v: period
    context type:
      v: variable
    element:
      v: start
    transform:
      v: copy
    parameter:
      value:
        v: date
rule:
  name:
    v: set type
  source:
    context:
      v: type
  target:
    context:
      v: encounter
    context type:
      v: variable
    element:
      v: class
    transform:
      v: copy
    parameter:
      value:
        v: type