{
  "resourceType": "StructureDefinition",
  "id": "MyServiceRequest",
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-category",
      "valueString": "Clinical.Care Provision"
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-security-category",
      "valueCode": "patient"
    }
  ],
  "url": "http://example.org/StructureDefinition/MyServiceRequest",
  "version": "4.0",
  "name": "MyServiceRequest",
  "status": "active",
  "date": "2023-09-04T16:49:06.4289115+00:00",
  "fhirVersion": "4.3.0",
  "mapping": [
    {
      "identity": "workflow",
      "uri": "http://hl7.org/fhir/workflow",
      "name": "Workflow Pattern"
    },
    {
      "identity": "v2",
      "uri": "http://hl7.org/v2",
      "name": "HL7 v2 Mapping"
    },
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/fivews",
      "name": "FiveWs Pattern Mapping"
    },
    {
      "identity": "quick",
      "uri": "http://siframework.org/cqf",
      "name": "Quality Improvement and Clinical Knowledge (QUICK)"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "ServiceRequest",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/ServiceRequest",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "ServiceRequest.extension",
        "path": "ServiceRequest.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        },
        "min": 0
      },
      {
        "id": "ServiceRequest.extension:requestingOrganization",
        "path": "ServiceRequest.extension",
        "sliceName": "requestingOrganization",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://MyProject.pt/ServiceRequestRequestingOrgExt"
            ]
          }
        ]
      },
      {
        "id": "ServiceRequest.extension:Appointment",
        "path": "ServiceRequest.extension",
        "sliceName": "Appointment",
        "short": "Appointment that schedules the Service Request",
        "definition": "Appointment that schedules the Service Request",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://MyProject.pt/ServiceRequestAppointmentExt"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "ServiceRequest.identifier",
        "path": "ServiceRequest.identifier",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "description": "Slice",
          "rules": "open"
        },
        "min": 1
      },
      {
        "id": "ServiceRequest.identifier:PLAC",
        "path": "ServiceRequest.identifier",
        "sliceName": "PLAC",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Identifier",
            "profile": [
              "http://example.org/StructureDefinition/MyIdentifier"
            ]
          }
        ]
      },
      {
        "id": "ServiceRequest.identifier:PLAC.system",
        "path": "ServiceRequest.identifier.system",
        "min": 1,
        "patternUri": "http://Hospital.org/PLAC"
      },
      {
        "id": "ServiceRequest.identifier:PLAC.value",
        "path": "ServiceRequest.identifier.value",
        "min": 1
      },
      {
        "id": "ServiceRequest.instantiatesCanonical",
        "path": "ServiceRequest.instantiatesCanonical",
        "max": "0"
      },
      {
        "id": "ServiceRequest.instantiatesUri",
        "path": "ServiceRequest.instantiatesUri",
        "max": "0"
      },
      {
        "id": "ServiceRequest.basedOn",
        "path": "ServiceRequest.basedOn",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/ServiceRequest"
            ]
          }
        ]
      },
      {
        "id": "ServiceRequest.replaces",
        "path": "ServiceRequest.replaces",
        "max": "0"
      },
      {
        "id": "ServiceRequest.requisition",
        "path": "ServiceRequest.requisition",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "description": "Slice",
          "rules": "open"
        }
      },
      {
        "id": "ServiceRequest.requisition:PGN",
        "path": "ServiceRequest.requisition",
        "sliceName": "PGN",
        "min": 1,
        "type": [
          {
            "code": "Identifier",
            "profile": [
              "http://example.org/StructureDefinition/MyIdentifier"
            ]
          }
        ]
      },
      {
        "id": "ServiceRequest.requisition:PGN.system",
        "path": "ServiceRequest.requisition.system",
        "min": 1,
        "patternUri": "http://Hospital.org/PNG"
      },
      {
        "id": "ServiceRequest.requisition:PGN.value",
        "path": "ServiceRequest.requisition.value",
        "min": 1
      },
      {
        "id": "ServiceRequest.status",
        "path": "ServiceRequest.status",
        "binding": {
          "strength": "required",
          "valueSet": "https://MyProject.pt/ServiceRequestStatus"
        }
      },
      {
        "id": "ServiceRequest.intent",
        "path": "ServiceRequest.intent",
        "binding": {
          "strength": "required",
          "valueSet": "https://MyProject.pt/ServiceRequestIntent"
        }
      },
      {
        "id": "ServiceRequest.category",
        "path": "ServiceRequest.category",
        "max": "0"
      },
      {
        "id": "ServiceRequest.priority",
        "path": "ServiceRequest.priority",
        "binding": {
          "strength": "required",
          "valueSet": "https://MyProject.pt/ServiceRequestPriority"
        }
      },
      {
        "id": "ServiceRequest.doNotPerform",
        "path": "ServiceRequest.doNotPerform",
        "max": "0"
      },
      {
        "id": "ServiceRequest.orderDetail",
        "path": "ServiceRequest.orderDetail",
        "max": "0"
      },
      {
        "id": "ServiceRequest.quantity[x]",
        "path": "ServiceRequest.quantity[x]",
        "max": "0"
      },
      {
        "id": "ServiceRequest.subject",
        "path": "ServiceRequest.subject",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://example.org/StructureDefinition/MyPatient"
            ]
          }
        ]
      },
      {
        "id": "ServiceRequest.occurrence[x]",
        "path": "ServiceRequest.occurrence[x]",
        "type": [
          {
            "code": "dateTime"
          }
        ]
      },
      {
        "id": "ServiceRequest.asNeeded[x]",
        "path": "ServiceRequest.asNeeded[x]",
        "max": "0"
      },
      {
        "id": "ServiceRequest.authoredOn",
        "path": "ServiceRequest.authoredOn",
        "min": 1
      },
      {
        "id": "ServiceRequest.requester",
        "path": "ServiceRequest.requester",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Practitioner"
            ]
          }
        ]
      },
      {
        "id": "ServiceRequest.performerType",
        "path": "ServiceRequest.performerType",
        "max": "0"
      },
      {
        "id": "ServiceRequest.performer",
        "path": "ServiceRequest.performer",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/HealthcareService",
              "http://hl7.org/fhir/StructureDefinition/Practitioner",
              "http://hl7.org/fhir/StructureDefinition/Organization"
            ]
          }
        ]
      },
      {
        "id": "ServiceRequest.locationCode",
        "path": "ServiceRequest.locationCode",
        "max": "0"
      },
      {
        "id": "ServiceRequest.locationReference",
        "path": "ServiceRequest.locationReference",
        "max": "0"
      },
      {
        "id": "ServiceRequest.reasonCode",
        "path": "ServiceRequest.reasonCode",
        "max": "1"
      },
      {
        "id": "ServiceRequest.reasonReference",
        "path": "ServiceRequest.reasonReference",
        "max": "0"
      },
      {
        "id": "ServiceRequest.insurance",
        "path": "ServiceRequest.insurance",
        "max": "0"
      },
      {
        "id": "ServiceRequest.supportingInfo",
        "path": "ServiceRequest.supportingInfo",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/InsurancePlan"
            ]
          }
        ]
      },
      {
        "id": "ServiceRequest.specimen",
        "path": "ServiceRequest.specimen",
        "max": "0"
      },
      {
        "id": "ServiceRequest.bodySite",
        "path": "ServiceRequest.bodySite",
        "max": "0"
      },
      {
        "id": "ServiceRequest.note",
        "path": "ServiceRequest.note",
        "max": "1"
      },
      {
        "id": "ServiceRequest.patientInstruction",
        "path": "ServiceRequest.patientInstruction",
        "max": "0"
      },
      {
        "id": "ServiceRequest.relevantHistory",
        "path": "ServiceRequest.relevantHistory",
        "max": "0"
      }
    ]
  }
}