{
  "resourceType": "StructureDefinition",
  "meta": {
    "lastUpdated": "2017-09-13T08:38:34.624+00:00"
  },
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
      "valueCode": "pc"
    }
  ],
  "url": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Medication-Flag-1",
  "version": "0.0.1",
  "name": "CareConnect-Medication-Flag-1",
  "status": "draft",
  "date": "2017-07-14T07:47:06.214358+00:00",
  "description": "This Flag Resource carries prospective warnings of potential issues related to the patient's medications.",
  "copyright": "Copyright © 2016 HL7 UK\r\n\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at\r\n\r\nhttp://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\r\n\r\nHL7® FHIR® standard Copyright © 2011+ HL7\r\n\r\nThe HL7® FHIR® standard is used under the FHIR license. You may obtain a copy of the FHIR license at\r\n\r\nhttps://www.hl7.org/fhir/license.html",
  "fhirVersion": "3.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Flag",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Flag",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "path": "Flag.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Flag.extension:medication",
        "path": "Flag.extension",
        "sliceName": "medication",
        "type": [
          {
            "code": "Extension",
            "profile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-CareConnect-MedicationFlagAssociation-1"
          }
        ]
      },
      {
        "id": "Flag.identifier.system",
        "path": "Flag.identifier.system",
        "min": 1
      },
      {
        "id": "Flag.identifier.value",
        "path": "Flag.identifier.value",
        "min": 1
      },
      {
        "id": "Flag.identifier.assigner",
        "path": "Flag.identifier.assigner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Organization-1"
          }
        ]
      },
      {
        "id": "Flag.category",
        "path": "Flag.category",
        "min": 1,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "FlagCategory"
            }
          ],
          "strength": "required"
        }
      },
      {
        "id": "Flag.category.coding",
        "path": "Flag.category.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Flag.category.coding.system",
        "path": "Flag.category.coding.system",
        "min": 1,
        "fixedUri": "http://hl7.org/fhir/flag-category"
      },
      {
        "id": "Flag.category.coding.version",
        "path": "Flag.category.coding.version",
        "max": "0"
      },
      {
        "id": "Flag.category.coding.code",
        "path": "Flag.category.coding.code",
        "min": 1,
        "fixedCode": "drug"
      },
      {
        "id": "Flag.category.coding.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Flag.category.coding.display",
        "min": 1,
        "fixedString": "Drug"
      },
      {
        "id": "Flag.category.coding.userSelected",
        "path": "Flag.category.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Flag.code",
        "path": "Flag.code",
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "FlagCode"
            }
          ],
          "strength": "extensible",
          "valueSetReference": {
            "reference": "https://fhir.hl7.org.uk/STU3/ValueSet/CareConnect-MedicationFlag-1"
          }
        }
      },
      {
        "id": "Flag.code.coding",
        "path": "Flag.code.coding",
        "min": 1
      },
      {
        "id": "Flag.code.coding.system",
        "path": "Flag.code.coding.system",
        "min": 1,
        "fixedUri": "https://fhir.hl7.org.uk/STU3/CareConnect-MedicationFlag-1"
      },
      {
        "id": "Flag.code.coding.version",
        "path": "Flag.code.coding.version",
        "max": "0"
      },
      {
        "id": "Flag.code.coding.code",
        "path": "Flag.code.coding.code",
        "min": 1
      },
      {
        "id": "Flag.code.coding.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Flag.code.coding.display",
        "min": 1
      },
      {
        "id": "Flag.code.coding.userSelected",
        "path": "Flag.code.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Flag.subject",
        "path": "Flag.subject",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Group"
          },
          {
            "code": "Reference",
            "targetProfile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Organization-1"
          },
          {
            "code": "Reference",
            "targetProfile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Patient-1"
          },
          {
            "code": "Reference",
            "targetProfile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Location-1"
          },
          {
            "code": "Reference",
            "targetProfile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Practitioner-1"
          }
        ]
      },
      {
        "id": "Flag.encounter",
        "path": "Flag.encounter",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Encounter-1"
          }
        ]
      },
      {
        "id": "Flag.author",
        "path": "Flag.author",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Device"
          },
          {
            "code": "Reference",
            "targetProfile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Organization-1"
          },
          {
            "code": "Reference",
            "targetProfile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Patient-1"
          },
          {
            "code": "Reference",
            "targetProfile": "https://fhir.hl7.org.uk/STU3/StructureDefinition/CareConnect-Practitioner-1"
          }
        ]
      }
    ]
  }
}