For AI agents: the documentation index is at /docs/payerbox/llms.txt. A Markdown version of this page is available at /docs/payerbox/api-reference/operations/cds-hook-order-sign.md or by requesting it with the Accept: text/markdown header.
Payerbox Docs

order-sign

The order-sign hook fires when a clinician is ready to sign one or more orders for a patient (medications, procedures, labs, and others). It is among the last workflow events before an order is promoted out of a draft status. The context contains all order details (dose, quantity, route, etc.), although the orders are still in draft.

Defined by the CDS Hooks order-sign specification. Implemented by Payerbox for CRD per the Da Vinci CRD IG.

Endpoint

POST <base>/cds-services/order-sign-crd

Auth

SMART Backend Services. See Authentication.

Context

FieldOptionalityPrefetch TokenTypeDescription
userIdREQUIREDYesstringThe id of the current user (e.g., PractitionerRole/123 or Practitioner/abc)
patientIdREQUIREDYesstringThe FHIR Patient.id of the current patient in context
encounterIdOPTIONALYesstringThe FHIR Encounter.id of the current encounter in context
draftOrdersREQUIREDNoBundleA Bundle of FHIR request resources with a draft status, representing orders that aren't yet signed

Request Parameters

FieldOptionalityTypeDescription
hookREQUIREDstringMust be order-sign
hookInstanceREQUIREDstringA universally unique identifier for this particular hook call
contextREQUIREDobjectHook-specific contextual data (see Context table above)
fhirServerOPTIONALURLThe base URL of the CDS Client's FHIR server
fhirAuthorizationOPTIONALobjectOAuth 2.0 bearer access token for FHIR server access
prefetchOPTIONALobjectFHIR data that was prefetched by the CDS Client

Response

Coverage determinations are delivered as systemActions[] — one update action per evaluated order, carrying the draft order with the ext-coverage-information extension appended. Cards are informational only (summary, indicator, detail, links, source). See CRD / System actions for the extension's sub-extensions and the DTR launch mechanism.

order-sign is a primary CRD hook: when the decision service cannot evaluate an order present in the hook context, the response still carries a coverage-information system action for it — covered = conditional, info-needed = OTH, and a human-readable reason, with no pa-needed claim — alongside an explanatory card.

Example

The response content depends on the external decision-making service configured via CDS_DECISION_SERVICE_URL. The example below shows a typical response structure, but actual determinations and links are generated by your decision service based on coverage requirements and prior authorization rules.

POST /cds-services/order-sign-crd
Content-Type: application/json
Accept: application/json

{
  "hook": "order-sign",
  "hookInstance": "d1577c69-dfbe-44ad-ba6d-3e05e953b2ea",
  "fhirServer": "https://ehr.example.com/fhir",
  "fhirAuthorization": {
    "access_token": "some-opaque-fhir-access-token",
    "token_type": "Bearer",
    "expires_in": 300,
    "scope": "user/Patient.read user/Observation.read",
    "subject": "cds-service"
  },
  "context": {
    "userId": "PractitionerRole/123",
    "patientId": "1288992",
    "encounterId": "89284",
    "draftOrders": {
      "resourceType": "Bundle",
      "entry": [
        {
          "resource": {
            "resourceType": "MedicationRequest",
            "id": "smart-MedicationRequest-103",
            "status": "draft",
            "intent": "order",
            "medicationCodeableConcept": {
              "coding": [{ "system": "http://www.nlm.nih.gov/research/umls/rxnorm", "code": "617993", "display": "Amoxicillin 120 MG/ML / clavulanate potassium 8.58 MG/ML Oral Suspension" }]
            },
            "subject": { "reference": "Patient/1288992" },
            "dosageInstruction": [
              {
                "text": "5 mL bid x 10 days",
                "timing": { "repeat": { "frequency": 2, "period": 1, "periodUnit": "d" } },
                "doseAndRate": [{ "doseQuantity": { "value": 5, "unit": "mL", "system": "http://unitsofmeasure.org", "code": "mL" } }]
              }
            ]
          }
        }
      ]
    }
  },
  "prefetch": {
    "patient": {
      "resourceType": "Patient",
      "id": "1288992",
      "name": [{ "given": ["John"], "family": "Doe" }],
      "birthDate": "1970-01-01",
      "gender": "male"
    },
    "coverage": {
      "resourceType": "Coverage",
      "id": "cov-001",
      "status": "active",
      "beneficiary": { "reference": "Patient/1288992" },
      "payor": [{ "reference": "Organization/insurance-company-789" }]
    }
  }
}
{
  "cards": [
    {
      "uuid": "7b0b3f7a-8d2b-4d8b-a6e4-8cb4d3f2a6c1",
      "summary": "Documentation and policy resources",
      "indicator": "info",
      "source": {
        "label": "CRD Decision Service",
        "topic": { "code": "external-reference", "system": "http://hl7.org/fhir/us/davinci-crd/CodeSystem/temp" }
      },
      "links": [
        { "label": "Documentation Requirements", "url": "https://example.org/documentation-requirements", "type": "absolute" }
      ]
    }
  ],
  "systemActions": [
    {
      "type": "update",
      "description": "Update the draft MedicationRequest with CRD coverage information.",
      "resource": {
        "resourceType": "MedicationRequest",
        "id": "smart-MedicationRequest-103",
        "status": "draft",
        "intent": "order",
        "medicationCodeableConcept": {
          "coding": [{ "system": "http://www.nlm.nih.gov/research/umls/rxnorm", "code": "617993", "display": "Amoxicillin 120 MG/ML / clavulanate potassium 8.58 MG/ML Oral Suspension" }]
        },
        "subject": { "reference": "Patient/1288992" },
        "extension": [
          {
            "url": "http://hl7.org/fhir/us/davinci-crd/StructureDefinition/ext-coverage-information",
            "extension": [
              { "url": "coverage", "valueReference": { "reference": "Coverage/cov-001" } },
              { "url": "covered", "valueCode": "covered" },
              { "url": "pa-needed", "valueCode": "auth-needed" },
              { "url": "date", "valueDate": "2026-09-03" },
              { "url": "coverage-assertion-id", "valueString": "3f8d2c1a-6b7e-4a2f-9c0d-1e2f3a4b5c6d" },
              { "url": "doc-needed", "valueCode": "clinical" },
              { "url": "questionnaire", "valueCanonical": "https://example.org/fhir/Questionnaire/medication-pa" }
            ]
          }
        ]
      }
    }
  ]
}

Last updated: