{
  "resourceType": "StructureDefinition",
  "meta": {},
  "url": "http://roche.com/fhir/rdc/StructureDefinition/advice-option-observation",
  "version": "1",
  "name": "advice-option-observation",
  "status": "draft",
  "date": "2018-03-19T12:24:35.605+00:00",
  "description": "Observations related to Advice Options Careplan.activity",
  "fhirVersion": "3.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Observation",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Observation",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Observation.extension",
        "path": "Observation.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Observation.extension:EventTiming",
        "path": "Observation.extension",
        "sliceName": "EventTiming",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://roche.com/fhir/rdc/StructureDefinition/observation-event-timing"
          }
        ]
      },
      {
        "id": "Observation.extension:EventTiming.valueCodeableConcept:valueCodeableConcept.coding.system",
        "path": "Observation.extension.valueCodeableConcept.coding.system",
        "fixedUri": "http://hl7.org/fhir/v3/timing"
      },
      {
        "id": "Observation.extension:subject-careplan",
        "path": "Observation.extension",
        "sliceName": "subject-careplan",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://roche.com/fhir/rdc/StructureDefinition/subject-careplan"
          }
        ]
      },
      {
        "id": "Observation.identifier",
        "path": "Observation.identifier",
        "min": 1
      },
      {
        "id": "Observation.identifier.system",
        "path": "Observation.identifier.system",
        "fixedUri": "urn:ietf:rfc:3986"
      },
      {
        "id": "Observation.basedOn",
        "path": "Observation.basedOn",
        "max": "0"
      },
      {
        "id": "Observation.status",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-display-hint",
            "valueString": "default: final"
          }
        ],
        "path": "Observation.status",
        "fixedCode": "final"
      },
      {
        "id": "Observation.code",
        "path": "Observation.code",
        "fixedCodeableConcept": {
          "coding": [
            {
              "system": "http://roche.com/fhir/rdc/cs",
              "code": "advice-observation",
              "display": "Advice Options"
            }
          ]
        },
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "ObservationCode"
            }
          ],
          "strength": "required",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/ValueSet/advice-observation-code"
          }
        }
      },
      {
        "id": "Observation.subject",
        "path": "Observation.subject",
        "max": "0"
      },
      {
        "id": "Observation.context",
        "path": "Observation.context",
        "max": "0"
      },
      {
        "id": "Observation.effective[x]",
        "path": "Observation.effective[x]",
        "max": "0"
      },
      {
        "id": "Observation.issued",
        "path": "Observation.issued",
        "max": "0"
      },
      {
        "id": "Observation.performer",
        "path": "Observation.performer",
        "max": "0"
      },
      {
        "id": "Observation.value[x]",
        "path": "Observation.value[x]",
        "max": "0"
      },
      {
        "id": "Observation.dataAbsentReason",
        "path": "Observation.dataAbsentReason",
        "max": "0"
      },
      {
        "id": "Observation.interpretation",
        "path": "Observation.interpretation",
        "max": "0"
      },
      {
        "id": "Observation.bodySite",
        "path": "Observation.bodySite",
        "max": "0"
      },
      {
        "id": "Observation.method",
        "path": "Observation.method",
        "max": "0"
      },
      {
        "id": "Observation.specimen",
        "path": "Observation.specimen",
        "max": "0"
      },
      {
        "id": "Observation.referenceRange",
        "path": "Observation.referenceRange",
        "max": "0"
      },
      {
        "id": "Observation.related",
        "path": "Observation.related",
        "max": "0"
      },
      {
        "id": "Observation.component",
        "path": "Observation.component",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "code.coding.code"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Observation.component:ActingTime",
        "path": "Observation.component",
        "sliceName": "ActingTime",
        "max": "1"
      },
      {
        "id": "Observation.component:ActingTime.code",
        "path": "Observation.component.code",
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "ObservationCode"
            }
          ],
          "strength": "required",
          "valueSetUri": "http://roche.com/fhir/rdc/ValueSet/advice-observation-component-code"
        }
      },
      {
        "id": "Observation.component:ActingTime.code.coding",
        "path": "Observation.component.code.coding",
        "binding": {
          "strength": "required",
          "valueSetUri": "http://roche.com/fhir/rdc/ValueSet/advice-observation-component-code"
        }
      },
      {
        "id": "Observation.component:ActingTime.code.coding.system",
        "path": "Observation.component.code.coding.system",
        "fixedUri": "http://roche.com/fhir/rdc/cs"
      },
      {
        "id": "Observation.component:ActingTime.code.coding.code",
        "path": "Observation.component.code.coding.code",
        "fixedCode": "acting-time"
      },
      {
        "id": "Observation.component:ActingTime.code.coding.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Observation.component.code.coding.display",
        "fixedString": "Acting time"
      },
      {
        "id": "Observation.component:ActingTime.valueTime:valueTime",
        "path": "Observation.component.valueTime",
        "sliceName": "valueTime",
        "comment": "Only needed hh:mm (time format is hh:mm:ss) Ignore the secodns",
        "type": [
          {
            "code": "time"
          }
        ]
      },
      {
        "id": "Observation.component:OffsetTime",
        "path": "Observation.component",
        "sliceName": "OffsetTime",
        "max": "1"
      },
      {
        "id": "Observation.component:OffsetTime.code",
        "path": "Observation.component.code",
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "ObservationCode"
            }
          ],
          "strength": "example",
          "valueSetReference": {
            "reference": "http://roche.com/fhir/rdc/ValueSet/advice-observation-component-code"
          }
        }
      },
      {
        "id": "Observation.component:OffsetTime.code.coding",
        "path": "Observation.component.code.coding",
        "binding": {
          "strength": "required",
          "valueSetUri": "http://roche.com/fhir/rdc/ValueSet/advice-observation-component-code"
        }
      },
      {
        "id": "Observation.component:OffsetTime.code.coding.system",
        "path": "Observation.component.code.coding.system",
        "fixedUri": "http://roche.com/fhir/rdc/cs"
      },
      {
        "id": "Observation.component:OffsetTime.code.coding.code",
        "path": "Observation.component.code.coding.code",
        "fixedCode": "offset-time"
      },
      {
        "id": "Observation.component:OffsetTime.code.coding.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Observation.component.code.coding.display",
        "fixedString": "Offset time"
      },
      {
        "id": "Observation.component:OffsetTime.valueTime:valueTime",
        "path": "Observation.component.valueTime",
        "sliceName": "valueTime",
        "comment": "Only needed hh:mm (time format is hh:mm:ss) Ignore the secodns",
        "type": [
          {
            "code": "time"
          }
        ]
      },
      {
        "id": "Observation.component:Mealrise",
        "path": "Observation.component",
        "sliceName": "Mealrise",
        "max": "1"
      },
      {
        "id": "Observation.component:Mealrise.code.coding",
        "path": "Observation.component.code.coding",
        "binding": {
          "strength": "required",
          "valueSetUri": "http://roche.com/fhir/rdc/ValueSet/advice-observation-component-code"
        }
      },
      {
        "id": "Observation.component:Mealrise.code.coding.system",
        "path": "Observation.component.code.coding.system",
        "fixedUri": "http://roche.com/fhir/rdc/cs"
      },
      {
        "id": "Observation.component:Mealrise.code.coding.code",
        "path": "Observation.component.code.coding.code",
        "fixedCode": "meal-rise"
      },
      {
        "id": "Observation.component:Mealrise.code.coding.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Observation.component.code.coding.display",
        "fixedString": "Meal rise"
      },
      {
        "id": "Observation.component:Mealrise.valueQuantity:valueQuantity",
        "path": "Observation.component.valueQuantity",
        "sliceName": "valueQuantity",
        "type": [
          {
            "code": "Quantity"
          }
        ]
      },
      {
        "id": "Observation.component:Snacksize",
        "path": "Observation.component",
        "sliceName": "Snacksize",
        "max": "1"
      },
      {
        "id": "Observation.component:Snacksize.code",
        "path": "Observation.component.code",
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "ObservationCode"
            }
          ],
          "strength": "required",
          "valueSetUri": "http://roche.com/fhir/rdc/ValueSet/advice-observation-component-code"
        }
      },
      {
        "id": "Observation.component:Snacksize.code.coding.system",
        "path": "Observation.component.code.coding.system",
        "fixedUri": "http://roche.com/fhir/rdc/cs"
      },
      {
        "id": "Observation.component:Snacksize.code.coding.code",
        "path": "Observation.component.code.coding.code",
        "fixedCode": "snack-size"
      },
      {
        "id": "Observation.component:Snacksize.code.coding.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Observation.component.code.coding.display",
        "fixedString": "Snacksize"
      },
      {
        "id": "Observation.component:Snacksize.valueQuantity:valueQuantity",
        "path": "Observation.component.valueQuantity",
        "sliceName": "valueQuantity",
        "type": [
          {
            "code": "Quantity"
          }
        ]
      },
      {
        "id": "Observation.component:Snacksize.valueQuantity:valueQuantity.unit",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Observation.component.valueQuantity.unit",
        "fixedString": "\"g\""
      }
    ]
  }
}