{
  "resourceType": "StructureDefinition",
  "id": "PatientPTList",
  "meta": {
    "versionId": "1",
    "lastUpdated": "2019-05-28T15:51:14.828+00:00"
  },
  "url": "http://spms.min-saude.pt/iop/fhir/StructureDefinition/PatientPTList",
  "name": "PatientPTList",
  "status": "draft",
  "fhirVersion": "3.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "List",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/List",
  "derivation": "constraint",
  "snapshot": {},
  "differential": {
    "element": [
      {
        "id": "List",
        "path": "List",
        "constraint": [
          {
            "key": "emptyReason-1",
            "requirements": "EmptyReason must be mandatory",
            "severity": "error",
            "human": "If there are no entries, EmptyReason must be mandatory",
            "expression": "entry.exists() or emptyReason.exists()",
            "xpath": "(f:entry) or (f:emptyReason)"
          }
        ]
      },
      {
        "id": "List.id",
        "path": "List.id",
        "min": 1
      },
      {
        "id": "List.meta",
        "path": "List.meta",
        "min": 1
      },
      {
        "id": "List.meta.lastUpdated",
        "path": "List.meta.lastUpdated",
        "min": 1
      },
      {
        "id": "List.status",
        "path": "List.status",
        "fixedCode": "retired"
      },
      {
        "id": "List.mode",
        "path": "List.mode",
        "fixedCode": "working"
      },
      {
        "id": "List.code",
        "path": "List.code",
        "min": 1
      },
      {
        "id": "List.code.coding.system",
        "path": "List.code.coding.system",
        "min": 1,
        "fixedUri": "http://spms.min-saude.pt/rnu/systemcodes/list-codes"
      },
      {
        "id": "List.code.coding.code",
        "path": "List.code.coding.code",
        "min": 1,
        "fixedCode": "code"
      },
      {
        "id": "List.code.coding.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "List.code.coding.display",
        "min": 1
      },
      {
        "id": "List.subject",
        "path": "List.subject",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://spms.min-saude.pt/fhir/StructureDefinition/PatientPORTUGAL",
            "aggregation": [
              "referenced",
              "bundled"
            ]
          }
        ]
      },
      {
        "id": "List.subject.reference",
        "path": "List.subject.reference",
        "min": 1
      },
      {
        "id": "List.emptyReason",
        "path": "List.emptyReason",
        "condition": [
          "emptyReason-1"
        ]
      },
      {
        "id": "List.emptyReason.coding.system",
        "path": "List.emptyReason.coding.system",
        "fixedUri": "https://hl7.org/fhir/ValueSet/list-empty-reason"
      }
    ]
  }
}