{
  "resourceType": "StructureDefinition",
  "url": "https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-ServiceRequest",
  "name": "DataStandardsWalesServiceRequestProfile",
  "status": "draft",
  "date": "2023-03-30T16:44:16.3358539+00:00",
  "fhirVersion": "4.0.1",
  "mapping": [
    {
      "identity": "REF.1",
      "name": "PMS Mapping"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "ServiceRequest",
  "baseDefinition": "https://fhir.hl7.org.uk/StructureDefinition/UKCore-ServiceRequest",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "ServiceRequest.identifier.system",
        "path": "ServiceRequest.identifier.system",
        "mapping": [
          {
            "identity": "REF.1",
            "map": "https://wales.nhs.uk/referral/id/pms"
          }
        ]
      },
      {
        "id": "ServiceRequest.identifier.value",
        "path": "ServiceRequest.identifier.value",
        "mapping": [
          {
            "identity": "REF.1",
            "map": "REFERRALS.ID"
          }
        ]
      },
      {
        "id": "ServiceRequest.status",
        "path": "ServiceRequest.status",
        "mapping": [
          {
            "identity": "REF.1",
            "map": "REFERRALS.STATUS"
          }
        ]
      },
      {
        "id": "ServiceRequest.intent",
        "path": "ServiceRequest.intent",
        "mapping": [
          {
            "identity": "REF.1",
            "map": "order"
          }
        ]
      },
      {
        "id": "ServiceRequest.category",
        "path": "ServiceRequest.category",
        "mapping": [
          {
            "identity": "REF.1",
            "map": "REFERRALS.SPEC_CODE"
          }
        ]
      },
      {
        "id": "ServiceRequest.priority",
        "path": "ServiceRequest.priority",
        "mapping": [
          {
            "identity": "REF.1",
            "map": "REFERRALS.URGENCY_CODE"
          }
        ]
      },
      {
        "id": "ServiceRequest.code",
        "path": "ServiceRequest.code",
        "mapping": [
          {
            "identity": "REF.1",
            "map": "REFERRALS.INTENDED_PROCEDURE"
          }
        ]
      },
      {
        "id": "ServiceRequest.subject",
        "path": "ServiceRequest.subject",
        "mapping": [
          {
            "identity": "REF.1",
            "map": "{PEOPLE->FIRST_FORENAME} {PEOPLE->SURNAME}"
          }
        ]
      },
      {
        "id": "ServiceRequest.occurrence[x]",
        "path": "ServiceRequest.occurrence[x]",
        "mapping": [
          {
            "identity": "REF.1",
            "map": "REFERRALS.REFE_DATE"
          }
        ]
      },
      {
        "id": "ServiceRequest.authoredOn",
        "path": "ServiceRequest.authoredOn",
        "mapping": [
          {
            "identity": "REF.1",
            "map": "REFERRALS.DATE_RCVD"
          }
        ]
      },
      {
        "id": "ServiceRequest.performerType",
        "path": "ServiceRequest.performerType",
        "mapping": [
          {
            "identity": "REF.1",
            "map": "REFERRALS.SUB_TYPE"
          }
        ]
      },
      {
        "id": "ServiceRequest.reasonCode",
        "path": "ServiceRequest.reasonCode",
        "mapping": [
          {
            "identity": "REF.1",
            "map": "REFERRALS.REFERRAL_RSN"
          }
        ]
      }
    ]
  }
}