{
  "resourceType": "StructureDefinition",
  "url": "http://limics.fr/fhir/ehr2edc/StructureDefinition/MedicationStatement.ehr2edc",
  "name": "MedicationStatement.ehr2edc",
  "status": "draft",
  "fhirVersion": "3.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "MedicationStatement",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/MedicationStatement",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "MedicationStatement.id",
        "path": "MedicationStatement.id",
        "min": 1
      },
      {
        "id": "MedicationStatement.partOf",
        "path": "MedicationStatement.partOf",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/MedicationAdministration"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/MedicationDispense"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/MedicationStatement"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Procedure"
          },
          {
            "code": "Reference",
            "targetProfile": "http://limics.fr/fhir/ehr2edc/StructureDefinition/Observation.ehr2edc"
          }
        ]
      },
      {
        "id": "MedicationStatement.medication[x]",
        "path": "MedicationStatement.medication[x]",
        "type": [
          {
            "code": "CodeableConcept"
          },
          {
            "code": "Reference",
            "targetProfile": "http://limics.fr/fhir/ehr2edc/StructureDefinition/Medication.ehr2edc"
          }
        ]
      },
      {
        "id": "MedicationStatement.effective[x]",
        "path": "MedicationStatement.effective[x]",
        "min": 1
      },
      {
        "id": "MedicationStatement.subject",
        "path": "MedicationStatement.subject",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://limics.fr/fhir/ehr2edc/StructureDefinition/Patient.ehr2edc"
          }
        ]
      },
      {
        "id": "MedicationStatement.reasonReference",
        "path": "MedicationStatement.reasonReference",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Condition"
          },
          {
            "code": "Reference",
            "targetProfile": "http://limics.fr/fhir/ehr2edc/StructureDefinition/Observation.ehr2edc"
          }
        ]
      },
      {
        "id": "MedicationStatement.dosage.route",
        "path": "MedicationStatement.dosage.route",
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "RouteOfAdministration"
            }
          ],
          "strength": "extensible",
          "valueSetReference": {
            "reference": "http://limics.fr/fhir/ehr2edc/ValueSet/medication-route.ehr2edc"
          }
        }
      },
      {
        "id": "MedicationStatement.dosage.dose[x]:doseQuantity",
        "path": "MedicationStatement.dosage.doseQuantity",
        "sliceName": "doseQuantity",
        "type": [
          {
            "code": "Quantity",
            "profile": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
          }
        ]
      }
    ]
  }
}