Connectathon 11 Snapshot

This page is part of the FHIR Specification (v1.2.0: STU 3 Draft). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions

Nehta/nehta-colorectal-example-2.json

Raw JSON (canonical form)

Logical Model Colorectal

{
  "resourceType": "StructureDefinition",
  "id": "Colorectal",
  "text": {
    "status": "generated",
    "div": "<div>to do</div>"
  },
  "url": "http://hl7.org/fhir/StructureDefinition/Colorectal",
  "name": "Colorectal",
  "display": "nehta-colorectal",
  "status": "draft",
  "publisher": "Health Level Seven International fhir",
  "contact": [
    {
      "telecom": [
        {
          "system": "other",
          "value": "http://hl7.org/fhir"
        }
      ]
    }
  ],
  "date": "2015-12-11T17:38:40+11:00",
  "description": "Logical Model: Colorectal cancer.",
  "fhirVersion": "1.2.0",
  "mapping": [
    {
      "identity": "logical",
      "uri": "http://hl7.org/fhir/logical",
      "name": "Logical Mapping"
    },
    {
      "identity": "cap",
      "uri": "http://cap.org/ecc",
      "name": "CAP Code"
    },
    {
      "identity": "v2",
      "uri": "http://hl7.org/v2",
      "name": "HL7 v2"
    },
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM"
    },
    {
      "identity": "sct",
      "uri": "http://snomed.info",
      "name": "SNOMED-CT"
    },
    {
      "identity": "loinc",
      "uri": "http://loinc.org",
      "name": "LOINC"
    }
  ],
  "kind": "logical",
  "abstract": false,
  "snapshot": {
    "element": [
      {
        "path": "Colorectal",
        "short": "Colorectal",
        "definition": "Colorectal cancer.",
        "min": 0,
        "max": "*",
        "mapping": [
          {
            "identity": "logical",
            "map": "dr := DiagnosticReport"
          },
          {
            "identity": "cap",
            "map": "28282.1000043"
          }
        ]
      },
      {
        "path": "Colorectal.subject",
        "short": "The subject of the report, usually, but not always, the patient",
        "definition": "The subject of the report. Usually, but not always, this is a patient. However diagnostic services also perform analyses on specimens collected from a variety of other sources.",
        "alias": [
          "Patient"
        ],
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/Patient"
            ]
          },
          {
            "code": "Reference",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/Group"
            ]
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "logical",
            "map": "dr.subject"
          },
          {
            "identity": "v2",
            "map": "PID-3-Patient ID List (no V2 mapping for Group or Device)"
          },
          {
            "identity": "rim",
            "map": "participation[typeCode=SBJ]"
          },
          {
            "identity": "sct",
            "map": "116154003"
          }
        ]
      },
      {
        "path": "Colorectal.requester",
        "short": "Who ordered the test",
        "definition": "The practitioner that holds legal responsibility for ordering the investigation.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/Practitioner"
            ]
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "logical",
            "map": "!req := dr.request->DiagnosticOrder; req[orderer := $value]"
          },
          {
            "identity": "loinc",
            "map": "22027-7"
          },
          {
            "identity": "rim",
            "map": "participation[typeCode=AUT].role"
          },
          {
            "identity": "sct",
            "map": "223366009"
          }
        ]
      },
      {
        "path": "Colorectal.performer",
        "short": "Responsible Diagnostic Service",
        "definition": "The diagnostic service that is responsible for issuing the report.",
        "comments": "This is not necessarily the source of the atomic data items - it is the entity that takes responsibility for the clinical report.",
        "requirements": "Need to know whom to contact if there are queries about the results. Also may need to track the source of reports for secondary data analysis.",
        "alias": [
          "Laboratory",
          "Service",
          "Practitioner",
          "Department",
          "Company"
        ],
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/Practitioner"
            ]
          },
          {
            "code": "Reference",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/Organization"
            ]
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "logical",
            "map": "dr[performer := $value]"
          },
          {
            "identity": "v2",
            "map": "PRT-8-Participation Organization (where this PRT-4-Participation = \"PO\")"
          },
          {
            "identity": "rim",
            "map": "participation[typeCode=AUT].role[classCode=ASSIGN].scoper"
          },
          {
            "identity": "sct",
            "map": "420158005"
          }
        ]
      },
      {
        "path": "Colorectal.preAnalytic",
        "short": "Pre Analytic",
        "definition": "Pre Analytic component - information collection prior to specimen receipt at laboratory.",
        "comments": "This is just a group/section header and is not a result field.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Element"
          }
        ],
        "constraint": [
          {
            "key": "inv-01",
            "severity": "error",
            "human": "If there is a perforation, the perforation type must be indicated.",
            "xpath": "not(f:perforation/@value = 'present') or exists(f:natureOfPerforation)"
          }
        ],
        "mapping": [
          {
            "identity": "logical",
            "map": "req := dr.request->DiagnosticOrder; req[orderer := $value]"
          },
          {
            "identity": "cap",
            "map": "28592.1000043"
          },
          {
            "identity": "loinc",
            "map": "70949-3"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "3"
              },
              {
                "url": "exValue",
                "valueString": "A: Specimen labelled : right hemicolectomy\nB: Mesentric lymph node"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "6"
              },
              {
                "url": "exValue",
                "valueString": "R colon"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "7"
              },
              {
                "url": "exValue",
                "valueString": "Rectum/anus, Rectal Ca"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "8"
              },
              {
                "url": "exValue",
                "valueString": "No mets. Equivocal lymph nodes on imaging."
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "9"
              },
              {
                "url": "exValue",
                "valueString": "Rectosigmoid adeno ca.; high anterior resection."
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "10"
              },
              {
                "url": "exValue",
                "valueString": "Ca rectum - was quite large. Post long course radio Tx.  Pre radio Tx staging T3N1M0"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "11"
              },
              {
                "url": "exValue",
                "valueString": "Ca restum; family history CRC; low anterior resection, proximal and distal donuts.\nThe histopathology report on previous rectal biopsy, xxxx-xxxx from 24/9/2015, is noted."
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.preAnalytic.clinicalInformation",
        "short": "Clinical information",
        "definition": "Clinical information provided on request form.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "logical",
            "map": "req.reason[text := $value]"
          },
          {
            "identity": "cap",
            "map": "28593.1000043"
          },
          {
            "identity": "loinc",
            "map": "55752-0"
          }
        ]
      },
      {
        "path": "Colorectal.preAnalytic.operatingSurgeonDetails",
        "short": "Operating surgeon details",
        "definition": "The operating surgeon name and contact details.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/Practitioner"
            ]
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "logical",
            "map": "sp := dr.specimen->Specimen; sp.collection[collector := $value]"
          },
          {
            "identity": "loinc",
            "map": "22027-7"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "1"
              },
              {
                "url": "exValue",
                "valueCode": "Absent"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "6"
              },
              {
                "url": "exValue",
                "valueCode": "Absent"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "7"
              },
              {
                "url": "exValue",
                "valueCode": "Not stated"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "8"
              },
              {
                "url": "exValue",
                "valueCode": "Not stated"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "9"
              },
              {
                "url": "exValue",
                "valueCode": "Not stated"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "11"
              },
              {
                "url": "exValue",
                "valueCode": "Not stated"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.preAnalytic.perforation",
        "short": "Perforation",
        "definition": "Presence or absence of a perforation.",
        "requirements": "If present, record the nature of perforation.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "condition": [
          "inv-01"
        ],
        "binding": {
          "strength": "required",
          "description": "A code that indicates whether perforation is present",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/nehta-nehta-present-absent-ns"
          }
        },
        "mapping": [
          {
            "identity": "logical",
            "map": "req.supportingInformation -> Observation[code := %map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28289.1000043"
          },
          {
            "identity": "sct",
            "map": "36191001"
          }
        ]
      },
      {
        "path": "Colorectal.preAnalytic.natureOfPerforation",
        "short": "Nature of perforation",
        "definition": "The type of perforation.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "code"
          }
        ],
        "binding": {
          "strength": "required",
          "description": "A code that indicates the type of perforation",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/nehta-nehta-perforation-type"
          }
        },
        "mapping": [
          {
            "identity": "logical",
            "map": "req.supportingInformation -> Observation[code := %map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28296.1000043"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "1"
              },
              {
                "url": "exValue",
                "valueCode": "Absent"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "6"
              },
              {
                "url": "exValue",
                "valueCode": "Absent"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "7"
              },
              {
                "url": "exValue",
                "valueCode": "Not stated"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "8"
              },
              {
                "url": "exValue",
                "valueCode": "Not stated"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "9"
              },
              {
                "url": "exValue",
                "valueCode": "Not stated"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "11"
              },
              {
                "url": "exValue",
                "valueCode": "Not stated"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.preAnalytic.clinicalObstruction",
        "short": "Clinical obstruction",
        "definition": "Whether a clinical obstruction is present or absent.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "binding": {
          "strength": "required",
          "description": "A code that indicates whether a clinical obstruction is present",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/nehta-nehta-present-absent-ns"
          }
        },
        "mapping": [
          {
            "identity": "logical",
            "map": "req.supportingInformation -> Observation[code := %map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28292.1000043"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "1"
              },
              {
                "url": "exValue",
                "valueCode": "Rectum"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "2"
              },
              {
                "url": "exValue",
                "valueCode": "Lower rectum"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "6"
              },
              {
                "url": "exValue",
                "valueCode": "Ascending colon"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "7"
              },
              {
                "url": "exValue",
                "valueCode": "Distal rectum"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "8"
              },
              {
                "url": "exValue",
                "valueCode": "Rectum"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "9"
              },
              {
                "url": "exValue",
                "valueCode": "Rectosigmoid junction"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "10"
              },
              {
                "url": "exValue",
                "valueCode": "Rectum"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "11"
              },
              {
                "url": "exValue",
                "valueCode": "Rectum"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.preAnalytic.tumourLocation",
        "short": "Tumour location",
        "definition": "Anatomical location of the tumour from a given list.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "code"
          }
        ],
        "condition": [
          "inv-02"
        ],
        "constraint": [
          {
            "key": "inv-02",
            "severity": "error",
            "human": "If the tumour location is rectum, then the distance from the anal verge must be recorded.",
            "xpath": "not(@value = 'Rectum') or exists(f:distanceAnalVerge)"
          }
        ],
        "binding": {
          "strength": "required",
          "description": "A code that indicates the antomical location of the tumour from a given list",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/nehta-nehta-crc-tumour-location"
          }
        },
        "mapping": [
          {
            "identity": "logical",
            "map": "req.supportingInformation -> Observation[code := %map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28307.1000043"
          },
          {
            "identity": "loinc",
            "map": "33725-3"
          },
          {
            "identity": "sct",
            "map": "371480007"
          }
        ]
      },
      {
        "path": "Colorectal.preAnalytic.synchronousTumours",
        "short": "Synchronous tumours - other site",
        "definition": "For synchronous tumours indicate each other site.",
        "comments": "Note\n: Synchronous tumours should be reported separately – this serves only to identify the presence of other synchronous tumours for which separate reports will be submitted.",
        "requirements": "Conditional on rectum being selected.\nMeasured in cm for RCPA requirements.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "logical",
            "map": "req.supportingInformation -> Observation[code := %map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28346.1000043"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "1"
              },
              {
                "url": "exValue",
                "valueQuantity": {
                  "value": 6,
                  "unit": "cm"
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "7"
              },
              {
                "url": "exValue",
                "valueQuantity": {
                  "unit": "Not stated"
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "8"
              },
              {
                "url": "exValue",
                "valueQuantity": {
                  "unit": "Not stated"
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "9"
              },
              {
                "url": "exValue",
                "valueQuantity": {
                  "unit": "Not stated"
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "10"
              },
              {
                "url": "exValue",
                "valueQuantity": {
                  "unit": "Not stated"
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "11"
              },
              {
                "url": "exValue",
                "valueQuantity": {
                  "unit": "Not stated"
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.preAnalytic.distanceAnalVerge",
        "short": "Distance from anal verge",
        "definition": "Quantitative measurement of distance from anal verge.",
        "comments": "Conditional on rectum being selected\nNote : Measured in cm by longstanding surgical convention.",
        "requirements": "Conditional on rectum being selected.\nMeasured in cm for RCPA requirements.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Quantity",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "logical",
            "map": "req.supportingInformation -> Observation[code := %map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28335.1000043"
          },
          {
            "identity": "loinc",
            "map": "33748-5"
          },
          {
            "identity": "sct",
            "map": "371490004"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "2"
              },
              {
                "url": "exValue",
                "valueCode": "Anterior resection"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "3"
              },
              {
                "url": "exValue",
                "valueCode": "Right hemicolectomy"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "5"
              },
              {
                "url": "exValue",
                "valueCode": "Anterior resection"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "6"
              },
              {
                "url": "exValue",
                "valueCode": "Right hemicolectomy"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "7"
              },
              {
                "url": "exValue",
                "valueCode": "Abdominoperineal resection"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "9"
              },
              {
                "url": "exValue",
                "valueCode": "Anterior resection"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "10"
              },
              {
                "url": "exValue",
                "valueCode": "Anterior resection"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "11"
              },
              {
                "url": "exValue",
                "valueCode": "Anterior resection"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.preAnalytic.typeOfOperation",
        "short": "*",
        "definition": "The type of operation selected from a list.",
        "requirements": "Single selection value list.\nIf other procedure(s) is selected, record type of procedure.\nIf anterior resection is selected, record anterior resection type.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "condition": [
          "inv-03",
          "inv-04"
        ],
        "constraint": [
          {
            "key": "inv-03",
            "severity": "error",
            "human": "If other procedure(s) is selected, then record the type of procedure.",
            "xpath": "not(@value = 'Other procedure(s)') or exists(f:typeOfProcedure)"
          },
          {
            "key": "inv-04",
            "severity": "error",
            "human": "If anterior resection is selected, record anterior resection type.",
            "xpath": "not(@value = 'Anterior resection') or exists(f:anteriorResectionType)"
          }
        ],
        "binding": {
          "strength": "required",
          "description": "A code that indicates the type of operation",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/nehta-nehta-crc-operation-type"
          }
        },
        "mapping": [
          {
            "identity": "logical",
            "map": "too := req.supportingInformation -> Observation[code := %map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "27919.1000043"
          },
          {
            "identity": "loinc",
            "map": "29306-8"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "8"
              },
              {
                "url": "exValue",
                "valueString": "Laparoscopic ultralow anterior resection"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.preAnalytic.typeOfProcedure",
        "short": "Procedure type",
        "definition": "Type of procedure.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "logical",
            "map": "too.text"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "2"
              },
              {
                "url": "exValue",
                "valueCode": "Ultralow"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "9"
              },
              {
                "url": "exValue",
                "valueCode": "High"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "11"
              },
              {
                "url": "exValue",
                "valueCode": "Lower"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.preAnalytic.anteriorResectionType",
        "short": "Anterior resection type",
        "definition": "The type of anterior resection.",
        "requirements": "Single selection value list.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "binding": {
          "strength": "required",
          "description": "A code that idicates the type of anterior resection",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/nehta-nehta-hi-lo-ultralo"
          }
        },
        "mapping": [
          {
            "identity": "logical",
            "map": "req.supportingInformation -> Observation[code := %map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28278.1000043"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "1"
              },
              {
                "url": "exValue",
                "valueCode": "Yes"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "6"
              },
              {
                "url": "exValue",
                "valueCode": "No"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "7"
              },
              {
                "url": "exValue",
                "valueCode": "Not stated"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "8"
              },
              {
                "url": "exValue",
                "valueCode": "Not stated"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "9"
              },
              {
                "url": "exValue",
                "valueCode": "Not stated"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "10"
              },
              {
                "url": "exValue",
                "valueCode": "Yes"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "11"
              },
              {
                "url": "exValue",
                "valueCode": "Not stated"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.preAnalytic.preoperativeRadiotherapy",
        "short": "Pre-operative radiotherapy",
        "definition": "An indication of pre-operative radiotherapy.",
        "requirements": "Single selection value list.\nIf yes, record type of course.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "condition": [
          "inv-05"
        ],
        "constraint": [
          {
            "key": "inv-05",
            "severity": "error",
            "human": "If pre-operative radiotherapy is done, then the type of course is to be recorded.",
            "xpath": "not(@value = 'Yes') or exists(f:typeOfCourse)"
          }
        ],
        "binding": {
          "strength": "required",
          "description": "A code that indicates whether pre-operative radiotherapy was used",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/nehta-nehta-yes-no-ns"
          }
        },
        "mapping": [
          {
            "identity": "logical",
            "map": "req.supportingInformation -> Observation[code := %map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28283.1000043"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "1"
              },
              {
                "url": "exValue",
                "valueCode": "Short duration"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "10"
              },
              {
                "url": "exValue",
                "valueCode": "Long course"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.preAnalytic.typeOfCourse",
        "short": "Type of course",
        "definition": "The type of course of pre-operative radiotherapy.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "binding": {
          "strength": "required",
          "description": "A code that indicates the type of course of pre-operative radiotherapy",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/nehta-nehta-course-type"
          }
        },
        "mapping": [
          {
            "identity": "logical",
            "map": "req.supportingInformation -> Observation[code := %map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28286.100004299999"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "1"
              },
              {
                "url": "exValue",
                "valueString": "None noted"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "6"
              },
              {
                "url": "exValue",
                "valueString": "Not stated"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "7"
              },
              {
                "url": "exValue",
                "valueString": "Not stated"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "8"
              },
              {
                "url": "exValue",
                "valueString": "Not stated"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "9"
              },
              {
                "url": "exValue",
                "valueString": "Not stated"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "10"
              },
              {
                "url": "exValue",
                "valueString": "Not stated"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "11"
              },
              {
                "url": "exValue",
                "valueString": "Not stated"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.preAnalytic.surgeonsOpinion",
        "short": "Surgeons opinion of residual cancer",
        "definition": "Surgeons opinion on the existence of local residual cancer postsurgery.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "logical",
            "map": "req.supportingInformation -> Observation[code := %map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28295.1000043"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "6"
              },
              {
                "url": "exValue",
                "valueString": "Not stated"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "7"
              },
              {
                "url": "exValue",
                "valueString": "Not stated"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "8"
              },
              {
                "url": "exValue",
                "valueString": "Not stated"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "9"
              },
              {
                "url": "exValue",
                "valueString": "Not stated"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "10"
              },
              {
                "url": "exValue",
                "valueString": "Not stated"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "11"
              },
              {
                "url": "exValue",
                "valueString": "Not stated"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.preAnalytic.adjacentOrgans",
        "short": "Adjacent organ involvement",
        "definition": "Involvement of adjacent organs.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "logical",
            "map": "req.supportingInformation -> Observation[code := %map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28336.1000043"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "1"
              },
              {
                "url": "exValue",
                "valueCode": "New primary"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.preAnalytic.newPrimaryOrRecurrence",
        "short": "New primary cancer or recurrence",
        "definition": "An indication of whether a new primary cancer or a recurrence.",
        "comments": "? If need to make an invariant due to the conditional statement.",
        "requirements": "Single selection value list.\nIf regional (local) recurrence or distant metastasis describe.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "condition": [
          "inv-06"
        ],
        "constraint": [
          {
            "key": "inv-06",
            "severity": "error",
            "human": "If regional (local) recurrence or distant metastasis describe.",
            "xpath": "not((@value = 'Regional (local) recurrence') or (@value = 'Distant metastases')) or exists(f:describe)"
          }
        ],
        "binding": {
          "strength": "required",
          "description": "A code that indicates whether a new primary cancer or an recurrence",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/nehta-nehta-cancer-primary-or-recurrence"
          }
        },
        "mapping": [
          {
            "identity": "logical",
            "map": "pno := req.supportingInformation -> Observation[code := %map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28337.1000043"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "1"
              },
              {
                "url": "exValue",
                "valueString": "No metastatic lesions"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "8"
              },
              {
                "url": "exValue",
                "valueString": "Presence of distant metastasis:  Absent."
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "10"
              },
              {
                "url": "exValue",
                "valueString": "Presence of distant metastasis:  Absent."
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.preAnalytic.RecurrenceDescription",
        "short": "Describe",
        "definition": "Description of regional (local) recurrence or distant metastases.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "logical",
            "map": "pno.component[code := %map-codes; value[x] := $value]"
          }
        ]
      },
      {
        "path": "Colorectal.preAnalytic.pathologyAccessionNumber",
        "short": "Pathology number",
        "definition": "Pathology accession number.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "logical",
            "map": "dr[identifier := $value]"
          },
          {
            "identity": "cap",
            "map": "28300.1000043"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "1"
              },
              {
                "url": "exValue",
                "valueString": "Tissue banking:   No\nSpecimen images:   Yes"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.preAnalytic.otherRelevantDetails",
        "short": "Other details",
        "definition": "Other relevant details.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "logical",
            "map": "req.note[text := $value]"
          },
          {
            "identity": "cap",
            "map": "28301.1000043"
          }
        ]
      },
      {
        "path": "Colorectal.macro",
        "short": "Macroscopy",
        "definition": "Macroscopic findings.",
        "comments": "This is just a group/section header and is not a result field.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Element"
          }
        ],
        "constraint": [
          {
            "key": "inv-15",
            "severity": "error",
            "human": "If lymph nodes have been received the tumour inolvement in the lymph nodes is to be recorded.",
            "xpath": "not(lymphNodes/@value = 'Received') or exists(f:.lymphNodeInvolvement)"
          },
          {
            "key": "inv-09",
            "severity": "error",
            "human": "If lymph nodes are received, record the number of nodes",
            "xpath": "not(f:lymphNodes/@value = 'Received') or exists(f:noLymphNodesPerCassette)"
          }
        ],
        "mapping": [
          {
            "identity": "logical",
            "map": "macro := dr.result->Observation[code := %map-codes]"
          },
          {
            "identity": "cap",
            "map": "27906.1000043"
          },
          {
            "identity": "loinc",
            "map": "70949-3"
          },
          {
            "identity": "sct",
            "map": "250429001"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "1"
              },
              {
                "url": "exValue",
                "valueQuantity": {
                  "value": 130,
                  "unit": "mm"
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "2"
              },
              {
                "url": "exValue",
                "valueQuantity": {
                  "value": 240,
                  "unit": "mm"
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "3"
              },
              {
                "url": "exValue",
                "valueQuantity": {
                  "value": 85,
                  "unit": "mm"
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "6"
              },
              {
                "url": "exValue",
                "valueQuantity": {
                  "value": 155,
                  "unit": "mm"
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "7"
              },
              {
                "url": "exValue",
                "valueQuantity": {
                  "value": 280,
                  "unit": "mm"
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "8"
              },
              {
                "url": "exValue",
                "valueQuantity": {
                  "value": 260,
                  "unit": "mm"
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "9"
              },
              {
                "url": "exValue",
                "valueQuantity": {
                  "value": 175,
                  "unit": "mm"
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "10"
              },
              {
                "url": "exValue",
                "valueQuantity": {
                  "value": 270,
                  "unit": "mm"
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "11"
              },
              {
                "url": "exValue",
                "valueQuantity": {
                  "value": 165,
                  "unit": "mm"
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.macro.specimenLength",
        "short": "Specimen length",
        "definition": "The length of the specimen.",
        "comments": "Query if measurements are in mm is international ie USA and query if this comment needs to be refined to AUS?\nDitto for subsequent metric measurements.",
        "requirements": "measurement in mm.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Quantity",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "logical",
            "map": "sp1 := dr.specimen->Specimen; sp1.collection[quantity := $value]"
          },
          {
            "identity": "cap",
            "map": "28342.1000043"
          },
          {
            "identity": "loinc",
            "map": "33723-8"
          },
          {
            "identity": "sct",
            "map": "384606002"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "1"
              },
              {
                "url": "exValue",
                "valueCode": "Rectum"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "2"
              },
              {
                "url": "exValue",
                "valueCode": "Rectum"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "3"
              },
              {
                "url": "exValue",
                "valueCode": "Caecum"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "6"
              },
              {
                "url": "exValue",
                "valueCode": "Ascending colon"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "7"
              },
              {
                "url": "exValue",
                "valueCode": "Distal rectum\n(35mm below the level of the anterior peritoneal reflection, 12 mm above the dentate line.)"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "8"
              },
              {
                "url": "exValue",
                "valueCode": "Rectum, below the level of the anterior peritoneal reflection."
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "9"
              },
              {
                "url": "exValue",
                "valueCode": "Proximal rectum"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "10"
              },
              {
                "url": "exValue",
                "valueCode": "Rectum, 30mm above the level of the anterior peritoneal reflection."
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "11"
              },
              {
                "url": "exValue",
                "valueCode": "Rectum, entirely above the level of the anterior peritoneal reflection"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.macro.tumourSite",
        "short": "Tumour site",
        "definition": "The site of the tumour.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "condition": [
          "inv-07",
          "inv-08",
          "inv-13"
        ],
        "constraint": [
          {
            "key": "inv-13",
            "severity": "error",
            "human": "If the tumour is a rectal tumour the status of the nonperitonealised circumferential margin (rectal tumours) is to be recorded.",
            "xpath": "not(f:Colorectal.preAnalytic.tumourLocation/@value = 'Rectum') or exists(f:Colorectal.micro.nonperitonealisedCircumMargin)"
          },
          {
            "key": "inv-08",
            "severity": "error",
            "human": "If tumour site is rectum, the intactness of mesorectum is to be recorded.",
            "xpath": "not(@value = 'Rectum') or exists(f:intactnessOfMesorectum)"
          },
          {
            "key": "inv-07",
            "severity": "error",
            "human": "If tumour site is rectum, the relationship to anterior peritoneal reflection is to be recorded.",
            "xpath": "not(@value = 'Rectum') or exists(f:relToAntPeritonealReflection)"
          }
        ],
        "binding": {
          "strength": "required",
          "description": "A code that indicates the site of the tumour",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/nehta-nehta-crc-tumour-location"
          }
        },
        "mapping": [
          {
            "identity": "logical",
            "map": "sp2 := dr.specimen->Specimen; sp2.collection[bodySite := $value]"
          },
          {
            "identity": "cap",
            "map": "27931.1000043"
          },
          {
            "identity": "loinc",
            "map": "33725-3"
          },
          {
            "identity": "sct",
            "map": "371480007"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "1"
              },
              {
                "url": "exValue",
                "valueQuantity": {
                  "value": 50,
                  "unit": "mm"
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "2"
              },
              {
                "url": "exValue",
                "valueQuantity": {
                  "value": 45,
                  "unit": "mm"
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "3"
              },
              {
                "url": "exValue",
                "valueQuantity": {
                  "value": 90,
                  "unit": "mm"
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "6"
              },
              {
                "url": "exValue",
                "valueQuantity": {
                  "value": 23,
                  "unit": "mm"
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "7"
              },
              {
                "url": "exValue",
                "valueQuantity": {
                  "value": 30,
                  "unit": "x 25mm, occupies 25% circumference"
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "8"
              },
              {
                "url": "exValue",
                "valueQuantity": {
                  "value": 30,
                  "unit": "mm"
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "9"
              },
              {
                "url": "exValue",
                "valueQuantity": {
                  "value": 40,
                  "unit": "mm"
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "10"
              },
              {
                "url": "exValue",
                "valueQuantity": {
                  "value": 15,
                  "unit": "x10mm (ulcer)"
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "11"
              },
              {
                "url": "exValue",
                "valueQuantity": {
                  "value": 30,
                  "unit": "x25mm"
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.macro.maxTumourDiameter",
        "short": "Max. tumour diameter",
        "definition": "Maximum tumour diameter.",
        "requirements": "measurement in mm.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Quantity",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "logical",
            "map": "macro.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28360.1000043"
          },
          {
            "identity": "loinc",
            "map": "21889-1"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "1"
              },
              {
                "url": "exValue",
                "valueQuantity": {
                  "value": 20,
                  "unit": "mm"
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "2"
              },
              {
                "url": "exValue",
                "valueQuantity": {
                  "value": 6,
                  "unit": "mm"
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "3"
              },
              {
                "url": "exValue",
                "valueQuantity": {
                  "value": 70,
                  "unit": "mm (Proximal)"
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "6"
              },
              {
                "url": "exValue",
                "valueQuantity": {
                  "value": 40,
                  "unit": "mm"
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "7"
              },
              {
                "url": "exValue",
                "valueQuantity": {
                  "value": 40,
                  "unit": "mm (distal)"
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "8"
              },
              {
                "url": "exValue",
                "valueQuantity": {
                  "value": 12,
                  "unit": "mm (distal)"
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "9"
              },
              {
                "url": "exValue",
                "valueQuantity": {
                  "value": 40,
                  "unit": "mm"
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "10"
              },
              {
                "url": "exValue",
                "valueQuantity": {
                  "value": 75,
                  "unit": "mm (distal)"
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "11"
              },
              {
                "url": "exValue",
                "valueQuantity": {
                  "value": 30,
                  "unit": "mm (distal)"
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.macro.distanceNearerProxOrDistal",
        "short": "Dist. of tumour to the nearer proximal or distal \"cut end\"",
        "definition": "Distance of tumour to the nearer proximal or distal \"cut end\".",
        "requirements": "measurement in mm.",
        "min": 1,
        "max": "*",
        "type": [
          {
            "code": "Quantity",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "logical",
            "map": "macro.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28359.1000043"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "1"
              },
              {
                "url": "exValue",
                "valueQuantity": {
                  "value": 15,
                  "unit": "mm"
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "2"
              },
              {
                "url": "exValue",
                "valueQuantity": {
                  "value": 10,
                  "unit": "mm"
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "3"
              },
              {
                "url": "exValue",
                "valueQuantity": {
                  "value": 15,
                  "unit": "mm"
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "6"
              },
              {
                "url": "exValue",
                "valueQuantity": {
                  "value": 30,
                  "unit": "mm"
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "8"
              },
              {
                "url": "exValue",
                "valueQuantity": {
                  "value": 3,
                  "unit": "mm"
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "9"
              },
              {
                "url": "exValue",
                "valueQuantity": {
                  "value": 25,
                  "unit": "mm"
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "10"
              },
              {
                "url": "exValue",
                "valueQuantity": {
                  "value": 15,
                  "unit": "mm"
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "11"
              },
              {
                "url": "exValue",
                "valueQuantity": {
                  "value": 5,
                  "unit": "mm"
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.macro.distNonperitonCircumMargin",
        "short": "Dist. of tumour to the nonperitonealised circumferential margin",
        "definition": "Distance of tumour to the nonperitonealised circumferential margin.",
        "requirements": "measurement in mm.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Quantity",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "logical",
            "map": "macro.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28358.1000043"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "1"
              },
              {
                "url": "exValue",
                "valueCode": "Absent"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "2"
              },
              {
                "url": "exValue",
                "valueCode": "Absent"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "3"
              },
              {
                "url": "exValue",
                "valueCode": "Absent"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "6"
              },
              {
                "url": "exValue",
                "valueCode": "Absent"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "7"
              },
              {
                "url": "exValue",
                "valueCode": "Absent"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "8"
              },
              {
                "url": "exValue",
                "valueCode": "Absent"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "9"
              },
              {
                "url": "exValue",
                "valueCode": "Absent"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "10"
              },
              {
                "url": "exValue",
                "valueCode": "Absent"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "11"
              },
              {
                "url": "exValue",
                "valueCode": "Absent"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.macro.tumourPerforation",
        "short": "Tumour perforation",
        "definition": "The presence or absence of tumour perforation.",
        "requirements": "Single selection value list.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "binding": {
          "strength": "required",
          "description": "A code that indicates the presence or absence of a tumour perforation",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/nehta-nehta-present-absent"
          }
        },
        "mapping": [
          {
            "identity": "logical",
            "map": "macro.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "27963.1000043"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "1"
              },
              {
                "url": "exValue",
                "valueCode": "Astride"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "2"
              },
              {
                "url": "exValue",
                "valueCode": "Astride"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "7"
              },
              {
                "url": "exValue",
                "valueCode": "Entirely below (35mm below)"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "8"
              },
              {
                "url": "exValue",
                "valueCode": "Entirely below"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "10"
              },
              {
                "url": "exValue",
                "valueCode": "Entirely above (30mm)"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "11"
              },
              {
                "url": "exValue",
                "valueCode": "Entirely above, right anterolateral quadrant"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.macro.relToAntPeritonealReflection",
        "short": "Relationship to anterior peritoneal reflection",
        "definition": "Site of tumour in relation to the anterior level of the peritoneal reflection.",
        "requirements": "Single selection value list.\nConditional on rectum being selected in Tumour Site.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "binding": {
          "strength": "required",
          "description": "A code that indicates the site of tumour in relation to the anterior level of the peritoneal reflection",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/nehta-nehta-crc-rel-anterior-peritoneal-reflection"
          }
        },
        "mapping": [
          {
            "identity": "logical",
            "map": "macro.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28362.1000043"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "1"
              },
              {
                "url": "exValue",
                "valueCode": "Complete (grade 3)"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "2"
              },
              {
                "url": "exValue",
                "valueCode": "Complete (grade 3)"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "7"
              },
              {
                "url": "exValue",
                "valueCode": "Complete"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "8"
              },
              {
                "url": "exValue",
                "valueCode": "Nearly complete (B Grade 2)"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "10"
              },
              {
                "url": "exValue",
                "valueCode": "Appears complete"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "11"
              },
              {
                "url": "exValue",
                "valueCode": "Appears complete"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.macro.intactnessOfMesorectum",
        "short": "Intactness of mesorectum",
        "definition": "For rectal resections the intactness of the mesorectum must be recorded.",
        "requirements": "Single selection value list.\nConditional on rectum being selected in Tumour Site.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "binding": {
          "strength": "required",
          "description": "A code that indicates the intactness of the mesorectum",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/nehta-nehta-crc-intactness-of-mesorectum"
          }
        },
        "mapping": [
          {
            "identity": "logical",
            "map": "macro.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "27967.1000043"
          },
          {
            "identity": "loinc",
            "map": "33730-3"
          },
          {
            "identity": "sct",
            "map": "408655002"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "1"
              },
              {
                "url": "exValue",
                "valueCode": "Tumour has formed nodule(s) discrete from the tumour mass along the serosal surface.  An 8mm submucosal nodule, 20mm from the distal margin is noted."
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "2"
              },
              {
                "url": "exValue",
                "valueCode": "Tumour invades to the peritoneal surface"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.macro.peritoneum",
        "short": "Peritoneum",
        "definition": "Any involvement of the peritoneum should be recorded.",
        "requirements": "Single selection value list.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "binding": {
          "strength": "required",
          "description": "A code that indicates the tumour invovlement in the peritoneum",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/nehta-nehta-crc-peritoneum-invasion"
          }
        },
        "mapping": [
          {
            "identity": "logical",
            "map": "macro.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28369.1000043"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "1"
              },
              {
                "url": "exValue",
                "valueCode": "Received"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "2"
              },
              {
                "url": "exValue",
                "valueCode": "Received"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "3"
              },
              {
                "url": "exValue",
                "valueCode": "Received"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "6"
              },
              {
                "url": "exValue",
                "valueCode": "Received"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.macro.lymphNodes",
        "short": "Lymph nodes",
        "definition": "If lymph nodes are received, then they should be recorded.",
        "requirements": "Conditional:\nIf received, record the number of nodes.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "condition": [
          "inv-09",
          "inv-15"
        ],
        "binding": {
          "strength": "required",
          "description": "A code that indicates if lymph nodes were received",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/nehta-nehta-received-notreceived"
          }
        },
        "mapping": [
          {
            "identity": "logical",
            "map": "macro.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28372.1000043"
          },
          {
            "identity": "loinc",
            "map": "??  \n44621-1"
          },
          {
            "identity": "sct",
            "map": "364108009"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "1"
              },
              {
                "url": "exValue",
                "valueString": "3 in cassette 1 \n4 in cassette 2\n7 in cassette 3"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "2"
              },
              {
                "url": "exValue",
                "valueString": "1 in cassette 1\n4 in cassette 2\n3 in cassette 3"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "3"
              },
              {
                "url": "exValue",
                "valueString": "21 in total.\nA11 – 1 node, serially sliced\n A12 – 1 node, serially sliced\n A13 – 1 node, serially sliced\n A14 – 1 node, serially sliced\n A15 – 1 node, apical node, bisected and entirely submitted.\nA16 – 3 nodes\n A17 – 3 nodes\n A18 – 3 nodes\n A19 – 6 nodes, 1 bisected\n B - Mesentric lymph node Bisected and entirely submitted in 1 block"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.macro.noLymphNodesPerCassette",
        "short": "Number of lymph nodes in each cassette",
        "definition": "The number of lymph nodes placed in each cassette should be recorded.",
        "comments": "The RCPA require the following be recorded:\n\"Numeric: ___ in cassette: ___\"\nQuery how to record this?",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "logical",
            "map": "macro.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28387.1000043"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "1"
              },
              {
                "url": "exValue",
                "valueCode": "Present"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "2"
              },
              {
                "url": "exValue",
                "valueCode": "Absent"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "3"
              },
              {
                "url": "exValue",
                "valueCode": "Absent"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.macro.polyps",
        "short": "Polyps",
        "definition": "The presence or absence of polyps should be recorded.",
        "requirements": "Conditional:\nIf present, provide a polyp summary.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "condition": [
          "inv-10"
        ],
        "constraint": [
          {
            "key": "inv-10",
            "severity": "error",
            "human": "If polyps are present, provide a polyp summary.",
            "xpath": "not(f@value = 'Present') or exists(f:polypSummary)"
          }
        ],
        "binding": {
          "strength": "required",
          "description": "A code that indicates the presence or absence of polyp(s)",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/nehta-nehta-present-absent-na"
          }
        },
        "mapping": [
          {
            "identity": "logical",
            "map": "macro.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28376.1000043"
          },
          {
            "identity": "loinc",
            "map": "?? 33745-1"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "1"
              },
              {
                "url": "exValue",
                "valueString": "Two 5mm polyps are noted."
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.macro.polypSummary",
        "short": "The number, diameter and gross configuration of polyps should be summarised",
        "definition": "The polyp summary should include the numbers, diameter range and gross appearance.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "logical",
            "map": "macro.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28379.1000043"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "1"
              },
              {
                "url": "exValue",
                "valueString": "Tumour appears ulcerated and scarred. Overlying serosa appears normal. Extramuscular spread to 15mm"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "2"
              },
              {
                "url": "exValue",
                "valueString": "Tumour appears plaquelike, remaining mucosa appears normal."
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "5"
              },
              {
                "url": "exValue",
                "valueString": "A segment of large bowel 175mm in length with an internal diameter of up to 52mm. The bowel has been opened prior to receipt. The peritoneal reflection has not been included in the specimen. Arising at 45mm from the presumed distal margin, a raised ulcerated firm tan tumour is present measuring 55x32mm. On slicing the tumour measures up to 10mm in thickness and infiltrates into the mesocolic fat. On the antimesenteric border, the tumour abuts the serosal surface. Tumour perforation is not seen. No other lesions are identified within the mucosa elsewhere. Blocks 1, 2 - reps of tumour with mesocolic fat. Blocks 3,4,5 - tumour with peritoneal surface. Block 6 - distal resection margin. Block 7 - apical lymph node. Block 8 - one lymph node. Block 9 - four lymph nodes. Block 10 - five lymph nodes. PP. (TW.LD)"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "6"
              },
              {
                "url": "exValue",
                "valueString": "(Query add the narrative comments here)"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "7"
              },
              {
                "url": "exValue",
                "valueString": "Additional small polyps, 1-4mm in diameter, 4 within the c=vicinity of the tumour, 6 proximal to the tumour."
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "8"
              },
              {
                "url": "exValue",
                "valueString": "Pedunculated polyp 8mm, situated 55mm proximal to tumour."
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "10"
              },
              {
                "url": "exValue",
                "valueString": "Entire ulcer/tumour bed embedded"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.macro.otherMacroComments",
        "short": "Other macroscopic comments",
        "definition": "A descriptive or narrative field should be provided to record any macroscopic information that is not recorded in the above standards and guidelines, and that would normally form part of the macroscopic description.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "logical",
            "map": "macro.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28380.1000043"
          },
          {
            "identity": "sct",
            "map": "395526000"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "1"
              },
              {
                "url": "exValue",
                "valueString": "Blocks 1 to 6: tumour. Block 7: distal margin. Blocks 8 & 9 : circumferential margin. Blocks 10 to 16: 14 lymph nodes (2 in each block)."
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "2"
              },
              {
                "url": "exValue",
                "valueString": "Blocks 1: shaved vascular margin, 2 to 4: tumour with greatest depth of invasion, radial inked red, distal inked blue. 5 – tumour with adjacent mucosa. 6-9 lymph nodes"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "3"
              },
              {
                "url": "exValue",
                "valueString": "A1-A2 - Omentum.\nA3 - Ileal margin with adjacent noninvolved ileum.\nA4 - Appendix with base painted.\nA5-A6 - Tumour at ileocaecal junction.\nA7-A8 - Representative sections of tumour.\nA9 - Tumour with nonperitonealised margin.\nA10 - Ascending colon and distal resection margin.\nLymph nodes as above"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.macro.natureAndSiteOfBlocks",
        "short": "Nature and site of blocks",
        "definition": "The nature and sites of all blocks must be recorded.",
        "min": 1,
        "max": "*",
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "logical",
            "map": "macro.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28381.100004299999"
          }
        ]
      },
      {
        "path": "Colorectal.micro",
        "short": "Microscopy",
        "definition": "Microscopy of the sample.",
        "comments": "This is just a group/section header and is not a result field.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Element"
          }
        ],
        "mapping": [
          {
            "identity": "logical",
            "map": "micro := dr.result->Observation[code := %map-codes]"
          },
          {
            "identity": "cap",
            "map": "27973.1000043"
          },
          {
            "identity": "loinc",
            "map": "70949-3"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "1"
              },
              {
                "url": "exValue",
                "valueCode": "Adenocarcinoma"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "2"
              },
              {
                "url": "exValue",
                "valueCode": "Adenocarcinoma, NOS"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "3"
              },
              {
                "url": "exValue",
                "valueCode": "Adenocarcinoma"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "5"
              },
              {
                "url": "exValue",
                "valueCode": "Adenocarcinoma, with mucinous areas"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "6"
              },
              {
                "url": "exValue",
                "valueCode": "Adenocarcinoma"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "7"
              },
              {
                "url": "exValue",
                "valueCode": "Adenocarcinoma, NOS"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "8"
              },
              {
                "url": "exValue",
                "valueCode": "Adenocarcinoma, NOS"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "9"
              },
              {
                "url": "exValue",
                "valueCode": "Adenocarcinoma"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "10"
              },
              {
                "url": "exValue",
                "valueCode": "Adenocarcinoma, NOS"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "11"
              },
              {
                "url": "exValue",
                "valueCode": "Adenocarcinoma, NOS"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.micro.tumourType",
        "short": "Tumour type",
        "definition": "A single selection value list from WHO Classification of Tumours.",
        "comments": "How to represent this result group which has heading and components cf the bindings file is a flat file??",
        "requirements": "Single selection value list from WHO Classification of Tumours. Pathology and Genetics of Tumours of the Digestive System (2010).",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "binding": {
          "strength": "required",
          "description": "A code from the WHO Calssification that indicates the tumour type",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/nehta-tumour-type"
          }
        },
        "mapping": [
          {
            "identity": "logical",
            "map": "micro.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "27974.1000043"
          },
          {
            "identity": "sct",
            "map": "371441004"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "1"
              },
              {
                "url": "exValue",
                "valueCode": "Low grade – well and moderately differentiated"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "2"
              },
              {
                "url": "exValue",
                "valueCode": "Low grade – well and moderately differentiated"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "3"
              },
              {
                "url": "exValue",
                "valueCode": "Low grade – well and moderately differentiated"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "5"
              },
              {
                "url": "exValue",
                "valueCode": "High grade - poorly and undifferentiated"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "6"
              },
              {
                "url": "exValue",
                "valueCode": "Low grade - well and moderately differentiated"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "7"
              },
              {
                "url": "exValue",
                "valueCode": "Low grade, well/moderately differentiated, microsatellite stable (IHC)"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "8"
              },
              {
                "url": "exValue",
                "valueCode": "Low grade, Moderately differentiated, but poorly differentiated tumour budding at the advancing edge."
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "9"
              },
              {
                "url": "exValue",
                "valueCode": "Moderate (no mucinous areas)"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "10"
              },
              {
                "url": "exValue",
                "valueCode": "Low grade (well/moderately differentiated) post treatment"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "11"
              },
              {
                "url": "exValue",
                "valueCode": "High grade, variable differentiation, predominantly moderate but areas of poor differentiation.  Microsatellite stable (IHC)"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.micro.histologicalGrade",
        "short": "Histological grade",
        "definition": "The histological grading of the tumour must be recorded.",
        "requirements": "Single selection value list.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "binding": {
          "strength": "required",
          "description": "A code that indicates the histological grade of the tumour",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/nehta-nehta-histological-grade"
          }
        },
        "mapping": [
          {
            "identity": "logical",
            "map": "micro.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "27988.1000043"
          },
          {
            "identity": "sct",
            "map": "371469007"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "2"
              },
              {
                "url": "exValue",
                "valueCode": "pT3 Tumour invades through muscularis propria into pericolorectal tissues, specifically into perirectal fat"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "3"
              },
              {
                "url": "exValue",
                "valueCode": "pT3 Tumour invades through muscularis propria into pericolorectal tissues.\n\n(For Grahame: The actual result value was:\nBeyond muscularis propria (pT3). Maximum distance of spread beyond muscularis propria: 5 mm.\nFYI- the second sentence was added to the Cooments, which Meagan was OK with."
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "5"
              },
              {
                "url": "exValue",
                "valueCode": "pT3 Tumour invades through muscularis propria into pericolorectal tissues"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "6"
              },
              {
                "url": "exValue",
                "valueCode": "pT3 Beyond muscularis propria"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "7"
              },
              {
                "url": "exValue",
                "valueCode": "pT2 (just into muscularis propria)"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "8"
              },
              {
                "url": "exValue",
                "valueCode": "Focully just through muscularis propria (pT3)."
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "9"
              },
              {
                "url": "exValue",
                "valueCode": "pT3, tumour invades through full thickness of muscularis propria."
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "10"
              },
              {
                "url": "exValue",
                "valueCode": "ypT3"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "11"
              },
              {
                "url": "exValue",
                "valueCode": "pT3c (5-15mm beyond mascularis propria)"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.micro.maxDegreeLocalInvasion",
        "short": "Maximum degree of local invasion into or through the bowel wall",
        "definition": "The maximum degree of local invasion into or through the bowel wall must be recorded.",
        "requirements": "Single selection value list.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "binding": {
          "strength": "required",
          "description": "A code that indicates the maximum degree of local invasion into or through the bowel wall",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/nehta-nehta-crc-deg-inv-bowel-wall"
          }
        },
        "mapping": [
          {
            "identity": "logical",
            "map": "micro.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28534.1000043"
          },
          {
            "identity": "loinc",
            "map": "33759-2"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "3"
              },
              {
                "url": "exValue",
                "valueCode": "Not involved"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "5"
              },
              {
                "url": "exValue",
                "valueCode": "Not invovled"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "6"
              },
              {
                "url": "exValue",
                "valueCode": "Not invovled"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "7"
              },
              {
                "url": "exValue",
                "valueCode": "Not involved"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "8"
              },
              {
                "url": "exValue",
                "valueCode": "Not involved"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "9"
              },
              {
                "url": "exValue",
                "valueCode": "Not involved"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "10"
              },
              {
                "url": "exValue",
                "valueCode": "Not involved"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "11"
              },
              {
                "url": "exValue",
                "valueCode": "Not involved"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.micro.proximalOrDistalResectionMargins",
        "short": "Involvement of the proximal or distal resection (cut-end) margins",
        "definition": "Involvement of the proximal or distal resection margins (cut-end margins) by tumour must be recorded. If the margin is less than 10 mm, the clearance must be recorded.",
        "requirements": "Single selection value list.\nIf involved is selected, record involved margin(s)\nIf not involved is selected, record microscopic clearance.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "condition": [
          "inv-11",
          "inv-12"
        ],
        "constraint": [
          {
            "key": "inv-12",
            "severity": "error",
            "human": "If the tumour is not involved in the proximal or distal resection (‘cut-end’) margins, then record the microscopic clearance.",
            "xpath": "not(@value = 'Not involved') or exists(f:microClearance)"
          },
          {
            "key": "inv-11",
            "severity": "error",
            "human": "If the tumour is involved in the proximal or distal resection (‘cut-end’) margins, then record invovled margin(s).",
            "xpath": "not(f@value = 'Involved') or exists(f:involvedMargins)"
          }
        ],
        "binding": {
          "strength": "required",
          "description": "A code that indicates involvement of the proximal or distal resection (cut-end) margins",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/nehta-nehta-crc-involved-notinvolved"
          }
        },
        "mapping": [
          {
            "identity": "logical",
            "map": "micro.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28348.1000043"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "2"
              },
              {
                "url": "exValue",
                "valueCode": "Proximal;\nDistal"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.micro.involvedMargins",
        "short": "Involved margin(s)",
        "definition": "Involvement of the proximal or distal resection margins (cut-end margins) by tumour must be recorded. If the margin is less than 10 mm, the clearance must be recorded.",
        "requirements": "Multi select value list (select all that apply).\nThis is a conditional field.",
        "min": 1,
        "max": "*",
        "type": [
          {
            "code": "code"
          }
        ],
        "binding": {
          "strength": "required",
          "description": "A code that indicates the involvement at the margins",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/nehta-nehta-distal-proximal"
          }
        },
        "mapping": [
          {
            "identity": "logical",
            "map": "micro.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28351.1000043"
          },
          {
            "identity": "sct",
            "map": "423105004"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "2"
              },
              {
                "url": "exValue",
                "valueQuantity": {
                  "value": 10,
                  "comparator": ">",
                  "unit": "mm (Proximal)"
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "3"
              },
              {
                "url": "exValue",
                "valueQuantity": {
                  "value": 10,
                  "comparator": ">",
                  "unit": "mm"
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "5"
              },
              {
                "url": "exValue",
                "valueQuantity": {
                  "value": 10,
                  "comparator": ">",
                  "unit": "mm"
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "8"
              },
              {
                "url": "exValue",
                "valueQuantity": {
                  "value": 5,
                  "unit": "mm (anterior)"
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "9"
              },
              {
                "url": "exValue",
                "valueQuantity": {
                  "value": 40,
                  "unit": "mm"
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.micro.marginsMicroClearance",
        "short": "Microscopic Clearance",
        "definition": "If the margin is less than 10 mm, the clearance must be recorded.",
        "comments": "Query how to achieve this??",
        "requirements": "Numeric: ___mm (if the margin is less than 10 mm)\nOR Clearance is ≥10mm.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Quantity",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "logical",
            "map": "micro.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28396.1000043"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "2"
              },
              {
                "url": "exValue",
                "valueCode": "Involved"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "6"
              },
              {
                "url": "exValue",
                "valueCode": "Not invovled"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.micro.nonperitonealisedCircumMargin",
        "short": "Status of the nonperitonealised circumferential margin (rectal tumours)",
        "definition": "The status of the nonperitonealised circumferential margin in rectal tumours must be recorded.",
        "requirements": "Single selection value list.\nConditional on rectum being selected in S2.02\nIf not involved is selected, record microscopic clearance.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "condition": [
          "inv-14"
        ],
        "constraint": [
          {
            "key": "inv-14",
            "severity": "error",
            "human": "If the tumour is a rectal tumour and the status of the nonperitonealised circumferential margin (rectal tumours) is not involved, then the clearance is to be recorded.",
            "xpath": "not(@value = 'Not involved') or exists(f:microClearanceRectum)"
          }
        ],
        "binding": {
          "strength": "required",
          "description": "A code that indicates the status of the nonperitonealised circumferential margin in rectal tumours",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/nehta-nehta-involved-notinvolved"
          }
        },
        "mapping": [
          {
            "identity": "logical",
            "map": "micro.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28354.1000043"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "2"
              },
              {
                "url": "exValue",
                "valueQuantity": {
                  "value": 1,
                  "comparator": "<",
                  "unit": "mm"
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "6"
              },
              {
                "url": "exValue",
                "valueQuantity": {
                  "value": 30,
                  "unit": "mm"
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "7"
              },
              {
                "url": "exValue",
                "valueQuantity": {
                  "value": 35,
                  "unit": "mm"
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "9"
              },
              {
                "url": "exValue",
                "valueQuantity": {
                  "value": 21,
                  "unit": "mm"
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "10"
              },
              {
                "url": "exValue",
                "valueQuantity": {
                  "value": 15,
                  "unit": "mm"
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "11"
              },
              {
                "url": "exValue",
                "valueQuantity": {
                  "value": 5,
                  "unit": "mm"
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.micro.microClearanceRectum",
        "short": "Microscopic Clearance",
        "definition": "In rectal tumours, the minimum distance in millimetres between the tumour and the nonperitonealised (circumferential, radial) margin must be recorded from the histological slides.",
        "requirements": "Is conditional.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Quantity",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "logical",
            "map": "micro.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28400.1000043"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "1"
              },
              {
                "url": "exValue",
                "valueCode": "Present"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "2"
              },
              {
                "url": "exValue",
                "valueCode": "Absent"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "3"
              },
              {
                "url": "exValue",
                "valueCode": "Present"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "5"
              },
              {
                "url": "exValue",
                "valueCode": "Present"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.micro.lymphNodeInvolvement",
        "short": "Lymph node involvement",
        "definition": "Results of lymph node histopathology must be recorded.",
        "requirements": "Single selection value list.\nConditional on nodes being received in G2.02. If G2.02 has been recorded as “not received” this standard is not required.\nIf present, record site(s) and number of lymph nodes.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "condition": [
          "inv-16"
        ],
        "constraint": [
          {
            "key": "inv-16",
            "severity": "error",
            "human": "If tumour positive lymph nodes are present then record the site(s) and numbers of lymph nodes.",
            "xpath": "not(@value = 'Present') or exists(f:lymphNodesDetails)"
          }
        ],
        "binding": {
          "strength": "required",
          "description": "A code that indicates lymph node involvement",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/nehta-nehta-present-absent-na"
          }
        },
        "mapping": [
          {
            "identity": "logical",
            "map": "micro.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28338.1000043"
          },
          {
            "identity": "loinc",
            "map": "?? 21892-5"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "1"
              },
              {
                "url": "exValue",
                "valueString": "Perirectal LN basin: 2/14"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "2"
              },
              {
                "url": "exValue",
                "valueString": "0/8\n\n(Note for Grahame: this is classed as free text clarification as this field is normally only completed when the involvment (field above) is Present.  )"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "3"
              },
              {
                "url": "exValue",
                "valueString": "Left, 2/21"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "5"
              },
              {
                "url": "exValue",
                "valueString": "Left, 2/11"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "7"
              },
              {
                "url": "exValue",
                "valueString": "pN1a, 1/41  (4mm deposit in peritumoral / distal node)"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "8"
              },
              {
                "url": "exValue",
                "valueString": "pN0, 0/36"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "9"
              },
              {
                "url": "exValue",
                "valueString": "pN0, 0/13"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "10"
              },
              {
                "url": "exValue",
                "valueString": "pN 1b\nTotal number: 23\nNumber involved: 2 (with fibrosis regarded as treatment effect in additional 3 nodes)"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "11"
              },
              {
                "url": "exValue",
                "valueString": "pN2a, 4/16"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.micro.lymphNodesDetails",
        "short": "Site(s) and numbers of lymph nodes",
        "definition": "If lymph node(s) received then the site(s) and numbers of lymph nodes must be recorded.",
        "comments": "Query if this field needs to be broken in to a number of fields??",
        "requirements": "Text: Site of lymph node\nAND\nNumeric: ____/_____\n(Number of positive nodes/ Total number of nodes from this site)\nSite is the LN drainage relevant to the site of tumour being reported.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "logical",
            "map": "micro.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28403.1000043"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "1"
              },
              {
                "url": "exValue",
                "valueCode": "Absent"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "2"
              },
              {
                "url": "exValue",
                "valueCode": "Present"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "3"
              },
              {
                "url": "exValue",
                "valueCode": "Present"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "5"
              },
              {
                "url": "exValue",
                "valueCode": "Absent"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "7"
              },
              {
                "url": "exValue",
                "valueCode": "Absent"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "8"
              },
              {
                "url": "exValue",
                "valueCode": "Absent"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "9"
              },
              {
                "url": "exValue",
                "valueCode": "Absent"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "10"
              },
              {
                "url": "exValue",
                "valueCode": "Absent (1 fibrotic focus probable treatment related node but possible sclerosed satellite, block 1T)"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "11"
              },
              {
                "url": "exValue",
                "valueCode": "Yes, present x2"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.micro.extramuralTumourDeposits",
        "short": "Isolated extra-mural tumour deposits",
        "definition": "The presence or absence of isolated extra-mural tumour deposits is to be recorded.",
        "requirements": "Single selection value list.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "binding": {
          "strength": "required",
          "description": "A code that indicates the presence or absence of isolated extra-mural tumour deposits.",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/nehta-nehta-present-absent-na"
          }
        },
        "mapping": [
          {
            "identity": "logical",
            "map": "micro.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28392.1000043"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "1"
              },
              {
                "url": "exValue",
                "valueCode": "Absent"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "2"
              },
              {
                "url": "exValue",
                "valueCode": "Absent"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "3"
              },
              {
                "url": "exValue",
                "valueCode": "Absent"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "5"
              },
              {
                "url": "exValue",
                "valueCode": "Absent"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "8"
              },
              {
                "url": "exValue",
                "valueCode": "Absent"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "9"
              },
              {
                "url": "exValue",
                "valueCode": "Absent"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "10"
              },
              {
                "url": "exValue",
                "valueCode": "Absent"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "11"
              },
              {
                "url": "exValue",
                "valueCode": "Yes, 2mm deposit (1E)"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.micro.apicalNodeInvolvement",
        "short": "Apical node involvement",
        "definition": "Involvement of the apical lymph node should be recorded.",
        "requirements": "Single selection value list.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "binding": {
          "strength": "required",
          "description": "A code that indicates apical node involvement",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/nehta-nehta-present-absent-na"
          }
        },
        "mapping": [
          {
            "identity": "logical",
            "map": "micro.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28407.1000043"
          }
        ]
      },
      {
        "path": "Colorectal.micro.venousSmallVesselInvasion",
        "short": "Venous and small vessel invasion",
        "definition": "For all tumours, venous and small vessel invasion must be reported and its anatomic location specified as intramural or extramural.",
        "comments": "This is just a header and is not a data field\n?? How to be entered in the resource.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "logical",
            "map": "micro.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28411.1000043"
          },
          {
            "identity": "sct",
            "map": "371512006"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "1"
              },
              {
                "url": "exValue",
                "valueCode": "Present"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "2"
              },
              {
                "url": "exValue",
                "valueCode": "Not identified"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "3"
              },
              {
                "url": "exValue",
                "valueCode": "Not identified"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "5"
              },
              {
                "url": "exValue",
                "valueCode": "Not identified"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "7"
              },
              {
                "url": "exValue",
                "valueCode": "Not identified"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "8"
              },
              {
                "url": "exValue",
                "valueCode": "Not identified"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "9"
              },
              {
                "url": "exValue",
                "valueCode": "Not identified"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "10"
              },
              {
                "url": "exValue",
                "valueCode": "Not identified"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "11"
              },
              {
                "url": "exValue",
                "valueCode": "Present"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.micro.intramuralVeinInvasion",
        "short": "Intramural vein invasion",
        "definition": "Intramural invasion must be reported on.",
        "requirements": "Single selection value list.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "binding": {
          "strength": "required",
          "description": "A code that indicates intramural vein invasion",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/nehta-nehta-notidentified-present"
          }
        },
        "mapping": [
          {
            "identity": "logical",
            "map": "micro.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28412.1000043"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "1"
              },
              {
                "url": "exValue",
                "valueCode": "Not identified"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "2"
              },
              {
                "url": "exValue",
                "valueCode": "Not identified"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "3"
              },
              {
                "url": "exValue",
                "valueCode": "Not identified"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "5"
              },
              {
                "url": "exValue",
                "valueCode": "Not identified"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "7"
              },
              {
                "url": "exValue",
                "valueCode": "Not identified"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "8"
              },
              {
                "url": "exValue",
                "valueCode": "Present (1F)"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "9"
              },
              {
                "url": "exValue",
                "valueCode": "Not identified"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "10"
              },
              {
                "url": "exValue",
                "valueCode": "Present"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "11"
              },
              {
                "url": "exValue",
                "valueCode": "Present"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.micro.extramuralVeinInvasion",
        "short": "Extramural vein invasion",
        "definition": "Extramural invasion must be reported on.",
        "requirements": "Single selection value list.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "binding": {
          "strength": "required",
          "description": "A code that indicates extramural vein invasion",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/nehta-nehta-notidentified-present"
          }
        },
        "mapping": [
          {
            "identity": "logical",
            "map": "micro.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28415.1000043"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "1"
              },
              {
                "url": "exValue",
                "valueCode": "Not identified"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "2"
              },
              {
                "url": "exValue",
                "valueCode": "Not identified"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "3"
              },
              {
                "url": "exValue",
                "valueCode": "Not identified"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "5"
              },
              {
                "url": "exValue",
                "valueCode": "Not identified"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "7"
              },
              {
                "url": "exValue",
                "valueCode": "Not identified"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "8"
              },
              {
                "url": "exValue",
                "valueCode": "Not identified"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "9"
              },
              {
                "url": "exValue",
                "valueCode": "Suspicious"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "10"
              },
              {
                "url": "exValue",
                "valueCode": "Not identified"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "11"
              },
              {
                "url": "exValue",
                "valueCode": "Present"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.micro.smallVesselInvasion",
        "short": "Small vessel invasion",
        "definition": "Small vessel invasion must be reported on.",
        "requirements": "Single selection value list.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "binding": {
          "strength": "required",
          "description": "A code that indicates small vessel invasion",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/nehta-nehta-notidentified-present-presentextensive"
          }
        },
        "mapping": [
          {
            "identity": "logical",
            "map": "micro.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28418.1000043"
          },
          {
            "identity": "sct",
            "map": "372264001"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "1"
              },
              {
                "url": "exValue",
                "valueCode": "Not identified"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "2"
              },
              {
                "url": "exValue",
                "valueCode": "Not identified"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "5"
              },
              {
                "url": "exValue",
                "valueCode": "Present (focal)"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "7"
              },
              {
                "url": "exValue",
                "valueCode": "Not identified"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "8"
              },
              {
                "url": "exValue",
                "valueCode": "Not identified"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "9"
              },
              {
                "url": "exValue",
                "valueCode": "Not identified"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "10"
              },
              {
                "url": "exValue",
                "valueCode": "Not identified"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "11"
              },
              {
                "url": "exValue",
                "valueCode": "Present"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.micro.perineuralInvasion",
        "short": "Perineural invasion",
        "definition": "Perineural invasion must be reported on.",
        "requirements": "Single selection value list.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "binding": {
          "strength": "required",
          "description": "A code that indicates perineural invasion",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/nehta-nehta-notidentified-present-presentextensive"
          }
        },
        "mapping": [
          {
            "identity": "logical",
            "map": "micro.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28136.1000043"
          },
          {
            "identity": "loinc",
            "map": "33741-0"
          },
          {
            "identity": "sct",
            "map": "371513001"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "1"
              },
              {
                "url": "exValue",
                "valueCode": "Absent"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "2"
              },
              {
                "url": "exValue",
                "valueCode": "Absent"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "3"
              },
              {
                "url": "exValue",
                "valueCode": "Absent"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "5"
              },
              {
                "url": "exValue",
                "valueCode": "Absent"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "7"
              },
              {
                "url": "exValue",
                "valueCode": "Not stated"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "8"
              },
              {
                "url": "exValue",
                "valueCode": "Absent"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "9"
              },
              {
                "url": "exValue",
                "valueCode": "Unknown"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "10"
              },
              {
                "url": "exValue",
                "valueCode": "Nil"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "11"
              },
              {
                "url": "exValue",
                "valueCode": "Not stated"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.micro.histoConfDistMetastases",
        "short": "Histologically confirmed distant metastases",
        "definition": "The presence or absence of histologically confirmed distant metastases must be recorded.",
        "requirements": "Single selection value list.\nIf present, record sites.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "condition": [
          "inv-17"
        ],
        "constraint": [
          {
            "key": "inv-17",
            "severity": "error",
            "human": "If histologically confirmed distant metastases are present then the sites are to be recorded.",
            "xpath": "not(@value = 'Present') or exists(f:site)"
          }
        ],
        "binding": {
          "strength": "required",
          "description": "A code that indicates the presence or absence of histologically confirmed distant metastases",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/nehta-nehta-present-absent-na"
          }
        },
        "mapping": [
          {
            "identity": "logical",
            "map": "micro.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28236.1000043"
          },
          {
            "identity": "sct",
            "map": "399608002"
          }
        ]
      },
      {
        "path": "Colorectal.micro.histoConfDistMetastasesSite",
        "short": "Histologically confirmed distant metastases - site",
        "definition": "The site of histologically confirmed distant metastases must be recorded.",
        "requirements": "Is conditional.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "logical",
            "map": "micro.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28242.1000043"
          },
          {
            "identity": "loinc",
            "map": "21920-4"
          },
          {
            "identity": "sct",
            "map": "385421009"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "1"
              },
              {
                "url": "exValue",
                "valueCode": "Polyps"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "2"
              },
              {
                "url": "exValue",
                "valueCode": "None noted"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "3"
              },
              {
                "url": "exValue",
                "valueCode": "None noted"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "5"
              },
              {
                "url": "exValue",
                "valueCode": "None noted"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "7"
              },
              {
                "url": "exValue",
                "valueCode": "Hyperplastic polyps x 9"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "8"
              },
              {
                "url": "exValue",
                "valueCode": "Pedunculated tubulovillous adenoma 8mm, 55mmproximal to tumour."
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "9"
              },
              {
                "url": "exValue",
                "valueCode": "Nil"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "10"
              },
              {
                "url": "exValue",
                "valueCode": "Nil"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "11"
              },
              {
                "url": "exValue",
                "valueCode": "Nil"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.micro.relCoexistPathabnorm",
        "short": "Relevant coexistent pathological abnormalities",
        "definition": "The relevant coexistent pathological abnormalities must be recorded.",
        "requirements": "Multi select value list (select all that apply).\n?? How is this indicated??\nIf Polyps is selected provide details\nIf Ulcerative colitis or Crohn’s disease is selected record dysplasia\nIf other is selected, provide details in “other abnormality”.",
        "min": 1,
        "max": "*",
        "type": [
          {
            "code": "code"
          }
        ],
        "condition": [
          "inv-18",
          "inv-19",
          "inv-20",
          "inv-21"
        ],
        "constraint": [
          {
            "key": "inv-18",
            "severity": "error",
            "human": "If polyps are present as relevant coexistent pathological abnormalities, then polyp details are to be recorded.",
            "xpath": "not(@value = 'Polyps') or exists(f:polypDetails)"
          },
          {
            "key": "inv-19",
            "severity": "error",
            "human": "If Ulcerative colitis is present as relevant coexistent pathological abnormality, then dysplasia is to be recorded.",
            "xpath": "not(@value = 'Ulcerative colitis') or exists(f:dysplasia)"
          },
          {
            "key": "inv-20",
            "severity": "error",
            "human": "If Crohn's disease is present as relevant coexistent pathological abnormality, then dysplasia is to be recorded.",
            "xpath": "not(@value = 'Crohns disease') or exists(f:dysplasia)"
          },
          {
            "key": "inv-21",
            "severity": "error",
            "human": "If other abnormalities is selected as relevant coexistent pathological abnormality, then other abnormaily details are to be recorded.",
            "xpath": "not(@value = 'Other') or exists(f:otherAbnormality)"
          }
        ],
        "binding": {
          "strength": "required",
          "description": "A code that indicates the relevant coexistent pathological abnormalities",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/nehta-nehta-crc-coexist-path-abnormalities"
          }
        },
        "mapping": [
          {
            "identity": "logical",
            "map": "micro.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28244.1000043"
          },
          {
            "identity": "sct",
            "map": "371498006"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "1"
              },
              {
                "url": "exValue",
                "valueString": "Two tubular adenomata confirmed."
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.micro.polypDetails",
        "short": "Polyp details (type, number, polyposis syndrome criteria met etc)",
        "definition": "The polyp details (type, number, polyposis syndrome criteria met etc) is to be recorded.",
        "requirements": "Is conditional.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "logical",
            "map": "micro.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          }
        ]
      },
      {
        "path": "Colorectal.micro.dysplasia",
        "short": "Dysplasia",
        "definition": "If Ulcerative colitis or Crohns disease is selected for relevant coexistent pathological abnormalities record dysplasia.",
        "comments": "Cannot have an apostrophe in a spreadsheet eg Crohn apostrophe s.",
        "requirements": "Single selection value list.\nIs conditional.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "binding": {
          "strength": "required",
          "description": "A code that indicates dysplasia if Ulcerative colitis or Crohn's disease is selected for relevant coexistent pathological abnormalities",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/nehta-nehta-dysplasia"
          }
        },
        "mapping": [
          {
            "identity": "logical",
            "map": "micro.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          }
        ]
      },
      {
        "path": "Colorectal.micro.otherAbnormality",
        "short": "Other abnormality",
        "definition": "Record any other abnormality.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "logical",
            "map": "micro.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "loinc",
            "map": "44624-5"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "1"
              },
              {
                "url": "exValue",
                "valueString": "Complete resection"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "2"
              },
              {
                "url": "exValue",
                "valueString": "Complete resection"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "3"
              },
              {
                "url": "exValue",
                "valueString": "Complete"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "5"
              },
              {
                "url": "exValue",
                "valueString": "Complete"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "7"
              },
              {
                "url": "exValue",
                "valueString": "R0"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "8"
              },
              {
                "url": "exValue",
                "valueString": "R0"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "9"
              },
              {
                "url": "exValue",
                "valueString": "R0, complete resection, margins histologically negative, no residual tumour left after resection (primary tumour, regional nodes)."
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "10"
              },
              {
                "url": "exValue",
                "valueString": "R0"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "11"
              },
              {
                "url": "exValue",
                "valueString": "R0"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.micro.microResidualTumourStatus",
        "short": "Microscopic residual tumour status (completeness of resection)",
        "definition": "The microscopic residual tumour status (completeness of resection) is to be recorded.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "logical",
            "map": "micro.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28425.1000043"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "1"
              },
              {
                "url": "exValue",
                "valueCode": "Grade 2 (minimal response) Residual cancer outgrown by fibrosis"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "2"
              },
              {
                "url": "exValue",
                "valueCode": "No prior treatment"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "3"
              },
              {
                "url": "exValue",
                "valueCode": "No prior treatment"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "5"
              },
              {
                "url": "exValue",
                "valueCode": "No prior treatment"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "7"
              },
              {
                "url": "exValue",
                "valueCode": "NA"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "8"
              },
              {
                "url": "exValue",
                "valueCode": "Not applicable"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "10"
              },
              {
                "url": "exValue",
                "valueCode": "Minimal response"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.micro.neoadjuvantTherapy",
        "short": "Response to neoadjuvant therapy",
        "definition": "The response to neoadjuvant therapy should be recorded.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "binding": {
          "strength": "required",
          "description": "A code that indicates the response to neoadjuvant therapy",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/nehta-nehta-response-to-neoadjuvant-therapy"
          }
        },
        "mapping": [
          {
            "identity": "logical",
            "map": "micro.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28123.1000043"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "1"
              },
              {
                "url": "exValue",
                "valueString": "The submucosal nodule 20mm from the distal margin is a well differentiated carcinoid tumour, completely excised."
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "2"
              },
              {
                "url": "exValue",
                "valueString": "The submucosal nodule 20mm from the distal margin is a well differentiated carcinoid tumour, completely excised."
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "3"
              },
              {
                "url": "exValue",
                "valueString": "The caecal tumour is an adenocarcinoma, formed by malignant epithelial cells forming branching glands, some with cribriform pattern. These cells have pleomorphic nuclei with prominent nucleoli.\nMaximum distance of spread beyond muscularis propria: 5 mm."
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "10"
              },
              {
                "url": "exValue",
                "valueString": "Grade: 2 (residual cancer outgrown by fibrosis)"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.micro.microComments",
        "short": "Microscopic comments",
        "definition": "Other Microscopic comments should be recorded.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "logical",
            "map": "micro.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28431.1000043"
          },
          {
            "identity": "sct",
            "map": "395527009"
          }
        ]
      },
      {
        "path": "Colorectal.ancillaryTests",
        "short": "Ancillary test findings",
        "definition": "Ancillary test findings are to be recorded.",
        "comments": "This is just a group/section header and is not a result field, but some example reports this field was used as a comment field.",
        "requirements": "Immunohistochemical stains for microsatellite instability will be performed and a supplementary report issued.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Element"
          }
        ],
        "mapping": [
          {
            "identity": "logical",
            "map": "ancillary := dr.result->Observation[code := %map-codes]"
          },
          {
            "identity": "cap",
            "map": "28156.1000043"
          },
          {
            "identity": "loinc",
            "map": "70949-3"
          }
        ]
      },
      {
        "path": "Colorectal.ancillaryTests.mismatchRepairEnz",
        "short": "Mismatch repair enzymes",
        "definition": "Mismatch repair enzymes are to be recorded.",
        "comments": "This is just a sub-group/sub-section header and is not a result field.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Element"
          }
        ],
        "mapping": [
          {
            "identity": "cap",
            "map": "28433.1000043"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "2"
              },
              {
                "url": "exValue",
                "valueCode": "Normal staining"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "7"
              },
              {
                "url": "exValue",
                "valueCode": "Performed on block D"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "8"
              },
              {
                "url": "exValue",
                "valueCode": "Performed on block 1F"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "9"
              },
              {
                "url": "exValue",
                "valueCode": "Preserved nuclear staining in the tumour"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "10"
              },
              {
                "url": "exValue",
                "valueCode": "Performed on block 1C"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "11"
              },
              {
                "url": "exValue",
                "valueCode": "Normal staining"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.ancillaryTests.mlh1",
        "short": "MLH-1",
        "definition": "MLH-1 testing.",
        "requirements": "Single selection value list.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "binding": {
          "strength": "required",
          "description": "A code that indicates MLH-1 testing",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/nehta-nehta-stain-type"
          }
        },
        "mapping": [
          {
            "identity": "logical",
            "map": "ancillary.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28434.1000043"
          },
          {
            "identity": "loinc",
            "map": "50322-7"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "2"
              },
              {
                "url": "exValue",
                "valueCode": "Normal staining"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "7"
              },
              {
                "url": "exValue",
                "valueCode": "Normal staining"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "8"
              },
              {
                "url": "exValue",
                "valueCode": "Normal staining"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "9"
              },
              {
                "url": "exValue",
                "valueCode": "Preserved nuclear staining in the tumour"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "10"
              },
              {
                "url": "exValue",
                "valueCode": "Normal staining"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "11"
              },
              {
                "url": "exValue",
                "valueCode": "Normal staining"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.ancillaryTests.pms2",
        "short": "PMS-2",
        "definition": "PMS-2 testing.",
        "requirements": "Single selection value list.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "binding": {
          "strength": "required",
          "description": "A code that indicates PMS-2 testing",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/nehta-nehta-stain-type"
          }
        },
        "mapping": [
          {
            "identity": "logical",
            "map": "ancillary.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28442.1000043"
          },
          {
            "identity": "loinc",
            "map": "50328-4"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "2"
              },
              {
                "url": "exValue",
                "valueCode": "Normal staining"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "9"
              },
              {
                "url": "exValue",
                "valueCode": "Preserved nuclear staining in the tumour"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "10"
              },
              {
                "url": "exValue",
                "valueCode": "Abnormal staining"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "11"
              },
              {
                "url": "exValue",
                "valueCode": "Normal staining"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.ancillaryTests.msh2",
        "short": "MSH-2",
        "definition": "MSH-2 testing.",
        "requirements": "Single selection value list.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "binding": {
          "strength": "required",
          "description": "A code that indicates MSH-2 testing",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/nehta-nehta-stain-type"
          }
        },
        "mapping": [
          {
            "identity": "logical",
            "map": "ancillary.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28493.1000043"
          },
          {
            "identity": "loinc",
            "map": "50323-5"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "2"
              },
              {
                "url": "exValue",
                "valueCode": "Normal staining"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "7"
              },
              {
                "url": "exValue",
                "valueCode": "Normal staining"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "8"
              },
              {
                "url": "exValue",
                "valueCode": "Normal staining"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "9"
              },
              {
                "url": "exValue",
                "valueCode": "Preserved nuclear staining in the tumour"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "10"
              },
              {
                "url": "exValue",
                "valueCode": "Abnormal staining"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "11"
              },
              {
                "url": "exValue",
                "valueCode": "Normal staining"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.ancillaryTests.msh6",
        "short": "MSH-6",
        "definition": "MSH-6 testing.",
        "requirements": "Single selection value list.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "binding": {
          "strength": "required",
          "description": "A code that indicates MSH-6 testing",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/nehta-nehta-stain-type"
          }
        },
        "mapping": [
          {
            "identity": "logical",
            "map": "ancillary.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28544.1000043"
          },
          {
            "identity": "loinc",
            "map": "50324-3"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "1"
              },
              {
                "url": "exValue",
                "valueString": "Immunohistochemistry for mismatch repair gene products:  staining of carcinoma cells for MLH-1, PMS-2, MSH-2 and MSH-6 is present."
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "2"
              },
              {
                "url": "exValue",
                "valueString": "Mismatch repair gene deficiency NOT identified"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "7"
              },
              {
                "url": "exValue",
                "valueString": "High-level microsatellite instability (MSI-H) is very unlikely."
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "8"
              },
              {
                "url": "exValue",
                "valueString": "High-level microsatellite instability (MSI-H) is very unlikely."
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "9"
              },
              {
                "url": "exValue",
                "valueString": "Preserved nuclear staining for mismatch repair proteins MLH1, PMS2, MSH2 and MSH6 indicates a low likelihood of microsatellite instability phenotype."
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "10"
              },
              {
                "url": "exValue",
                "valueString": "There is strong nuclear staining (normal pattern) ini only a minor component of the residual tumour (block 1C) and attenuated (MSH2) or loss (MSH6) to staining in the rest.  Whilst this abnormal staining pattern is likely to be secondary to the neoadjuvant therapy, thurther investigation to exclude germline mutation in MSH2 and MSH6 should be considered."
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "11"
              },
              {
                "url": "exValue",
                "valueString": "High-level microsatellite instability (MSI-H) is very unlikely."
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.ancillaryTests.comments",
        "short": "Mismatch repair enzyme comments",
        "definition": "Mismatch repair enzyme comments can be recorded.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "logical",
            "map": "ancillary.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28436.1000043"
          },
          {
            "identity": "loinc",
            "map": "8262-8"
          }
        ]
      },
      {
        "path": "Colorectal.ancillaryTests.msi",
        "short": "Microsatellite instability (MSI)",
        "definition": "Microsatellite instability (MSI) to be recorded.",
        "comments": "This is just a group/section header and is not a result field.",
        "requirements": "Single selection value list.\nIf unstable or stable, record laboratory performing test and report number.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Element"
          }
        ],
        "condition": [
          "inv-22",
          "inv-23"
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "7"
              },
              {
                "url": "exValue",
                "valueCode": "Not tested"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "8"
              },
              {
                "url": "exValue",
                "valueCode": "Not tested"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "10"
              },
              {
                "url": "exValue",
                "valueCode": "Not tested"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "11"
              },
              {
                "url": "exValue",
                "valueCode": "Not tested"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.ancillaryTests.msi.code",
        "short": "Microsatellite instability (MSI)",
        "definition": "Microsatellite instability (MSI) to be recorded.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "constraint": [
          {
            "key": "inv-22",
            "severity": "error",
            "human": "If MSI unstable, record laboratory performing test and report number",
            "xpath": "not(@value = 'Unstable') or exists(f:LabDetails)"
          },
          {
            "key": "inv-23",
            "severity": "error",
            "human": "If MSI stable, record laboratory performing test and report number",
            "xpath": "not(@value = 'Stable') or exists(f:LabDetails)"
          }
        ],
        "binding": {
          "strength": "required",
          "description": "A code that indicates Microsatellite instability (MSI)",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/nehta-nehta-unstable-stable"
          }
        },
        "mapping": [
          {
            "identity": "logical",
            "map": "ancillary.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28399.1000043"
          },
          {
            "identity": "loinc",
            "map": "email to Meagan"
          },
          {
            "identity": "sct",
            "map": "443412009"
          }
        ]
      },
      {
        "path": "Colorectal.ancillaryTests.msi.comments",
        "short": "Microsatellite instability (MSI) comments",
        "definition": "Microsatellite instability (MSI) comments can be recorded.",
        "requirements": "Conditional.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "logical",
            "map": "ancillary.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28453.1000043"
          }
        ]
      },
      {
        "path": "Colorectal.ancillaryTests.msi.labDetails",
        "short": "MSI laboratory performing test and report number",
        "definition": "Microsatellite instability (MSI) laboratory performing test and report number can be recorded.",
        "requirements": "Conditional.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "logical",
            "map": "ancillary.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28447.1000043"
          }
        ]
      },
      {
        "path": "Colorectal.ancillaryTests.braf",
        "short": "BRAF (V600E mutation)",
        "definition": "BRAF (V600E mutation) testing.",
        "comments": "This is just a group/section header and is not a result field.",
        "requirements": "Single selection value list.\nIf mutated or wild type, record laboratory performing test and report number.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Element"
          }
        ],
        "condition": [
          "inv-24",
          "inv-25"
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "7"
              },
              {
                "url": "exValue",
                "valueCode": "Not tested"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "8"
              },
              {
                "url": "exValue",
                "valueCode": "Not tested"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "9"
              },
              {
                "url": "exValue",
                "valueCode": "Not tested"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "10"
              },
              {
                "url": "exValue",
                "valueCode": "Not tested"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "11"
              },
              {
                "url": "exValue",
                "valueCode": "Not tested"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.ancillaryTests.braf.code",
        "short": "BRAF (V600E mutation)",
        "definition": "BRAF (V600E mutation) testing.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "constraint": [
          {
            "key": "inv-24",
            "severity": "error",
            "human": "If BRAF mutated, record laboratory performing test and report number",
            "xpath": "not(@value = 'Mutated') or exists(f:LabDetails)"
          },
          {
            "key": "inv-25",
            "severity": "error",
            "human": "If BRAF wild type, record laboratory performing test and report number",
            "xpath": "not(@value = 'Wild type') or exists(f:LabDetails)"
          }
        ],
        "binding": {
          "strength": "required",
          "description": "A code that indicates the BRAF (V600E mutation)",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/nehta-nehta-mutated-wildtype"
          }
        },
        "mapping": [
          {
            "identity": "logical",
            "map": "ancillary.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28454.1000043"
          },
          {
            "identity": "loinc",
            "map": "58483-9"
          }
        ]
      },
      {
        "path": "Colorectal.ancillaryTests.braf.comments",
        "short": "BRAF (V600E mutation) comments",
        "definition": "BRAF (V600E mutation) comments can be recorded.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "logical",
            "map": "ancillary.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28460.1000043"
          },
          {
            "identity": "loinc",
            "map": "8264-4"
          }
        ]
      },
      {
        "path": "Colorectal.ancillaryTests.braf.labDetails",
        "short": "BRAF (V600E mutation) laboratory performing test and report number",
        "definition": "BRAF (V600E mutation) laboratory performing test and report number can be recorded.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "logical",
            "map": "ancillary.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28459.1000043"
          }
        ]
      },
      {
        "path": "Colorectal.ancillaryTests.kras",
        "short": "KRAS gene mutation (codons 12 and 13)",
        "definition": "KRAS gene mutation (codons 12 and 13) testing.",
        "comments": "This is just a group/section header and is not a result field.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Element"
          }
        ],
        "condition": [
          "inv-26",
          "inv-27"
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "7"
              },
              {
                "url": "exValue",
                "valueCode": "Not tested"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "8"
              },
              {
                "url": "exValue",
                "valueCode": "Not tested"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "9"
              },
              {
                "url": "exValue",
                "valueCode": "Not tested"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "10"
              },
              {
                "url": "exValue",
                "valueCode": "Not tested"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "11"
              },
              {
                "url": "exValue",
                "valueCode": "Not tested"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.ancillaryTests.kras.code",
        "short": "KRAS gene mutation (codons 12 and 13)",
        "definition": "KRAS gene mutation (codons 12 and 13) testing.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "constraint": [
          {
            "key": "inv-27",
            "severity": "error",
            "human": "If KRAS wild type, record laboratory performing test and report number",
            "xpath": "not(@value = 'Wild type') or exists(f:LabDetails)"
          },
          {
            "key": "inv-26",
            "severity": "error",
            "human": "If KRAS mutated, record laboratory performing test and report number",
            "xpath": "not(@value = 'Mutated') or exists(f:LabDetails)"
          }
        ],
        "binding": {
          "strength": "required",
          "description": "A code that indicates the KRAS gene mutation (codons 12 and 13)",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/nehta-nehta-mutated-wildtype"
          }
        },
        "mapping": [
          {
            "identity": "logical",
            "map": "ancillary.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28461.1000043"
          },
          {
            "identity": "loinc",
            "map": "21703-4"
          }
        ]
      },
      {
        "path": "Colorectal.ancillaryTests.kras.comments",
        "short": "KRAS gene mutation (codons 12 and 13) comments",
        "definition": "KRAS gene mutation (codons 12 and 13) comments can be recorded.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "logical",
            "map": "ancillary.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28465.1000043"
          },
          {
            "identity": "loinc",
            "map": "8266-9"
          }
        ]
      },
      {
        "path": "Colorectal.ancillaryTests.kras.labDetails",
        "short": "KRAS gene mutation (codons 12 and 13) laboratory performing test and report number",
        "definition": "KRAS gene mutation (codons 12 and 13) laboratory performing test and report number can be recorded.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "logical",
            "map": "ancillary.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28466.1000043"
          }
        ]
      },
      {
        "path": "Colorectal.synthesisOverview",
        "short": "Synthesis and Overview",
        "definition": "Synthesis and Overview are to be recorded.",
        "comments": "This is just a group/section header and is not a result field.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Element"
          }
        ],
        "mapping": [
          {
            "identity": "logical",
            "map": "synthesis := dr.result->Observation[code := %map-codes]"
          },
          {
            "identity": "cap",
            "map": "28253.1000043"
          },
          {
            "identity": "loinc",
            "map": "70949-3"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "1"
              },
              {
                "url": "exValue",
                "valueString": "ypT3, pN1b, cM0"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "2"
              },
              {
                "url": "exValue",
                "valueString": "ypT3, pN0, cM0"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "3"
              },
              {
                "url": "exValue",
                "valueString": "pT3, pN1, cM0"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "5"
              },
              {
                "url": "exValue",
                "valueString": "pT3, pN1, cM0"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "7"
              },
              {
                "url": "exValue",
                "valueString": "pT2N1aMX"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "8"
              },
              {
                "url": "exValue",
                "valueString": "pT3N0 cM0"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "9"
              },
              {
                "url": "exValue",
                "valueString": "pT3, pN0, pMX"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "10"
              },
              {
                "url": "exValue",
                "valueString": "ypY3 N1b cM0"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "11"
              },
              {
                "url": "exValue",
                "valueString": "pT3cN2aMX"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.synthesisOverview.tumourStage",
        "short": "Tumour stage",
        "definition": "Tumour stage is to be recorded.",
        "comments": "This is just a sub-group/sub-section header and is not a result field.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "logical",
            "map": "synthesis.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28204.1000043"
          },
          {
            "identity": "sct",
            "map": "371508000"
          }
        ]
      },
      {
        "path": "Colorectal.synthesisOverview.tumourStageT",
        "short": "T",
        "definition": "Tumour stage T is to be recorded.",
        "requirements": "Single selection value list.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "binding": {
          "strength": "required",
          "description": "A code that records tumour stage T",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/nehta-nehta-crc-tumour-stage-t"
          }
        },
        "mapping": [
          {
            "identity": "logical",
            "map": "synthesis.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28210.1000043"
          },
          {
            "identity": "loinc",
            "map": "21899-0"
          },
          {
            "identity": "sct",
            "map": "78873005"
          }
        ]
      },
      {
        "path": "Colorectal.synthesisOverview.tumourStageN",
        "short": "N",
        "definition": "Tumour stage N is to be recorded.",
        "requirements": "Single selection value list.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "binding": {
          "strength": "required",
          "description": "A code that records tumour stage N",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/nehta-nehta-crc-tumour-stage-n"
          }
        },
        "mapping": [
          {
            "identity": "logical",
            "map": "synthesis.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28220.1000043"
          },
          {
            "identity": "loinc",
            "map": "21900-6"
          }
        ]
      },
      {
        "path": "Colorectal.synthesisOverview.tumourStageM",
        "short": "M",
        "definition": "Tumour stage M is to be recorded.",
        "requirements": "Single selection value list.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "binding": {
          "strength": "required",
          "description": "A code that records tumour stage M",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/nehta-nehta-crc-tumour-stage-m"
          }
        },
        "mapping": [
          {
            "identity": "logical",
            "map": "synthesis.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28552.1000043"
          },
          {
            "identity": "loinc",
            "map": "67211-3"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "1"
              },
              {
                "url": "exValue",
                "valueCode": "IIIB"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "2"
              },
              {
                "url": "exValue",
                "valueCode": "IIA"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "3"
              },
              {
                "url": "exValue",
                "valueCode": "IIIB"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "5"
              },
              {
                "url": "exValue",
                "valueCode": "IIIB"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "7"
              },
              {
                "url": "exValue",
                "valueCode": "IIIA"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "8"
              },
              {
                "url": "exValue",
                "valueCode": "IIA"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "9"
              },
              {
                "url": "exValue",
                "valueCode": "IIA (Dukes stage B)"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "10"
              },
              {
                "url": "exValue",
                "valueCode": "IIIB"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "11"
              },
              {
                "url": "exValue",
                "valueCode": "IIIB"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.synthesisOverview.tumourStageGrouping",
        "short": "Stage grouping",
        "definition": "Tumour stage grouping is to be recorded.",
        "comments": "Check the formatting of the result group.",
        "requirements": "Single selection value list.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "binding": {
          "strength": "required",
          "description": "A code that records tumour stage grouping",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/nehta-tumour-stage-grouping"
          }
        },
        "mapping": [
          {
            "identity": "logical",
            "map": "synthesis.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28243.1000043"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "3"
              },
              {
                "url": "exValue",
                "valueString": "AJCC 2010, 7th edition"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "5"
              },
              {
                "url": "exValue",
                "valueString": "AJCC 2010, 7th edition"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.synthesisOverview.tumourStagingSystem",
        "short": "Year and/or edition of staging system",
        "definition": "Year and/or edition of staging system is to be recorded.",
        "requirements": "Numeric: year\nAND/OR\nText: Edition eg 1st, 2nd etc.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "logical",
            "map": "synthesis.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "loinc",
            "map": "? 67203-0"
          },
          {
            "identity": "sct",
            "map": "443941007"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "2"
              },
              {
                "url": "exValue",
                "valueString": "R0"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "3"
              },
              {
                "url": "exValue",
                "valueString": "R0"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "5"
              },
              {
                "url": "exValue",
                "valueString": "R0"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "7"
              },
              {
                "url": "exValue",
                "valueString": "R0"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "8"
              },
              {
                "url": "exValue",
                "valueString": "R0"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "9"
              },
              {
                "url": "exValue",
                "valueString": "R0"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "10"
              },
              {
                "url": "exValue",
                "valueString": "R0"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "11"
              },
              {
                "url": "exValue",
                "valueString": "R0"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.synthesisOverview.residualTumourStatus",
        "short": "Residual tumour status",
        "definition": "The residual tumour status must be recorded according to the AJCC Cancer Staging Manual (7th Edition).",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "binding": {
          "strength": "required",
          "description": "An R code that records the residual tumour status",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/nehta-nehta-residual-tumour-status"
          }
        },
        "mapping": [
          {
            "identity": "logical",
            "map": "synthesis.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28317.1000043"
          },
          {
            "identity": "sct",
            "map": "17964000"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "2"
              },
              {
                "url": "exValue",
                "valueString": "Low rectal tumour, ultralow anterior resection with proximal and distal donuts:\n- Moderately differentiated adenocarcinoma, invading into perirectal fat.\n- Less than 1mm from circumferential radial margin.\n- Proximal and distal margins free of tumour.\n- 8 lymph nodes, all benign.\n- No MSI loss detected by immunohistochemistry."
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "7"
              },
              {
                "url": "exValue",
                "valueString": "Diagnostic Summary:\nSpecimen type: Abdominoperineal resection\nTumour site: Distal rectum, 35mm below anterior peritoneal reflection, 12 mm above dentate line.\nTumour type: Low grade adenocarcinoma NOS, microsatellite stable (IHC)\nTumour stage: pT2N1aMX, stage IIIA\nCompleteness of excision: R0\n\nDiagnosis:\nAbdominoperineal resection, distal rectum\n- low grade adenocarcinoma NOS, 30mm, microsatellite stable (IHC)\n\nLymph nodes \n-  +1/41, metastatic carcinoma in one of forty-one nodes, apical node clear\n\nTNM class AJCC stage (7th)\n- pT2N1aMX, stage IIIA, R0\n\nPolyps \n- Hyperplastic polyps x9 (<5mm)"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "8"
              },
              {
                "url": "exValue",
                "valueString": "Diagnostic Summary:\nSpecimen type: Ultra-low anterior resection\nTumour site: Rectum\nTumour type: Adenocarcinoma, poorly differentiated tumour budding\nTumour stage: pT3N0 cM, stage IIA\nCompleteness of excision: Complete\n\nDiagnosis:\n1. Rectum and Sigmoid, ultrlow anterior resection:\n- Adenocarcinoma NOS, 30x28x15mm, poorly differentiated tumour budding, focal extramural venous invasion.\n- radial clearance 5mm, distal clearance 12mm.\nLymph nodes: 0/36; thirty-six benign lymph nodes.\nTNM class, AJCC stage (7th): pT3N0 cM0, stage IIA, R0\nPolyp, upper rectum: Tubulovillous adenoma, 8mm.\n2. Distal donut: No evidence of malignancy"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "9"
              },
              {
                "url": "exValue",
                "valueString": "Diagnostic Summary:\nSpecimen type:High anterior resection\nTumour site: Rectum-sigmoid colon\nTumour type: Adenocarcinoma\nTumour stage: pT3. n0, Mx, R0\nCompleteness of excision: Completely excised\n\nDiagnosis:\n1. Anterior resection:\n- Moderately differentiated adenocarcinoma, recto-sigmoid, completely excised.\n- Focus suspicious for lymphovascular invasion\n- no evidence of malignancy in thirteen lymph nodes (0/13)\n- pT3, n0, MX, R0, stage IIA (Dukes stage B)\n2. Distal donut - No evidence of malignancy\n3. Proximal donut - No evidence of malignancy"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "10"
              },
              {
                "url": "exValue",
                "valueString": "Diagnostic Summary:\nSpecimen type:Anterior resection\nTumour site: Upper rectum 300mm above level of anterior peritoneal reflection\nTumour type: Adenocarcinoma NOS Low grade (post therapy) microsatellite stable\nTumour stage: ypT3 N1b cMx cM0; stage IIIB\nCompleteness of excision: R0\n\nDiagnosis:\n1. Upper rectum:\nUpper rectum\n- Redidual adenocarcinoma NOS, minimal response to therapy (TRG 2)\n- Extramural venous invasion\nLymph nodes\n- +2/23; metastatic carcinoma in two of twenty-three nodes, treatment related changes in additional three nodes, apical node clear.\nTNM class AJCC Stage (7th) \n- ypT3N1b cM0; stage IIIB; R0\nMMR IHC\n- Pending, supplementary report to follow\n2. Distal rectal donut - No evidence of malignancy"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "11"
              },
              {
                "url": "exValue",
                "valueString": "Diagnostic Summary:\nSpecimen type:Low anterior resection\nTumour site: Rectum\nTumour type: Adenocarcinoma NOS, microsatellite stable, variable differentiation including poorly differentiated areas\nTumour stage: pT3cN2aMx; stage IIIB\nCompleteness of excision: R0\n\nDiagnosis:\n1. Low anterior resection rectum:\n- High grade adenocarcinoma NOS, 30x25mm, microsatellite stable\n- Venous invasion, lymphatic permeation and perineural invasion present\nLymph nodes\n- +4/16; metastatic carcinoma in four of sixteen nodes\n- Apical node involved\n- extranural satellite deposits x2.\nTNM class AJCC Stage (7th) \n- pT3cN2aMX; stage IIIB; R0\n2. Proximal donut - Benign colonic tissue\n3. Distal  donut - Benign rectal tissue"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.synthesisOverview.diagnosticSummary",
        "short": "Diagnostic summary",
        "definition": "Diagnostic summary is to be recorded.",
        "requirements": "Include:\na. specimen type\nb. tumour site\nc. tumour type\nd. tumour stage\ne. completeness of excision.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "logical",
            "map": "dr[conclusion := $value]"
          },
          {
            "identity": "cap",
            "map": "28842.1000043"
          },
          {
            "identity": "loinc",
            "map": "34574-4"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "1"
              },
              {
                "url": "exValue",
                "valueCode": "New primary"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "2"
              },
              {
                "url": "exValue",
                "valueCode": "New primary"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "3"
              },
              {
                "url": "exValue",
                "valueCode": "New primary"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "5"
              },
              {
                "url": "exValue",
                "valueCode": "New primary"
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.synthesisOverview.newPrimaryOrRecurrence",
        "short": "New primary cancer or recurrence",
        "definition": "New primary cancer or recurrence is to be recorded.",
        "requirements": "Single selection value list.\nIf regional (local) recurrence or distant metastasis describe.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "binding": {
          "strength": "required",
          "description": "A code that records whether a new primary cancer or a recurrence",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/nehta-nehta-new-cancer-or-recurrence"
          }
        },
        "mapping": [
          {
            "identity": "logical",
            "map": "synthesis.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28472.1000043"
          }
        ]
      },
      {
        "path": "Colorectal.synthesisOverview.newDescription",
        "short": "Describe",
        "definition": "Description of regional (local) recurrence or distant metastases.",
        "requirements": "Conditional.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ]
      },
      {
        "extension": [
          {
            "extension": [
              {
                "url": "index",
                "valueString": "1"
              },
              {
                "url": "exValue",
                "valueString": "Mismatch repair gene deficiency is not identified."
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          },
          {
            "extension": [
              {
                "url": "index",
                "valueString": "2"
              },
              {
                "url": "exValue",
                "valueString": "Mismatch repair gene deficiency identified."
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-example"
          }
        ],
        "path": "Colorectal.synthesisOverview.overarchingComment",
        "short": "Overarching comment",
        "definition": "Synthesis and overview overarching comment.",
        "requirements": "Conditional.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "logical",
            "map": "synthesis.related[type:='has-member'].target->Observation[code:=%map-codes; value[x] := $value]"
          },
          {
            "identity": "cap",
            "map": "28252.1000043"
          },
          {
            "identity": "loinc",
            "map": "22638-1"
          }
        ]
      }
    ]
  }
}

Usage note: every effort has been made to ensure that the examples are correct and useful, but they are not a normative part of the specification.