HL7 Australia Implementation Guide: home
Logical Model Mappings FHIR Resources HL7 V2.4 Messaging

Prostate Map

Thise is the mapping between FHIR resources and the Prostate Logical Model. For context, see the explanation of how this guide works.

Summary

Defining URL:http://fhir.hl7.org.au/fhir/rcpa/StructureMap/ProstateMap
Name:Prostate --> DiagnosticReport Mapping
Source Resource XML / JSON / Turtle

Content

SourceTarget
Input: Prostate
Prostatenew DiagnosticReport
Prostate.subjectDiagnosticReport.subject
Prostate.requesternew ProcedureRequest, ProcedureRequest.requester.agent
Prostate.performerDiagnosticReport.performer.actor
Prostate.preAnalyticnew Observation, Observation.code = http://cap.org/protocols#28562.1000043
Prostate.preAnalytic.clinicalInformationnew ProcedureRequest, ProcedureRequest.reasonCode.text
Prostate.preAnalytic.natureOfSpecimennew Observation.value (code = LOINC#22633-2(Pathology report site of origin Narrative))
Prostate.preAnalytic.clinicalHistorynew Observation.value (code = LOINC#55752-0(Clinical information))
Prostate.preAnalytic.previousTherapynew Observation.value (code = LOINC#81167-9(Cancer treatment --preoperative))
Prostate.preAnalytic.psanew Observation.value (code = LOINC#2857-1(Prostate specific Ag [Mass/volume] in Serum or Plasma))
Prostate.preAnalytic.stagingInfonew Observation.value (code = http://cap.org/protocols#29006.1000043)
Prostate.preAnalytic.pathologyAccessionNumbernew Observation.value (code = LOINC#57723-9 (Unique bar code number of Current sample))
Prostate.preAnalytic.principalCliniciannew Specimen, Specimen.collection.collector
Prostate.preAnalytic.commentsnew Observation.value (code = LOINC#8251-1(Service comment))
Prostate.macronew Observation, Observation.code = http://cap.org/protocols#28858.1000043
Prostate.macro.specimenWeightnew Observation.value (code = LOINC#29638-4(Weight of Tissue))
Prostate.macro.specimenDimension1new Observation.value (code = http://cap.org/protocols#29016.1000043)
Prostate.macro.specimenDimension2new Observation.value (code = http://cap.org/protocols#29016.1000043)
Prostate.macro.specimenDimension3new Observation.value (code = http://cap.org/protocols#29016.1000043)
Prostate.macro.seminalVesiclesnew Observation.value (--> CodeableConcept) (code = http://cap.org/protocols#28513.1000043)
Prostate.macro.lymphNodesnew Observation, Observation.code = http://cap.org/protocols#28866.1000043
Prostate.macro.lymphNodes.codenew Observation.value (--> CodeableConcept) (code = http://cap.org/protocols#28866.1000043)
Prostate.macro.lymphNodes.lateralitynew Observation.value (--> CodeableConcept) (code = LOINC#20228-3(Anatomic part Laterality))
Prostate.macro.lymphNodes.sitenew Observation.value (code = LOINC#39111-0(Body site))
Prostate.macro.lymphNodes.numLymphNodesnew Observation.value (--> Quantity) (code = LOINC#21894-1(Regional lymph nodes examined [#] Specimen))
Prostate.macro.lymphNodes.numLymphNodesPositivenew Observation.value (--> Quantity) (code = LOINC#21893-3(Regional lymph nodes positive [#] Specimen))
Prostate.macro.blockIdentificationKeynew Observation.value (code = LOINC#81178-6(Tissue block description and site Narrative))
Prostate.macro.otherMacroCommentsnew Observation.value (code = LOINC#22634-0 (Pathology report gross observation Narrative))
Prostate.micronew Observation, Observation.code = http://cap.org/protocols#28869.1000043
Prostate.micro.tumourTypenew Observation.value (--> CodeableConcept) (code = LOINC#44639-3(Histologic type in Prostate tumor by CAP cancer protocols))
Prostate.micro.tumourFocalitynew Observation.value (code = http://cap.org/protocols#??)
Prostate.micro.tumourLocationnew Observation, Observation.code = http://cap.org/protocols#28271.1000043
Prostate.micro.tumourLocation.quadrantnew Observation.value (--> CodeableConcept) (code = http://cap.org/protocols#28272.1000043)
Prostate.micro.tumourLocation.planenew Observation.value (--> CodeableConcept) (code = http://cap.org/protocols#28469.1000043)
Prostate.micro.tumourLocation.otherNodulenew Observation, Observation.code = http://cap.org/protocols#??
Prostate.micro.tumourLocation.otherNodule.codenew Observation.value (--> CodeableConcept) (code = http://cap.org/protocols#??)
Prostate.micro.tumourLocation.otherNodule.quadrantnew Observation.value (--> CodeableConcept) (code = http://cap.org/protocols#28487.1000043)
Prostate.micro.tumourLocation.otherNodule.planenew Observation.value (--> CodeableConcept) (code = http://cap.org/protocols#28497.1000043)
Prostate.micro.intraglandularExtentnew Observation.value (code = http://cap.org/protocols#28906.1000043)
Prostate.micro.sizeDominantNodulenew Observation.value (code = LOINC#44657-5(Dominant nodule.maximum.dimension in Prostate tumor by CAP cancer protocols))
Prostate.micro.histologicalGradenew Observation, Observation.code = http://cap.org/protocols#28880.1000043
Prostate.micro.histologicalGrade.primarynew Observation.value (--> CodeableConcept) (code = LOINC#44641-9(Gleason pattern.primary in Prostate tumor by CAP cancer protocols))
Prostate.micro.histologicalGrade.secondarynew Observation.value (code = LOINC#44642-7(Gleason pattern.secondary in Prostate tumor by CAP cancer protocols))
Prostate.micro.histologicalGrade.tertiarynew Observation.value (code = LOINC#44643-5(Gleason pattern.tertiary in Prostate tumor by CAP cancer protocols))
Prostate.micro.histologicalGrade.scorenew Observation.value (code = LOINC#35266-6(Gleason score in Specimen Qualitative))
Prostate.micro.extraprostaticExtensionnew Observation, Observation.code = LOINC#44627-8(Extraprostatic extension by CAP cancer protocols)
Prostate.micro.extraprostaticExtension.codenew Observation.value (--> CodeableConcept) (code = LOINC#44627-8(Extraprostatic extension by CAP cancer protocols))
Prostate.micro.extraprostaticExtension.extentnew Observation.value (--> CodeableConcept) (code = http://cap.org/protocols#28911.1000043)
Prostate.micro.extraprostaticExtension.locationnew Observation.value (--> CodeableConcept) (code = http://cap.org/protocols#28566.1000043)
Prostate.micro.extraprostaticExtension.commentnew Observation.value (code = http://cap.org/protocols#??)
Prostate.micro.marginnew Observation, Observation.code = http://cap.org/protocols#28929.1000043
Prostate.micro.margin.statusnew Observation.value (--> CodeableConcept) (code = LOINC#44670-8(Margin involvement in Prostate tumor by CAP cancer protocols))
Prostate.micro.margin.locationCodenew Observation.value (--> CodeableConcept) (code = LOINC#44678-1(Margin(s) involved by invasive carcinoma in Prostate tumor by CAP cancer protocols))
Prostate.micro.margin.locationDescriptionnew Observation.value (code = http://cap.org/protocols#??)
Prostate.micro.margin.extentnew Observation.value (code = LOINC#21891-7 (Extent of disease Prostate cancer))
Prostate.micro.margin.scorenew Observation.value (code = http://cap.org/protocols#28516.1000043)
Prostate.micro.margin.positivitynew Observation.value (--> CodeableConcept) (code = http://cap.org/protocols#28520.1000043)
Prostate.micro.seminalVesiclesnew Observation.value (--> CodeableConcept) (code = LOINC#44626-0 (Seminal vesicle invasion by CAP cancer protocols))
Prostate.micro.bladderNecknew Observation.value (--> CodeableConcept) (code = http://cap.org/protocols#28975.1000043)
Prostate.micro.lymphNodeStatusnew Observation, Observation.code = http://cap.org/protocols#28965.1000043
Prostate.micro.lymphNodeStatus.numbernew Observation.value (code = LOINC#44621-1(Deprecated Regional lymph nodes examined by CAP cancer protocols))
Prostate.micro.lymphNodeStatus.numberPositivenew Observation.value (code = LOINC#21893-3(Regional lymph nodes positive [#] Specimen))
Prostate.micro.lymphNodeStatus.lateralitynew Observation.value (--> CodeableConcept) (code = LOINC#20228-3(Anatomic part Laterality))
Prostate.micro.lymphNodeStatus.sitesInvolvednew Observation.value (code = LOINC#21892-5(Lymph node involvement Cancer))
Prostate.micro.lymphNodeStatus.maxDimensionnew Observation.value (code = LOINC#33728-7(Size.maximum dimension in Tumor by CAP cancer protocols))
Prostate.micro.lymphNodeStatus.invasionnew Observation.value (--> CodeableConcept) (code = LOINC#59544-7(Lymph-vascular invasion Cancer))
Prostate.micro.addtionalCommentnew Observation.value (code = LOINC#22635-7(Pathology report microscopic observation Narrative Other stain))
Prostate.synthesisOverviewnew Observation, Observation.code = http://cap.org/protocols#28527.1000043
Prostate.synthesisOverview.tumourStageTnew Observation.value (--> CodeableConcept) (code = LOINC#21899-0(Primary tumor.pathology Cancer))
Prostate.synthesisOverview.tumourStageNnew Observation.value (--> CodeableConcept) (code = LOINC#21900-6(Regional lymph nodes.pathology [Class] Cancer))
Prostate.synthesisOverview.tumourStageMnew Observation.value (--> CodeableConcept) (code = LOINC#67211-3 (TNM pathologic staging - distant metastases - M [PhenX]))
Prostate.synthesisOverview.diagnosticSummarynew Observation.value (code = LOINC#34574-4(Pathology report final diagnosis))
Prostate.synthesisOverview.overarchingCommentnew Observation.value (code = LOINC#22638-1(Pathology report comments [Interpretation] Narrative))

Script

map "http://fhir.hl7.org.au/fhir/rcpa/StructureMap/ProstateMap" = "Prostate --> DiagnosticReport Mapping"

uses "http://fhir.hl7.org.au/fhir/rcpa/StructureDefinition/Prostate" as source

group for types Prostate
  input source : Prostate as source

  Prostate : for source make  create("DiagnosticReport") as cdr,  cdr.status = "final",  cdr.code = cc("http://snomed.info/sct", "todo") then {
    Prostate.subject : for source.subject : Reference 1..1 as v make cdr.subject = v
    Prostate.requester : for source.requester : Reference 0..1 as v make  create("ProcedureRequest") as do,  cdr.request = reference(do),  do.subject = ("source.subject"),  do.requester as prr,  prr.agent = v
    Prostate.performer : for source.performer : Reference 0..1 as v make  cdr.performer as pr,  pr.actor = v
    Prostate.preAnalytic : for source.preAnalytic : code 0..1 as spa make  create("Observation") as tpa,  cdr.result = reference(tpa),  tpa.subject = ("source.subject"),  tpa.status = "final",  tpa.code = cc("http://cap.org/protocols", "28562.1000043") then {
      Prostate.preAnalytic.clinicalInformation : for spa.clinicalInformation as v make  create("ProcedureRequest") as do,  do.reasonCode as dr,  dr.text = v
      Prostate.preAnalytic.natureOfSpecimen : for spa.natureOfSpecimen : code 0..1 as v make  create("Observation") as obs,  tpa.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://loinc.org", "22633-2"),  obs.value = v
      Prostate.preAnalytic.clinicalHistory : for spa.clinicalHistory : code 0..1 as v make  create("Observation") as obs,  tpa.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://loinc.org", "55752-0"),  obs.value = v
      Prostate.preAnalytic.previousTherapy : for spa.previousTherapy : code 0..1 as v make  create("Observation") as obs,  tpa.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://loinc.org", "81167-9"),  obs.value = v
      Prostate.preAnalytic.psa : for spa.psa : code 0..1 as v make  create("Observation") as obs,  tpa.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://loinc.org", "2857-1"),  obs.value = v
      Prostate.preAnalytic.stagingInfo : for spa.stagingInfo : code 0..1 as v make  create("Observation") as obs,  tpa.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://cap.org/protocols", "29006.1000043"),  obs.value = v
      Prostate.preAnalytic.pathologyAccessionNumber : for spa.pathologyAccessionNumber : code 0..1 as v make  create("Observation") as obs,  tpa.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://loinc.org", "57723-9 "),  obs.value = v
      Prostate.preAnalytic.principalClinician : for spa.principalClinician : Reference 0..1 as v make  create("Specimen") as sp,  cdr.specimen = reference(sp),  sp.subject = ("source.subject"),  sp.collection as tc,  tc.collector = v
      Prostate.preAnalytic.comments : for spa.comments : code 0..1 as v make  create("Observation") as obs,  tpa.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://loinc.org", "8251-1"),  obs.value = v
    }

    Prostate.macro : for source.macro : code 0..1 as sma make  create("Observation") as tma,  cdr.result = reference(tma),  tma.subject = ("source.subject"),  tma.status = "final",  tma.code = cc("http://cap.org/protocols", "28858.1000043") then {
      Prostate.macro.specimenWeight : for sma.specimenWeight : code 0..1 as v make  create("Observation") as obs,  tma.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://loinc.org", "29638-4"),  obs.value = v
      Prostate.macro.specimenDimension1 : for sma.specimenDimension1 : code 0..1 as v make  create("Observation") as obs,  tma.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://cap.org/protocols", "29016.1000043"),  obs.value = v
      Prostate.macro.specimenDimension2 : for sma.specimenDimension2 : code 0..1 as v make  create("Observation") as obs,  tma.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://cap.org/protocols", "29016.1000043"),  obs.value = v
      Prostate.macro.specimenDimension3 : for sma.specimenDimension3 : code 0..1 as v make  create("Observation") as obs,  tma.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://cap.org/protocols", "29016.1000043"),  obs.value = v
      Prostate.macro.seminalVesicles : for sma.seminalVesicles : code 0..1 as v make  create("Observation") as obs,  tma.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://cap.org/protocols", "28513.1000043"),  obs.value = cc("http://fhir.hl7.org.au/fhir/rcpa/ValueSet/prostate-rad-seminal-vesicles-macro", v)
      Prostate.macro.lymphNodes : for sma.lymphNodes : code 0..1 as sln make  create("Observation") as tln,  tma.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(tln),  tln.subject = ("source.subject"),  tln.status = "final",  tln.code = cc("http://cap.org/protocols", "28866.1000043") then {
        Prostate.macro.lymphNodes.code : for sln.code : code 0..1 as v make  create("Observation") as obs,  tln.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://cap.org/protocols", "28866.1000043"),  obs.value = cc("http://fhir.hl7.org.au/fhir/rcpa/ValueSet/present-absent-na", v)
        Prostate.macro.lymphNodes.laterality : for sln.laterality : code 0..1 as v make  create("Observation") as obs,  tln.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://loinc.org", "20228-3"),  obs.value = cc("http://fhir.hl7.org.au/fhir/rcpa/ValueSet/laterality", v)
        Prostate.macro.lymphNodes.site : for sln.site : code 0..1 as v make  create("Observation") as obs,  tln.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://loinc.org", "39111-0"),  obs.value = v
        Prostate.macro.lymphNodes.numLymphNodes : for sln.numLymphNodes : code 0..1 as v make  create("Observation") as obs,  tln.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://loinc.org", "21894-1"),  obs.value = qty(v, "")
        Prostate.macro.lymphNodes.numLymphNodesPositive : for sln.numLymphNodesPositive : code 0..1 as v make  create("Observation") as obs,  tln.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://loinc.org", "21893-3"),  obs.value = qty(v, "")
      }

      Prostate.macro.blockIdentificationKey : for sma.blockIdentificationKey : code 0..1 as v make  create("Observation") as obs,  tma.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://loinc.org", "81178-6"),  obs.value = v
      Prostate.macro.otherMacroComments : for sma.otherMacroComments : code 0..1 as v make  create("Observation") as obs,  tma.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://loinc.org", "22634-0 "),  obs.value = v
    }

    Prostate.micro : for source.micro : code 0..1 as smi make  create("Observation") as tmi,  cdr.result = reference(tmi),  tmi.subject = ("source.subject"),  tmi.status = "final",  tmi.code = cc("http://cap.org/protocols", "28869.1000043") then {
      Prostate.micro.tumourType : for smi.tumourType : code 0..1 as v make  create("Observation") as obs,  tmi.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://loinc.org", "44639-3"),  obs.value = cc("http://fhir.hl7.org.au/fhir/rcpa/ValueSet/prostate-rad-tumour-type", v)
      Prostate.micro.tumourFocality : for smi.tumourFocality : code 0..1 as v make  create("Observation") as obs,  tmi.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://cap.org/protocols", "??"),  obs.value = v
      Prostate.micro.tumourLocation : for smi.tumourLocation : code 0..1 as stl make  create("Observation") as ttl,  tmi.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(ttl),  ttl.subject = ("source.subject"),  ttl.status = "final",  ttl.code = cc("http://cap.org/protocols", "28271.1000043") then {
        Prostate.micro.tumourLocation.quadrant : for stl.quadrant : code 0..1 as v make  create("Observation") as obs,  ttl.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://cap.org/protocols", "28272.1000043"),  obs.value = cc("http://fhir.hl7.org.au/fhir/rcpa/ValueSet/nodule-location", v)
        Prostate.micro.tumourLocation.plane : for stl.plane : code 0..1 as v make  create("Observation") as obs,  ttl.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://cap.org/protocols", "28469.1000043"),  obs.value = cc("http://fhir.hl7.org.au/fhir/rcpa/ValueSet/prostate-rad-nodule-plane", v)
        Prostate.micro.tumourLocation.otherNodule : for stl.otherNodule : code 0..1 as son make  create("Observation") as ton,  ttl.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(ton),  ton.subject = ("source.subject"),  ton.status = "final",  ton.code = cc("http://cap.org/protocols", "??") then {
          Prostate.micro.tumourLocation.otherNodule.code : for son.code : code 0..1 as v make  create("Observation") as obs,  ton.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://cap.org/protocols", "??"),  obs.value = cc("http://fhir.hl7.org.au/fhir/rcpa/ValueSet/present-absent", v)
          Prostate.micro.tumourLocation.otherNodule.quadrant : for son.quadrant : code 0..1 as v make  create("Observation") as obs,  ton.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://cap.org/protocols", "28487.1000043"),  obs.value = cc("http://fhir.hl7.org.au/fhir/rcpa/ValueSet/nodule-location", v)
          Prostate.micro.tumourLocation.otherNodule.plane : for son.plane : code 0..1 as v make  create("Observation") as obs,  ton.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://cap.org/protocols", "28497.1000043"),  obs.value = cc("http://fhir.hl7.org.au/fhir/rcpa/ValueSet/prostate-rad-nodule-plane", v)
        }

      }

      Prostate.micro.intraglandularExtent : for smi.intraglandularExtent : code 0..1 as v make  create("Observation") as obs,  tmi.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://cap.org/protocols", "28906.1000043"),  obs.value = v
      Prostate.micro.sizeDominantNodule : for smi.sizeDominantNodule : code 0..1 as v make  create("Observation") as obs,  tmi.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://loinc.org", "44657-5"),  obs.value = v
      Prostate.micro.histologicalGrade : for smi.histologicalGrade : code 0..1 as shg make  create("Observation") as thg,  tmi.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(thg),  thg.subject = ("source.subject"),  thg.status = "final",  thg.code = cc("http://cap.org/protocols", "28880.1000043") then {
        Prostate.micro.histologicalGrade.primary : for shg.primary : code 0..1 as v make  create("Observation") as obs,  thg.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://loinc.org", "44641-9"),  obs.value = cc("http://fhir.hl7.org.au/fhir/rcpa/ValueSet/gleeson-grade-primary", v)
        Prostate.micro.histologicalGrade.secondary : for shg.secondary : code 0..1 as v make  create("Observation") as obs,  thg.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://loinc.org", "44642-7"),  obs.value = v
        Prostate.micro.histologicalGrade.tertiary : for shg.tertiary : code 0..1 as v make  create("Observation") as obs,  thg.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://loinc.org", "44643-5"),  obs.value = v
        Prostate.micro.histologicalGrade.score : for shg.score : code 0..1 as v make  create("Observation") as obs,  thg.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://loinc.org", "35266-6"),  obs.value = v
      }

      Prostate.micro.extraprostaticExtension : for smi.extraprostaticExtension : code 0..1 as spe make  create("Observation") as tpe,  tmi.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(tpe),  tpe.subject = ("source.subject"),  tpe.status = "final",  tpe.code = cc("http://loinc.org", "44627-8") then {
        Prostate.micro.extraprostaticExtension.code : for spe.code : code 0..1 as v make  create("Observation") as obs,  tpe.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://loinc.org", "44627-8"),  obs.value = cc("http://fhir.hl7.org.au/fhir/rcpa/ValueSet/prostate-rad-extraprostatic-extension", v)
        Prostate.micro.extraprostaticExtension.extent : for spe.extent : code 0..1 as v make  create("Observation") as obs,  tpe.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://cap.org/protocols", "28911.1000043"),  obs.value = cc("http://fhir.hl7.org.au/fhir/rcpa/ValueSet/focal-non-focal", v)
        Prostate.micro.extraprostaticExtension.location : for spe.location : code 0..1 as v make  create("Observation") as obs,  tpe.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://cap.org/protocols", "28566.1000043"),  obs.value = cc("http://fhir.hl7.org.au/fhir/rcpa/ValueSet/prostate-rad-tumour-locations", v)
        Prostate.micro.extraprostaticExtension.comment : for spe.comment : code 0..1 as v make  create("Observation") as obs,  tpe.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://cap.org/protocols", "??"),  obs.value = v
      }

      Prostate.micro.margin : for smi.margin : code 0..1 as smg make  create("Observation") as tmg,  tmi.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(tmg),  tmg.subject = ("source.subject"),  tmg.status = "final",  tmg.code = cc("http://cap.org/protocols", "28929.1000043") then {
        Prostate.micro.margin.status : for smg.status : code 0..1 as v make  create("Observation") as obs,  tmg.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://loinc.org", "44670-8"),  obs.value = cc("http://fhir.hl7.org.au/fhir/rcpa/ValueSet/margin-status", v)
        Prostate.micro.margin.locationCode : for smg.locationCode : code 0..1 as v make  create("Observation") as obs,  tmg.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://loinc.org", "44678-1"),  obs.value = cc("http://fhir.hl7.org.au/fhir/rcpa/ValueSet/prostate-rad-tumour-locations", v)
        Prostate.micro.margin.locationDescription : for smg.locationDescription : code 0..1 as v make  create("Observation") as obs,  tmg.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://cap.org/protocols", "??"),  obs.value = v
        Prostate.micro.margin.extent : for smg.extent : code 0..1 as v make  create("Observation") as obs,  tmg.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://loinc.org", "21891-7 "),  obs.value = v
        Prostate.micro.margin.score : for smg.score : code 0..1 as v make  create("Observation") as obs,  tmg.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://cap.org/protocols", "28516.1000043"),  obs.value = v
        Prostate.micro.margin.positivity : for smg.positivity : code 0..1 as v make  create("Observation") as obs,  tmg.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://cap.org/protocols", "28520.1000043"),  obs.value = cc("http://fhir.hl7.org.au/fhir/rcpa/ValueSet/prostate-rad-margin-positivity", v)
      }

      Prostate.micro.seminalVesicles : for smi.seminalVesicles : code 0..1 as v make  create("Observation") as obs,  obs.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://loinc.org", "44626-0 "),  obs.value = cc("http://fhir.hl7.org.au/fhir/rcpa/ValueSet/prostate-rad-seminal-vesicles-micro", v)
      Prostate.micro.bladderNeck : for smi.bladderNeck : code 0..1 as v make  create("Observation") as obs,  obs.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://cap.org/protocols", "28975.1000043"),  obs.value = cc("http://fhir.hl7.org.au/fhir/rcpa/ValueSet/prostate-rad-bladder-neck", v)
      Prostate.micro.lymphNodeStatus : for smi.lymphNodeStatus : code 0..1 as slns make  create("Observation") as tlns,  tmi.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(tlns),  tlns.subject = ("source.subject"),  tlns.status = "final",  tlns.code = cc("http://cap.org/protocols", "28965.1000043") then {
        Prostate.micro.lymphNodeStatus.number : for slns.number : code 0..1 as v make  create("Observation") as obs,  tlns.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://loinc.org", "44621-1"),  obs.value = v
        Prostate.micro.lymphNodeStatus.numberPositive : for slns.numberPositive : code 0..1 as v make  create("Observation") as obs,  tlns.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://loinc.org", "21893-3"),  obs.value = v
        Prostate.micro.lymphNodeStatus.laterality : for slns.laterality : code 0..1 as v make  create("Observation") as obs,  tlns.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://loinc.org", "20228-3"),  obs.value = cc("http://fhir.hl7.org.au/fhir/rcpa/ValueSet/laterality", v)
        Prostate.micro.lymphNodeStatus.sitesInvolved : for slns.sitesInvolved : code 0..1 as v make  create("Observation") as obs,  tlns.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://loinc.org", "21892-5"),  obs.value = v
        Prostate.micro.lymphNodeStatus.maxDimension : for slns.maxDimension : code 0..1 as v make  create("Observation") as obs,  tlns.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://loinc.org", "33728-7"),  obs.value = v
        Prostate.micro.lymphNodeStatus.invasion : for slns.invasion : code 0..1 as v make  create("Observation") as obs,  tlns.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://loinc.org", "59544-7"),  obs.value = cc("http://fhir.hl7.org.au/fhir/rcpa/ValueSet/notidentified-present-indeterminate", v)
      }

      Prostate.micro.addtionalComment : for smi.addtionalComment : code 0..1 as v make  create("Observation") as obs,  tmi.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://loinc.org", "22635-7"),  obs.value = v
    }

    Prostate.synthesisOverview : for source.synthesisOverview : code 0..1 as sso make  create("Observation") as tto,  cdr.result = reference(tto),  tto.subject = ("source.subject"),  tto.status = "final",  tto.code = cc("http://cap.org/protocols", "28527.1000043") then {
      Prostate.synthesisOverview.tumourStageT : for sso.tumourStageT : code 0..1 as v make  create("Observation") as obs,  tto.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://loinc.org", "21899-0"),  obs.value = cc("http://fhir.hl7.org.au/fhir/rcpa/ValueSet/prostate-rad-tumour-stage-t", v)
      Prostate.synthesisOverview.tumourStageN : for sso.tumourStageN : code 0..1 as v make  create("Observation") as obs,  tto.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://loinc.org", "21900-6"),  obs.value = cc("", v)
      Prostate.synthesisOverview.tumourStageM : for sso.tumourStageM : code 0..1 as v make  create("Observation") as obs,  tto.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://loinc.org", "67211-3 "),  obs.value = cc("http://fhir.hl7.org.au/fhir/rcpa/ValueSet/prostate-rad-tumour-stage-m", v)
      Prostate.synthesisOverview.diagnosticSummary : for sso.diagnosticSummary : code 0..1 as v make  create("Observation") as obs,  tto.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://loinc.org", "34574-4"),  obs.value = v
      Prostate.synthesisOverview.overarchingComment : for sso.overarchingComment : code 0..1 as v make  create("Observation") as obs,  tto.related as xtmp,  xtmp.type = "has-member",  xtmp.target = reference(obs),  obs.subject = ("source.subject"),  obs.status = "final",  obs.code = cc("http://loinc.org", "22638-1"),  obs.value = v
    }

  }


endgroup