{
  "resourceType": "StructureDefinition",
  "id": "ContractBenefitsSynchronization",
  "meta": {
    "versionId": "2",
    "lastUpdated": "2019-08-21T16:48:47.427+00:00"
  },
  "url": "http://spms.min-saude.pt/iop/StructureDefinition/ContractBenefitsSynchronization",
  "name": "ContractEndDateBenefitsSynchronization",
  "status": "draft",
  "fhirVersion": "3.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Contract",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Contract",
  "derivation": "constraint",
  "snapshot": {},
  "differential": {
    "element": [
      {
        "id": "Contract.id",
        "path": "Contract.id",
        "min": 1
      },
      {
        "id": "Contract.extension",
        "path": "Contract.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Contract.extension:ContractEndDateExtension",
        "path": "Contract.extension",
        "sliceName": "ContractEndDateExtension",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://spms.min-saude.pt/rnu/extension/contract-end-date/v0100"
          }
        ]
      },
      {
        "id": "Contract.identifier",
        "path": "Contract.identifier",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "type.coding.code"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Contract.identifier:sliceIdentifierNREGISTOBENEFICIO",
        "path": "Contract.identifier",
        "sliceName": "sliceIdentifierNREGISTOBENEFICIO"
      },
      {
        "id": "Contract.identifier:sliceIdentifierNREGISTOBENEFICIO.type.coding.code",
        "path": "Contract.identifier.type.coding.code",
        "fixedCode": "NRB"
      },
      {
        "id": "Contract.status",
        "path": "Contract.status",
        "min": 1
      },
      {
        "id": "Contract.issued",
        "path": "Contract.issued",
        "min": 1
      },
      {
        "id": "Contract.applies",
        "path": "Contract.applies",
        "min": 1
      },
      {
        "id": "Contract.applies.start",
        "path": "Contract.applies.start",
        "min": 1
      },
      {
        "id": "Contract.applies.end",
        "path": "Contract.applies.end",
        "min": 1
      },
      {
        "id": "Contract.subject",
        "path": "Contract.subject",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "profile": "Patient",
            "targetProfile": "http://spms.min-saude.pt/iop/StructureDefinition/PatientBenefitsSynchronization",
            "aggregation": [
              "referenced",
              "bundled"
            ]
          }
        ]
      },
      {
        "id": "Contract.authority",
        "path": "Contract.authority",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "profile": "Organization",
            "targetProfile": "http://spms.min-saude.pt/iop/StructureDefinition/OrganizationBenefitsSynchronization",
            "aggregation": [
              "referenced",
              "bundled"
            ]
          }
        ]
      },
      {
        "id": "Contract.type",
        "path": "Contract.type",
        "min": 1
      },
      {
        "id": "Contract.type.coding.system",
        "path": "Contract.type.coding.system",
        "fixedUri": "http://spms.min-saude.pt/rnu/codesystem/contract-type"
      },
      {
        "id": "Contract.type.coding.code",
        "path": "Contract.type.coding.code",
        "fixedCode": "BU"
      },
      {
        "id": "Contract.subType",
        "path": "Contract.subType",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Contract.subType.coding.system",
        "path": "Contract.subType.coding.system",
        "min": 1,
        "fixedUri": "http://spms.min-saude.pt/rnu/codesystem/contract-subtype"
      },
      {
        "id": "Contract.subType.coding.code",
        "path": "Contract.subType.coding.code",
        "min": 1
      },
      {
        "id": "Contract.actionReason",
        "path": "Contract.actionReason",
        "min": 1
      },
      {
        "id": "Contract.actionReason.coding.system",
        "path": "Contract.actionReason.coding.system",
        "min": 1,
        "fixedUri": "http://spms.min-saude.pt/rnu/codesystem/contract-action-reason"
      },
      {
        "id": "Contract.actionReason.coding.code",
        "path": "Contract.actionReason.coding.code",
        "min": 1
      }
    ]
  }
}