{
  "resourceType": "StructureDefinition",
  "id": "el-observation-contactLensTrialEvaluation",
  "url": "http://fhir.essilorluxottica.com/fhir/StructureDefinition/el-observation-contactLensTrialEvaluation",
  "version": "1.0.0",
  "name": "ELContactLensTrialEvaluation",
  "title": "EL Contact Lens Trial Evaluation Profile",
  "status": "draft",
  "description": "The EL Contact Lens Trial Evaluation Profile inherits from Observation resource. The profile contains all the elements in the Contact Lens Trial Evaluation section in the VisionX EHR application.",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Observation",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Observation",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Observation.meta.extension",
        "path": "Observation.meta.extension",
        "min": 1
      },
      {
        "id": "Observation.meta.extension:organization",
        "path": "Observation.meta.extension",
        "sliceName": "organization",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://fhir.essilorluxottica.com/fhir/StructureDefinition/el-meta-organization-extension"
            ]
          }
        ]
      },
      {
        "id": "Observation.meta.tag",
        "path": "Observation.meta.tag",
        "binding": {
          "strength": "required",
          "valueSet": "http://fhir.essilorluxottica.com/fhir/ValueSet/el-metatag-vs"
        }
      },
      {
        "id": "Observation.status",
        "path": "Observation.status",
        "patternCode": "final"
      },
      {
        "id": "Observation.category",
        "path": "Observation.category",
        "patternCodeableConcept": {
          "coding": [
            {
              "code": "exam",
              "system": "http://terminology.hl7.org/CodeSystem/observation-category"
            }
          ]
        }
      },
      {
        "id": "Observation.code",
        "path": "Observation.code",
        "patternCodeableConcept": {
          "coding": [
            {
              "code": "contactLensTrial.evaluation",
              "system": "http://fhir.essilorluxottica.com/fhir/CodeSystem/el-sectioncode-cs"
            }
          ]
        }
      },
      {
        "id": "Observation.subject",
        "path": "Observation.subject",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.essilorluxottica.com/fhir/StructureDefinition/el-patient"
            ]
          }
        ]
      },
      {
        "id": "Observation.encounter",
        "path": "Observation.encounter",
        "min": 1
      },
      {
        "id": "Observation.note",
        "path": "Observation.note",
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Observation.bodySite",
        "path": "Observation.bodySite",
        "min": 1,
        "binding": {
          "strength": "required",
          "valueSet": "http://fhir.essilorluxottica.com/fhir/ValueSet/el-eyelocation-single-vs"
        }
      },
      {
        "id": "Observation.component",
        "path": "Observation.component",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "code"
            }
          ],
          "rules": "open",
          "description": "Slice based on the component.code value"
        },
        "min": 1
      },
      {
        "id": "Observation.component:lensMovement",
        "path": "Observation.component",
        "sliceName": "lensMovement",
        "min": 0,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Observation.component:lensMovement.code",
        "path": "Observation.component.code",
        "patternCodeableConcept": {
          "coding": [
            {
              "code": "lensMovement",
              "system": "http://fhir.essilorluxottica.com/fhir/CodeSystem/el-observation-componentcode-cs",
              "display": "Lens Movement"
            }
          ]
        }
      },
      {
        "id": "Observation.component:lensMovement.value[x]",
        "path": "Observation.component.value[x]",
        "type": [
          {
            "code": "Quantity"
          }
        ]
      },
      {
        "id": "Observation.component:lensMovement.value[x].unit",
        "path": "Observation.component.value[x].unit",
        "patternString": "mm"
      },
      {
        "id": "Observation.component:lensCentration",
        "path": "Observation.component",
        "sliceName": "lensCentration",
        "min": 0,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Observation.component:lensCentration.code",
        "path": "Observation.component.code",
        "patternCodeableConcept": {
          "coding": [
            {
              "code": "lensCentration",
              "system": "http://fhir.essilorluxottica.com/fhir/CodeSystem/el-observation-componentcode-cs",
              "display": "Lens Centration"
            }
          ]
        }
      },
      {
        "id": "Observation.component:lensCentration.value[x]",
        "path": "Observation.component.value[x]",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "binding": {
          "strength": "required",
          "valueSet": "http://fhir.essilorluxottica.com/fhir/ValueSet/el-observation-lensCentration-vs"
        }
      },
      {
        "id": "Observation.component:lensRotation",
        "path": "Observation.component",
        "sliceName": "lensRotation",
        "min": 0,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Observation.component:lensRotation.code",
        "path": "Observation.component.code",
        "patternCodeableConcept": {
          "coding": [
            {
              "code": "lensRotation",
              "system": "http://fhir.essilorluxottica.com/fhir/CodeSystem/el-observation-componentcode-cs",
              "display": "Lens Rotation"
            }
          ]
        }
      },
      {
        "id": "Observation.component:lensRotation.value[x]",
        "path": "Observation.component.value[x]",
        "type": [
          {
            "code": "Quantity"
          }
        ]
      },
      {
        "id": "Observation.component:lensRotation.value[x].unit",
        "path": "Observation.component.value[x].unit",
        "patternString": "deg"
      },
      {
        "id": "Observation.component:lensDirection",
        "path": "Observation.component",
        "sliceName": "lensDirection",
        "min": 0,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Observation.component:lensDirection.code",
        "path": "Observation.component.code",
        "patternCodeableConcept": {
          "coding": [
            {
              "code": "lensDirection",
              "system": "http://fhir.essilorluxottica.com/fhir/CodeSystem/el-observation-componentcode-cs",
              "display": "Lens Rotation Direction"
            }
          ]
        }
      },
      {
        "id": "Observation.component:lensDirection.value[x]",
        "path": "Observation.component.value[x]",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "binding": {
          "strength": "required",
          "valueSet": "http://fhir.essilorluxottica.com/fhir/ValueSet/el-observation-lensDirection-vs"
        }
      },
      {
        "id": "Observation.component:lensCoverage",
        "path": "Observation.component",
        "sliceName": "lensCoverage",
        "min": 0,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Observation.component:lensCoverage.code",
        "path": "Observation.component.code",
        "patternCodeableConcept": {
          "coding": [
            {
              "code": "lensCoverage",
              "system": "http://fhir.essilorluxottica.com/fhir/CodeSystem/el-observation-componentcode-cs",
              "display": "Lens Coverage"
            }
          ]
        }
      },
      {
        "id": "Observation.component:lensCoverage.value[x]",
        "path": "Observation.component.value[x]",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "binding": {
          "strength": "required",
          "valueSet": "http://fhir.essilorluxottica.com/fhir/ValueSet/el-observation-lensCoverage-vs"
        }
      },
      {
        "id": "Observation.component:lensAlignment",
        "path": "Observation.component",
        "sliceName": "lensAlignment",
        "min": 0,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Observation.component:lensAlignment.code",
        "path": "Observation.component.code",
        "patternCodeableConcept": {
          "coding": [
            {
              "code": "lensAlignment",
              "system": "http://fhir.essilorluxottica.com/fhir/CodeSystem/el-observation-componentcode-cs",
              "display": "Lens Alignment"
            }
          ]
        }
      },
      {
        "id": "Observation.component:lensAlignment.value[x]",
        "path": "Observation.component.value[x]",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "binding": {
          "strength": "required",
          "valueSet": "http://fhir.essilorluxottica.com/fhir/ValueSet/el-observation-lensAlignment-vs"
        }
      },
      {
        "id": "Observation.component:lensComfort",
        "path": "Observation.component",
        "sliceName": "lensComfort",
        "min": 0,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "Observation.component:lensComfort.code",
        "path": "Observation.component.code",
        "patternCodeableConcept": {
          "coding": [
            {
              "code": "lensComfort",
              "system": "http://fhir.essilorluxottica.com/fhir/CodeSystem/el-observation-componentcode-cs",
              "display": "Lens Comfort"
            }
          ]
        }
      },
      {
        "id": "Observation.component:lensComfort.value[x]",
        "path": "Observation.component.value[x]",
        "type": [
          {
            "code": "string"
          }
        ]
      }
    ]
  }
}