{
  "resourceType": "StructureDefinition",
  "url": "https://dispenseplus.fred.com.au/fhir/4.0/StructureDefinition/FredPatient",
  "name": "FredPatient",
  "status": "draft",
  "date": "2023-10-07T04:13:52.4692938+00:00",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Patient",
  "baseDefinition": "http://hl7.org.au/fhir/StructureDefinition/au-patient",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Patient.extension:birthPlace",
        "path": "Patient.extension",
        "sliceName": "birthPlace",
        "max": "0"
      },
      {
        "id": "Patient.extension:mothersMaidenName",
        "path": "Patient.extension",
        "sliceName": "mothersMaidenName",
        "max": "0"
      },
      {
        "id": "Patient.extension:interpreterRequired",
        "path": "Patient.extension",
        "sliceName": "interpreterRequired",
        "max": "0"
      },
      {
        "id": "Patient.extension:dateOfArrival",
        "path": "Patient.extension",
        "sliceName": "dateOfArrival",
        "max": "0"
      },
      {
        "id": "Patient.extension:genderIdentity",
        "path": "Patient.extension",
        "sliceName": "genderIdentity",
        "max": "0"
      },
      {
        "id": "Patient.extension:RepeatsHeldAtPharmacy",
        "path": "Patient.extension",
        "sliceName": "RepeatsHeldAtPharmacy",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://dispenseplus.fred.com.au/fhir/4.0/StructureDefinition/extension-repeats-held-at-pharmacy"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Patient.name.suffix",
        "path": "Patient.name.suffix",
        "max": "0"
      },
      {
        "id": "Patient.name.period",
        "path": "Patient.name.period",
        "max": "0"
      },
      {
        "id": "Patient.telecom.rank",
        "path": "Patient.telecom.rank",
        "max": "0"
      },
      {
        "id": "Patient.telecom.period",
        "path": "Patient.telecom.period",
        "max": "0"
      },
      {
        "id": "Patient.birthDate.extension",
        "path": "Patient.birthDate.extension",
        "max": "0"
      },
      {
        "id": "Patient.birthDate.extension:accuracyIndicator",
        "path": "Patient.birthDate.extension",
        "sliceName": "accuracyIndicator",
        "max": "0"
      },
      {
        "id": "Patient.birthDate.extension:birthTime",
        "path": "Patient.birthDate.extension",
        "sliceName": "birthTime",
        "max": "0"
      },
      {
        "id": "Patient.deceased[x]:deceasedDateTime",
        "path": "Patient.deceased[x]",
        "sliceName": "deceasedDateTime",
        "max": "0"
      },
      {
        "id": "Patient.address",
        "path": "Patient.address",
        "short": "An address in Australia for use within an Australian healthcare context",
        "definition": "An Australian address expressed using postal conventions (as opposed to GPS or other location definition formats).",
        "comment": "Note: address is intended to describe postal addresses for administrative purposes, not to describe absolute geographical coordinates.  Postal addresses are often used as proxies for physical locations (also see the [Location](location.html#) resource).",
        "type": [
          {
            "code": "Address",
            "profile": [
              "http://hl7.org.au/fhir/StructureDefinition/au-address"
            ]
          }
        ],
        "constraint": [
          {
            "key": "ele-1",
            "severity": "error",
            "human": "All FHIR elements must have a @value or children",
            "expression": "hasValue() or (children().count() > id.count())",
            "xpath": "@value|f:*|h:div",
            "source": "http://hl7.org/fhir/StructureDefinition/Element"
          },
          {
            "key": "inv-add-0",
            "severity": "error",
            "human": "The address shall at least have text or a line",
            "expression": "text.exists() or line.exists()",
            "source": "http://hl7.org.au/fhir/StructureDefinition/au-address"
          },
          {
            "key": "inv-add-1",
            "severity": "error",
            "human": "If asserting no fixed address, the type shall be 'physical'",
            "expression": "extension('http://hl7.org.au/fhir/StructureDefinition/no-fixed-address').exists() implies type='physical'",
            "source": "http://hl7.org.au/fhir/StructureDefinition/au-address"
          },
          {
            "key": "inv-add-2",
            "severity": "error",
            "human": "If asserting no fixed address, the address text shall begin with 'NO FIXED ADDRESS'",
            "expression": "extension('http://hl7.org.au/fhir/StructureDefinition/no-fixed-address').exists() implies text.startsWith('NO FIXED ADDRESS')",
            "source": "http://hl7.org.au/fhir/StructureDefinition/au-address"
          }
        ]
      },
      {
        "id": "Patient.address.extension:identifier",
        "path": "Patient.address.extension",
        "sliceName": "identifier",
        "max": "0"
      },
      {
        "id": "Patient.address.extension:noFixedAddress",
        "path": "Patient.address.extension",
        "sliceName": "noFixedAddress",
        "max": "0"
      },
      {
        "id": "Patient.address.type",
        "path": "Patient.address.type",
        "max": "0"
      },
      {
        "id": "Patient.address.text",
        "path": "Patient.address.text",
        "max": "0"
      },
      {
        "id": "Patient.address.district",
        "path": "Patient.address.district",
        "max": "0"
      },
      {
        "id": "Patient.address.country",
        "path": "Patient.address.country",
        "max": "0"
      },
      {
        "id": "Patient.address.period",
        "path": "Patient.address.period",
        "max": "0"
      },
      {
        "id": "Patient.maritalStatus",
        "path": "Patient.maritalStatus",
        "max": "0"
      },
      {
        "id": "Patient.multipleBirth[x]",
        "path": "Patient.multipleBirth[x]",
        "max": "0"
      },
      {
        "id": "Patient.photo",
        "path": "Patient.photo",
        "max": "0"
      },
      {
        "id": "Patient.contact",
        "path": "Patient.contact",
        "max": "0"
      },
      {
        "id": "Patient.communication",
        "path": "Patient.communication",
        "max": "0"
      },
      {
        "id": "Patient.managingOrganization",
        "path": "Patient.managingOrganization",
        "max": "0"
      },
      {
        "id": "Patient.link",
        "path": "Patient.link",
        "max": "0"
      }
    ]
  }
}