AFROMRCIFQuestionnaireToLogicalModel
type: StructureMap
node role: treeRoot
id:
  v: AFROMRCIFQuestionnaireToLogicalModel
text:
  status:
    v: generated
  div: map "http://worldhealthorganization.github.io/smart-ot/StructureMap/AFROMRCIFQuestionnaireToLogicalModel" = "AFROMRCIFQuestionnaireToLogicalModel" uses "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse" alias QuestionnaireResponse as source uses "http://worldhealthorganization.github.io/smart-ot/StructureDefinition/AFROMRCIF" alias MeaslesLogicalModel as target group MRCIFQuestionnaireToLogicalModel(source qr : QuestionnaireResponse, target measlesLm : AFROMRCIF) { qr.item as item where linkId.value in ('investigationForm') -> measlesLm as measlesLm then mapInvestigationForm(item, measlesLm) "set Investigation form"; } group mapInvestigationForm(source investigationForm, target measlesLm : AFROMRCIF) { investigationForm.item as qrReportingSource where linkId.value in ('reportingSource') -> measlesLm.ReportingSource as lmReportingSource then mapReportingSource(qrReportingSource, lmReportingSource) "set Reporting Source"; investigationForm.item as qrDemographics where linkId.value in ('demographics') -> measlesLm.Demographics as lmDemographics then mapDemographics(qrDemographics, lmDemographics) "set Demographics"; investigationForm.item as qrVaccinationStatus where linkId.value in ('vaccinationStatus') -> measlesLm.VaccinationStatus as lmVaccinationStatus then mapVaccinationStatus(qrVaccinationStatus, lmVaccinationStatus) "set Vaccination Status"; investigationForm.item as qrClinical where linkId.value in ('clinical') -> measlesLm.Clinical as lmClinical then mapClinical(qrClinical, lmClinical) "set Clinical"; investigationForm.item as qrLaboratoryResults where linkId.value in ('laboratoryResults') -> measlesLm.LaboratoryResults as lmLaboratoryResults then mapLaboratoryResults(qrLaboratoryResults, lmLaboratoryResults) "set Laboratory Results"; investigationForm.item as qrCaseInvestigation where linkId.value in ('qrCaseInvestigation') -> measlesLm.qrCaseInvestigation as lmCaseInvestigation then mapCaseInvestigation(qrCaseInvestigation, lmCaseInvestigation)…
url:
  v: http://worldhealthorganization.github.io/smart-ot/StructureMap/AFROMRCIFQuestionnaireToLogicalModel
version:
  v: 0.2.1
name:
  v: AFROMRCIFQuestionnaireToLogicalModel
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://hl7.org/fhir/StructureDefinition/QuestionnaireResponse
    link: http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse
  mode:
    v: source
  alias:
    v: QuestionnaireResponse
structure:
  url:
    v: http://worldhealthorganization.github.io/smart-ot/StructureDefinition/AFROMRCIF
    link: http://worldhealthorganization.github.io/smart-ot/StructureDefinition/AFROMRCIF
  mode:
    v: target
  alias:
    v: MeaslesLogicalModel
group:
  name:
    v: MRCIFQuestionnaireToLogicalModel
  type mode:
    v: none
  input:
    name:
      v: qr
    type:
      v: QuestionnaireResponse
    mode:
      v: source
  input:
    name:
      v: measlesLm
    type:
      v: AFROMRCIF
    mode:
      v: target
  rule:
    name:
      v: set Investigation form
    source:
      context:
        v: qr
      element:
        v: item
      variable:
        v: item
      condition:
        v: linkId.value in ('investigationForm')
    target:
      context type:
        v: variable
      variable:
        v: measlesLm
      transform:
        v: copy
    dependent:
      name:
        v: mapInvestigationForm
      variable:
        v: item
      variable:
        v: measlesLm
group:
  name:
    v: mapInvestigationForm
  type mode:
    v: none
  input:
    name:
      v: investigationForm
    mode:
      v: source
  input:
    name:
      v: measlesLm
    type:
      v: AFROMRCIF
    mode:
      v: target
  rule:
    name:
      v: set Reporting Source
    source:
      context:
        v: investigationForm
      element:
        v: item
      variable:
        v: qrReportingSource
      condition:
        v: linkId.value in ('reportingSource')
    target:
      context:
        v: measlesLm
      context type:
        v: variable
      element:
        v: ReportingSource
      variable:
        v: lmReportingSource
    dependent:
      name:
        v: mapReportingSource
      variable:
        v: qrReportingSource
      variable:
        v: lmReportingSource
  rule:
    name:
      v: set Demographics
    source:
      context:
        v: investigationForm
      element:
        v: item
      variable:
        v: qrDemographics
      condition:
        v: linkId.value in ('demographics')
    target:
      context:
        v: measlesLm
      context type:
        v: variable
      element:
        v: Demographics
      variable:
        v: lmDemographics
    dependent:
      name:
        v: mapDemographics
      variable:
        v: qrDemographics
      variable:
        v: lmDemographics
  rule:
    name:
      v: set Vaccination Status
    source:
      context:
        v: investigationForm
      element:
        v: item
      variable:
        v: qrVaccinationStatus
      condition:
        v: linkId.value in ('vaccinationStatus')
    target:
      context:
        v: measlesLm
      context type:
        v: variable
      element:
        v: VaccinationStatus
      variable:
        v: lmVaccinationStatus
    dependent:
      name:
        v: mapVaccinationStatus
      variable:
        v: qrVaccinationStatus
      variable:
        v: lmVaccinationStatus
  rule:
    name:
      v: set Clinical
    source:
      context:
        v: investigationForm
      element:
        v: item

v: measlesLm

v: qrClinical

v: linkId.value in ('clinical')

context:
  v: measlesLm
context type:
  v: variable
element:
  v: Clinical
variable:
  v: lmClinical

name:
  v: mapClinical
variable:
  v: qrClinical
variable:
  v: lmClinical

name:
  v: set Laboratory Results
source:
  context:
    v: investigationForm
  element:
    v: item
  variable:
    v: qrLaboratoryResults
  condition:
    v: linkId.value in ('laboratoryResults')
target:
  context:
    v: measlesLm
  context type:
    v: variable
  element:
    v: LaboratoryResults
  variable:
    v: lmLaboratoryResults
dependent:
  name:
    v: mapLaboratoryResults
  variable:
    v: qrLaboratoryResults
  variable:
    v: lmLaboratoryResults

name:
  v: set Contact Tracing
source:
  context:
    v: investigationForm
  element:
    v: item
  variable:
    v: qrCaseInvestigation
  condition:
    v: linkId.value in ('qrCaseInvestigation')
target:
  context:
    v: measlesLm
  context type:
    v: variable
  element:
    v: qrCaseInvestigation
  variable:
    v: lmCaseInvestigation
dependent:
  name:
    v: mapCaseInvestigation
  variable:
    v: qrCaseInvestigation
  variable:
    v: lmCaseInvestigation

name:
  v: set Classification
source:
  context:
    v: investigationForm
  element:
    v: item
  variable:
    v: qrClassification
  condition:
    v: linkId.value in ('classification')
target:
  context:
    v: measlesLm
  context type:
    v: variable
  element:
    v: Classification
  variable:
    v: lmClassification
dependent:
  name:
    v: mapClassification
  variable:
    v: qrClassification
  variable:
    v: lmClassification

name:
  v: mapReportingSource
type mode:
  v: none
input:
  name:
    v: qrReportingSource
  mode:
    v: source
input:
  name:
    v: lmReportingSource
  type:
    v: SOTMeaslesReportingSource
  mode:
    v: target
rule:
  name:
    v: set reporting source
  source:
    context:
      v: qrReportingSource
    element:
      v: item
    variable:
      v: item
  rule:
    name:
      v: set
    source:
      context:
        v: item
      element:
        v: answer
      list mode:
        v: first
      variable:
        v: caseId
      condition:
        v: item.linkId = 'caseID'
    rule:
      name:
        v: set01
  rule:
    name:
      v: set reporting institution
    source:
      context:
        v: qrReportingSource
      element:
        v: item
      variable:
        v: qrReportingInstitution
      condition:
        v: linkId.value in ('reportingInstitution')
    target:
      context type:
        v: variable
      variable:
        v: lmReportingSource
      transform:
        v: copy
    dependent:
      name:
        v: mapReportingInstitution
      variable:
        v: qrReportingInstitution
      variable:
        v: lmReportingSource
  rule:
    name:
      v: set date reported national
    source:
      context:
        v: item
      element:
        v: answer
      list mode:
        v: first
      variable:
        v: dateReportedNational
      condition:
        v: item.linkId = 'DateReportedNational'
    rule:
      name:
        v: set date reported national

v: caseId

v: value

v: value

v: lmReportingSource

v: variable

v: UniqueId

v: copy

value:
  v: value

v: lmReportingSource

v: dateReportedNational

v: value

v: value

v: lmReportingSource

v: variable

v: DateReportedNational

v: copy

value:
  v: value

name:
  v: mapReportingInstitution
type mode:
  v: none
input:
  name:
    v: qrReportingInstitution
  mode:
    v: source
input:
  name:
    v: lmReportingSource
  type:
    v: SOTMeaslesReportingSource
  mode:
    v: target
rule:
  name:
    v: set reporting institution
  source:
    context:
      v: qrReportingInstitution
    element:
      v: item
    variable:
      v: item
  rule:
    name:
      v: set health facility name
    source:
      context:
        v: item
      element:
        v: answer
      list mode:
        v: first
      variable:
        v: reportingFacility
      condition:
        v: item.linkId = 'reportingFacility'
    rule:
      name:
        v: set health facility name
  rule:
    name:
      v: set address
    source:
      context:
        v: qrReportingInstitution
    target:
      context type:
        v: variable
      variable:
        v: lmAddress
      transform:
        v: create
    rule:
      name:
        v: set country
    rule:
      name:
        v: set city
    rule:
      name:
        v: set state
    rule:
      name:
        v: set locality
    rule:
      name:
        v: assign address

v: reportingFacility

v: value

v: healthFacilityName

v: lmReportingSource

v: variable

v: HealthServiceName

v: copy

value:
  v: healthFacilityName

v: Address

v: item

v: answer

v: first

v: country

v: item.linkId = 'country'

v: set country

context:
  v: country
element:
  v: value
variable:
  v: countryValue

context:
  v: lmAddress
context type:
  v: variable
element:
  v: country
transform:
  v: copy
parameter:
  value:
    v: countryValue

v: item

v: answer

v: first

v: municipality

v: item.linkId = 'municipality'

v: set city

context:
  v: municipality
element:
  v: value
variable:
  v: cityValue

context:
  v: lmAddress
context type:
  v: variable
element:
  v: city
transform:
  v: copy
parameter:
  value:
    v: cityValue

v: item

v: answer

v: first

v: state

v: item.linkId = 'state'

v: set state

context:
  v: state
element:
  v: value
variable:
  v: stateValue

context:
  v: lmAddress
context type:
  v: variable
element:
  v: state
transform:
  v: copy
parameter:
  value:
    v: stateValue

v: item

v: answer

v: first

v: locality

v: item.linkId = 'locality'

v: set locality

context:
  v: locality
element:
  v: value
variable:
  v: localityValue

context:
  v: lmAddress
context type:
  v: variable
element:
  v: line
transform:
  v: copy
parameter:
  value:
    v: localityValue

v: qrReportingInstitution

v: lmReportingSource

v: variable

v: PlaceOfReporting

v: copy

value:
  v: lmAddress

name:
  v: mapDemographics
type mode:
  v: none
input:
  name:
    v: qrDemographics
  mode:
    v: source
input:
  name:
    v: lmDemographics
  type:
    v: SOTMeaslesDemographic
  mode:
    v: target
rule:
  name:
    v: set demographics
  source:
    context:
      v: qrDemographics
    element:
      v: item
    variable:
      v: item
  rule:
    name:
      v: set name
    source:
      context:
        v: item
      element:
        v: answer
      list mode:
        v: first
      variable:
        v: name
      condition:
        v: item.linkId = 'name'
    rule:
      name:
        v: set name
  rule:
    name:
      v: set address
    source:
      context:
        v: item
      element:
        v: answer
      list mode:
        v: first
      variable:
        v: address
      condition:
        v: item.linkId = 'address'
    rule:
      name:
        v: set address
  rule:
    name:
      v: set Locality Type
    source:
      context:
        v: item
      element:
        v: answer
      list mode:
        v: first
      variable:
        v: location
      condition:
        v: item.linkId = 'localityType'
    rule:
      name:
        v: set Locality Type
  rule:
    name:
      v: set sex
    source:
      context:
        v: item
      element:
        v: answer
      list mode:
        v: first
      variable:
        v: sex
      condition:
        v: item.linkId = 'sex'
    rule:
      name:
        v: set sex
  rule:
    name:
      v: set DoB
    source:
      context:
        v: item
      element:
        v: answer
      list mode:
        v: first
      variable:
        v: DoB
      condition:
        v: item.linkId = 'DoB'
    rule:
      name:
        v: set DoB
  rule:
    name:
      v: set ageOnset
    source:
      context:
        v: item
      element:
        v: answer
      list mode:
        v: first
      variable:
        v: ageOnset
      condition:
        v: item.linkId = 'ageOnset'
    rule:
      name:
        v: set ageOnset

v: name

v: value

v: nameValue

v: variable

v: lmName

v: create

value:
  v: HumanName

v: lmName

v: variable

v: family

v: copy

value:
  v: nameValue

v: lmDemographics

v: variable

v: Name

v: copy

value:
  v: lmName

v: address

v: value

v: value

v: variable

v: lmAddress

v: create

value:
  v: Address

v: lmAddress

v: variable

v: text

v: copy

value:
  v: value

v: lmDemographics

v: variable

v: PlaceOfResidence

v: copy

value:
  v: lmAddress

v: location

v: value

v: value

v: lmDemographics

v: variable

v: LocalityType

v: copy

value:
  v: value

v: sex

v: value

v: value

v: lmDemographics

v: variable

v: Sex

v: copy

value:
  v: value

v: DoB

v: value

v: value

v: lmDemographics

v: variable

v: DateOfBirth

v: copy

value:
  v: value

v: ageOnset

v: value

v: value

v: variable

v: lmAgeOnset

v: create

value:
  v: Quantity

v: lmAgeOnset

v: variable

v: value

v: copy

value:
  v: value

v: lmDemographics

v: variable

v: Age

v: copy

value:
  v: lmAgeOnset

name:
  v: mapVaccinationStatus
type mode:
  v: none
input:
  name:
    v: qrVaccinationStatus
  mode:
    v: source
input:
  name:
    v: lmVaccinationStatus
  type:
    v: SOTMeaslesVaccinationStatus
  mode:
    v: target
rule:
  name:
    v: set
  source:
    context:
      v: qrVaccinationStatus
    element:
      v: item
    variable:
      v: item
  rule:
    name:
      v: set last dose date
    source:
      context:
        v: item
      element:
        v: answer
      list mode:
        v: first
      variable:
        v: lastDoseDate
      condition:
        v: item.linkId = 'lastDoseDate'
    rule:
      name:
        v: set Last Dose Date
  rule:
    name:
      v: set
    source:
      context:
        v: item
      element:
        v: answer
      list mode:
        v: first
      variable:
        v: noOfDoses
      condition:
        v: item.linkId = 'noOfDoses'
    rule:
      name:
        v: set number of doses
  rule:
    name:
      v: set
    source:
      context:
        v: item
      element:
        v: answer
      list mode:
        v: first
      variable:
        v: vaccineType
      condition:
        v: item.linkId = 'vaccineType'
    rule:
      name:
        v: set vaccine type

v: lastDoseDate

v: value

v: value

v: lmVaccinationStatus

v: variable

v: LastDoseDate

v: copy

value:
  v: value

v: noOfDoses

v: value

v: value

v: lmVaccinationStatus

v: variable

v: NumberOfDoses

v: copy

value:
  v: value

v: vaccineType

v: value

v: value

v: lmVaccinationStatus

v: variable

v: VaccineType

v: copy

value:
  v: value

name:
  v: mapClinical
type mode:
  v: none
input:
  name:
    v: qrClinical
  mode:
    v: source
input:
  name:
    v: lmClinical
  type:
    v: SOTMeaslesClinical
  mode:
    v: target
rule:
  name:
    v: set clinical
  source:
    context:
      v: qrClinical
    element:
      v: item
    variable:
      v: item
  rule:
    name:
      v: set
    source:
      context:
        v: item
      element:
        v: answer
      list mode:
        v: first
      variable:
        v: fever
      condition:
        v: item.linkId = 'fever'
    rule:
      name:
        v: set Fever
  rule:
    name:
      v: set
    source:
      context:
        v: item
      element:
        v: answer
      list mode:
        v: first
      variable:
        v: rash
      condition:
        v: item.linkId = 'rash'
    rule:
      name:
        v: set Rash
  rule:
    name:
      v: set
    source:
      context:
        v: item
      element:
        v: answer
      list mode:
        v: first
      variable:
        v: cough
      condition:
        v: item.linkId = 'cough'
    rule:
      name:
        v: set Cough
  rule:
    name:
      v: set
    source:
      context:
        v: item
      element:
        v: answer
      list mode:
        v: first
      variable:
        v: conjunctivitis
      condition:
        v: item.linkId = 'conjunctivitis'
    rule:
      name:
        v: set Conjunctivitis
  rule:
    name:
      v: set
    source:
      context:
        v: item
      element:
        v: answer
      list mode:
        v: first
      variable:
        v: coryza
      condition:
        v: item.linkId = 'coryza'
    rule:
      name:
        v: set Coryza
  rule:
    name:
      v: set
    source:
      context:
        v: item
      element:
        v: answer
      list mode:
        v: first
      variable:
        v: lymphadenopathy
      condition:
        v: item.linkId = 'lymphadenopathy'
    rule:
      name:
        v: set Lymphadenopathy
  rule:
    name:
      v: set
    source:
      context:
        v: item
      element:
        v: answer
      list mode:
        v: first
      variable:
        v: jointPain
      condition:
        v: item.linkId = 'jointPain'
    rule:
      name:
        v: set Arthralgia
  rule:
    name:
      v: set
    source:
      context:
        v: item
      element:
        v: answer
      list mode:
        v: first
      variable:
        v: admitted
      condition:
        v: item.linkId = 'admitted'
    rule:
      name:
        v: set Hospitalized
  rule:
    name:
      v: set
    source:
      context:
        v: item
      element:
        v: answer
      list mode:
        v: first
      variable:
        v: admittedHCFName
      condition:
        v: item.linkId = 'admittedHCFName'
    rule:
      name:
        v: set Hospital Name
  rule:
    name:
      v: set
    source:
      context:
        v: item
      element:
        v: answer
      list mode:
        v: first
      variable:
        v: outcome
      condition:
        v: item.linkId = 'outcome'
    rule:
      name:
        v: set Outcome
  rule:
    name:
      v: set
    source:
      context:
        v: item
      element:
        v: answer

v: fever

v: value

v: value

v: lmClinical

v: variable

v: Fever

v: copy

value:
  v: value

v: rash

v: value

v: value

v: lmClinical

v: variable

v: Rash

v: copy

value:
  v: value

v: cough

v: value

v: value

v: lmClinical

v: variable

v: Cough

v: copy

value:
  v: value

v: conjunctivitis

v: value

v: value

v: lmClinical

v: variable

v: Conjunctivitis

v: copy

value:
  v: value

v: coryza

v: value

v: value

v: lmClinical

v: variable

v: Coryza

v: copy

value:
  v: value

v: lymphadenopathy

v: value

v: value

v: lmClinical

v: variable

v: Lymphadenopathy

v: copy

value:
  v: value

v: jointPain

v: value

v: value

v: lmClinical

v: variable

v: JointPain

v: copy

value:
  v: value

v: admitted

v: value

v: value

v: lmClinical

v: variable

v: HistoryOfHospitalization

v: copy

value:
  v: value

v: admittedHCFName

v: value

v: value

v: lmClinical

v: variable

v: HospitalName

v: copy

value:
  v: value

v: outcome

v: value

v: value

v: lmClinical

v: variable

v: Outcome

v: copy

value:
  v: value

v: first

v: answer

v: item.linkId = 'travelledOutside'

name:
  v: set specify virus
source:
  context:
    v: answer
  element:
    v: value
  variable:
    v: value
target:
  context:
    v: lmClinical
  context type:
    v: variable
  element:
    v: travelledOutside
  transform:
    v: copy
  parameter:
    value:
      v: value

name:
  v: set
source:
  context:
    v: item
  element:
    v: answer
  list mode:
    v: first
  variable:
    v: answer
  condition:
    v: item.linkId = 'infectionSetting'
rule:
  name:
    v: set specify virus
  source:
    context:
      v: answer
    element:
      v: value
    variable:
      v: value
  target:
    context:
      v: lmClinical
    context type:
      v: variable
    element:
      v: specifyInfectionSetting
    transform:
      v: copy
    parameter:
      value:
        v: value

name:
  v: mapLaboratoryResults
type mode:
  v: none
input:
  name:
    v: qrLaboratoryResults
  mode:
    v: source
input:
  name:
    v: lmLaboratoryResults
  type:
    v: LaboratoryResultsLogicalModel
  mode:
    v: target
rule:
  name:
    v: set labs
  source:
    context:
      v: qrLaboratoryResults
    element:
      v: item
    variable:
      v: item
  rule:
    name:
      v: set
    source:
      context:
        v: item
      element:
        v: answer
      list mode:
        v: first
      variable:
        v: answer
      condition:
        v: item.linkId = 'sampleType'
    rule:
      name:
        v: set SampleType
  rule:
    name:
      v: set
    source:
      context:
        v: item
      element:
        v: answer
      list mode:
        v: first
      variable:
        v: answer
      condition:
        v: item.linkId = 'collectionDate'
    rule:
      name:
        v: set SpecimenCollectionDate
  rule:
    name:
      v: set
    source:
      context:
        v: item
      element:
        v: answer
      list mode:
        v: first
      variable:
        v: answer
      condition:
        v: item.linkId = 'labName'
    rule:
      name:
        v: set Shipment Date
  rule:
    name:
      v: set
    source:
      context:
        v: item
      element:
        v: answer
      list mode:
        v: first
      variable:
        v: answer
      condition:
        v: item.linkId = 'specimenSentDate'
    rule:
      name:
        v: set SpecimenSentDate
  rule:
    name:
      v: set
    source:
      context:
        v: item
      element:
        v: answer
      list mode:
        v: first
      variable:
        v: answer
      condition:
        v: item.linkId = 'specimenReceivedDate'
    rule:
      name:
        v: set SpecimenRecdDate
  rule:
    name:
      v: set
    source:
      context:
        v: item
      element:
        v: answer
      list mode:
        v: first
      variable:
        v: answer
      condition:
        v: item.linkId = 'testPerformed'
    rule:
      name:
        v: set TypeOfTest
  rule:
    name:
      v: set
    source:
      context:
        v: item
      element:
        v: answer
      list mode:
        v: first
      variable:
        v: answer
      condition:
        v: item.linkId = 'result'
    rule:
      name:
        v: set Results
  rule:
    name:
      v: set
    source:
      context:
        v: item
      element:
        v: answer
      list mode:
        v: first
      variable:
        v: answer
      condition:
        v: item.linkId = 'specifyVirus'
    rule:
      name:
        v: set specify virus

v: answer

v: value

v: value

v: lmLaboratoryResults

v: variable

v: SampleType

v: copy

value:
  v: value

v: answer

v: value

v: value

v: lmLaboratoryResults

v: variable

v: SpecimenCollectionDate

v: copy

value:
  v: value

v: answer

v: value

v: value

v: lmLaboratoryResults

v: variable

v: LabName

v: copy

value:
  v: value

v: answer

v: value

v: value

v: lmLaboratoryResults

v: variable

v: SpecimenSentDate

v: copy

value:
  v: value

v: answer

v: value

v: value

v: lmLaboratoryResults

v: variable

v: SpecimenRecdDate

v: copy

value:
  v: value

v: answer

v: value

v: value

v: lmLaboratoryResults

v: variable

v: TypeOfTest

v: copy

value:
  v: value

v: answer

v: value

v: value

v: lmLaboratoryResults

v: variable

v: Results

v: copy

value:
  v: value

v: answer

v: value

v: value

v: lmLaboratoryResults

v: variable

v: ViralGenotype

v: copy

value:
  v: value

name:
  v: mapCaseInvestigation
type mode:
  v: none
input:
  name:
    v: qrCaseInvestigation
  mode:
    v: source
input:
  name:
    v: lmCaseInvestigation
  type:
    v: SOTMeaslesCaseInvestigation
  mode:
    v: target
rule:
  name:
    v: set contact tracing
  source:
    context:
      v: qrCaseInvestigation
    element:
      v: item
    variable:
      v: item
  rule:
    name:
      v: set date of consultation
    source:
      context:
        v: item
      element:
        v: answer
      list mode:
        v: first
      variable:
        v: dateOfConsultation
      condition:
        v: item.linkId = 'DateOfConsultation'
    rule:
      name:
        v: set date of consultation
  rule:
    name:
      v: set date reported local
    source:
      context:
        v: item
      element:
        v: answer
      list mode:
        v: first
      variable:
        v: dateReportedLocal
      condition:
        v: item.linkId = 'dateReported'
    rule:
      name:
        v: set date reported local
  rule:
    name:
      v: set
    source:
      context:
        v: item
      element:
        v: answer
      list mode:
        v: first
      variable:
        v: rashOnsetDate
      condition:
        v: item.linkId = 'rashOnsetDate'
    rule:
      name:
        v: set Rash Onset Date

v: dateOfConsultation

v: value

v: value

v: lmReportingSource

v: variable

v: DateOfConsultation

v: copy

value:
  v: value

v: dateReportedLocal

v: value

v: value

v: lmReportingSource

v: variable

v: DateReportedLocal

v: copy

value:
  v: value

v: rashOnsetDate

v: value

v: value

v: lmClinical

v: variable

v: RashOnsetDate

v: copy

value:
  v: value

name:
  v: mapClassification
type mode:
  v: none
input:
  name:
    v: qrClassification
  mode:
    v: source
input:
  name:
    v: lmClassification
  type:
    v: ClassificationLogicalModel
  mode:
    v: target
rule:
  name:
    v: set classification
  source:
    context:
      v: qrClassification
    element:
      v: item
    variable:
      v: item
  rule:
    name:
      v: set
    source:
      context:
        v: item
      element:
        v: answer
      list mode:
        v: first
      variable:
        v: answer
      condition:
        v: item.linkId = 'finalClassification'
    rule:
      name:
        v: set finalClassification
  rule:
    name:
      v: set case ID
    source:
      context:
        v: item
      element:
        v: answer
      list mode:
        v: first
      variable:
        v: reportedBy
      condition:
        v: item.linkId = 'reportedBy'
    rule:
      name:
        v: set case ID

v: answer

v: value

v: value

v: lmClassification

v: variable

v: FinalClassification

v: copy

value:
  v: value

v: reportedBy

v: value

v: value

v: lmClassification

v: variable

v: ReportedBy

v: copy

value:
  v: value