HL7 Da Vinci · CRD · DTR · PAS
A payer to test
against._
Synthetic CRD, DTR, and PAS endpoints that approve, pend, deny, and request more info like a real payer, before your Jan 1, 2027 CMS‑0057 deadline. Instant tenant, OAuth creds, scriptable behaviors. Synthetic data only, no BAA.
curl -sX POST https://mockpayer.dev/api/demo/Claim/\$submit \
-H "Authorization: Bearer sk_demo_mockpayer" \
-H "Content-Type: application/fhir+json" \
--data-binary @referral-auth-bundle.json
Runs live against the shared demo tenant. No signup.
{
"resourceType": "Bundle",
"type": "collection",
"timestamp": "2027-01-04T15:22:11Z",
"entry": [
{
"resource": {
"resourceType": "ClaimResponse",
"status": "active",
"use": "preauthorization",
"patient": { "reference": "Patient/SUBSCRIBER-8891" },
"insurer": { "reference": "Organization/mockpayer" },
"request": { "reference": "Claim/REF-AUTH-111099" },
"outcome": "complete",
"disposition": "Pended for clinical review.",
"preAuthRef": "PA-2027-000412",
"item": [{
"itemSequence": 1,
"adjudication": [{
"category": { "coding": [{ "code": "submitted" }] },
"extension": [{
"url": ".../extension-reviewAction",
"extension": [{
"url": "code",
"valueCodeableConcept": { "coding": [{
"system": "https://codesystem.x12.org/005010/306",
"code": "A4", "display": "Pending" }] }
}]
}]
}]
}]
}
}
// … Organization, Patient, Coverage (3 more entries)
]
}
outcome is complete; the approve/pend/deny signal rides in item.adjudication reviewAction (X12 306). Poll $inquire twice → A4 becomes A1.
demo
Real request / response pairs for each Da Vinci interaction. Payloads adapted from the published PAS, CRD, and DTR implementation guides; trimmed for reading, shapes unchanged.
Coverage Requirements Discovery. A CDS Hooks service the EHR calls at order time.
MockPayer answers order-select / order-sign with coverage cards and decorates the draft order
with a coverage-information extension.
{
"hook": "order-select",
"hookInstance": "d1577c69-dfbe-44ad-ba6d-3e05e953b2ea",
"fhirServer": "https://ehr.example.org/r4",
"context": {
"userId": "PractitionerRole/pr-114",
"patientId": "SUBSCRIBER-8891",
"encounterId": "enc-9920",
"selections": ["ServiceRequest/sr-mri-lumbar"],
"draftOrders": {
"resourceType": "Bundle",
"entry": [{
"resource": {
"resourceType": "ServiceRequest",
"id": "sr-mri-lumbar",
"status": "draft",
"intent": "order",
"code": { "coding": [{
"system": "http://www.ama-assn.org/go/cpt",
"code": "72148",
"display": "MRI lumbar spine wo contrast" }] },
"subject": { "reference": "Patient/SUBSCRIBER-8891" }
}
}]
}
}
}
{
"cards": [{
"uuid": "8fce8e2a-4f3b-4b1e-9b6a-2f0c9d7a11e2",
"summary": "Prior auth required: MRI lumbar (CPT 72148)",
"indicator": "warning",
"detail": "Plan requires prior authorization for outpatient advanced imaging. Launch documentation to start the request.",
"source": { "label": "MockPayer Coverage", "url": "https://mockpayer.dev" },
"links": [{
"label": "Complete documentation (DTR)",
"url": "https://mockpayer.dev/dtr/launch",
"type": "smart"
}]
}],
"systemActions": [{
"type": "update",
"resource": {
"resourceType": "ServiceRequest",
"id": "sr-mri-lumbar",
"extension": [{
"url": ".../ext-coverage-information",
"extension": [
{ "url": "coverage", "valueReference": { "reference": "Coverage/INS-334" } },
{ "url": "covered", "valueCode": "conditional" },
{ "url": "pa-needed", "valueCode": "auth-needed" },
{ "url": "doc-needed", "valueCode": "clinical" }
]
}]
}
}]
}
Documentation Templates & Rules. Fetch the payer's Questionnaire + CQL, prepopulate it from
the record, and return a QuestionnaireResponse. MockPayer serves $questionnaire-package with SDC
initialExpression CQL bindings.
{
"resourceType": "Parameters",
"parameter": [
{ "name": "coverage",
"valueReference": { "reference": "Coverage/INS-334" } },
{ "name": "order",
"valueReference": { "reference": "ServiceRequest/sr-mri-lumbar" } }
]
}
{
"resourceType": "Bundle",
"type": "collection",
"entry": [{
"resource": {
"resourceType": "Questionnaire",
"id": "mri-lumbar-pa",
"url": "https://mockpayer.dev/Questionnaire/mri-lumbar-pa",
"version": "1.0.0",
"status": "active",
"item": [
{
"linkId": "1",
"text": "Weeks of conservative therapy completed",
"type": "integer",
"required": true,
"extension": [{
"url": ".../sdc-questionnaire-initialExpression",
"valueExpression": {
"language": "text/cql",
"expression": "ConservativeTherapyWeeks"
}
}]
},
{ "linkId": "2",
"text": "Progressive neurologic deficit?",
"type": "boolean", "required": true }
]
}
}
// … Library/mri-lumbar-cql (1 more entry: CQL for prepopulation)
]
}
Prior Authorization Support. Submit the FHIR Claim bundle to $submit, poll
$inquire for async decisions. MockPayer returns approved / pended / denied / more-info driven by your
tenant's scenario.
{
"resourceType": "Bundle",
"type": "collection",
"identifier": { "value": "A12345" },
"timestamp": "2027-01-04T15:21:40Z",
"entry": [{
"fullUrl": "urn:uuid:claim-1",
"resource": {
"resourceType": "Claim",
"status": "active",
"type": { "coding": [{ "code": "professional" }] },
"use": "preauthorization",
"patient": { "reference": "Patient/SUBSCRIBER-8891" },
"insurer": { "reference": "Organization/mockpayer" },
"provider": { "reference": "Organization/UMO-114" },
"priority": { "coding": [{ "code": "normal" }] },
"insurance": [{ "sequence": 1, "focal": true,
"coverage": { "reference": "Coverage/INS-334" } }],
"item": [{
"sequence": 1,
"productOrService": { "coding": [{
"system": "http://www.ama-assn.org/go/cpt",
"code": "72148" }] },
"extension": [{
"url": ".../extension-requestType",
"valueCodeableConcept": { "coding": [{
"system": "https://codesystem.x12.org/005010/1525",
"code": "HS", "display": "Health Services Review" }] }
}]
}]
}
}
// … Organization, Coverage, Patient (3 more entries)
]
}
{
"resourceType": "Bundle",
"type": "collection",
"entry": [{
"resource": {
"resourceType": "ClaimResponse",
"status": "active",
"use": "preauthorization",
"outcome": "complete",
"disposition": "Certified in total.",
"patient": { "reference": "Patient/SUBSCRIBER-8891" },
"request": { "reference": "Claim/REF-AUTH-111099" },
"preAuthRef": "PA-2027-000412",
"item": [{
"itemSequence": 1,
"extension": [{
"url": ".../extension-itemPreAuthPeriod",
"valuePeriod": { "start": "2027-01-05", "end": "2027-04-05" }
}],
"adjudication": [{
"category": { "coding": [{ "code": "submitted" }] },
"extension": [{
"url": ".../extension-reviewAction",
"extension": [
{ "url": "number", "valueString": "AUTH0001" },
{ "url": "code", "valueCodeableConcept": { "coding": [{
"system": "https://codesystem.x12.org/005010/306",
"code": "A1", "display": "Certified in total" }] } }
]
}]
}]
}]
}
}]
}
scenarios
Set a tenant to any behavior with one call. Deterministic in CI mode: same request, same bytes, every run. Every response stays profile-valid; only the outcome changes.
| scenario | behavior | what it exercises |
|---|---|---|
| instant-approve | $submit returns outcome: complete, reviewAction A1 Certified in total + preAuthRef |
happy path, preAuthRef + preAuthPeriod capture |
| pend-then-approve | returns A4 Pending; $inquire flips to A1 after N polls | async $inquire polling + status-transition handling |
| deny-with-reasons | returns A3 Not Certified with reviewAction reasonCode(s) | denial UX + X12 reason-code display |
| request-more-info | A4 Pending + a CommunicationRequest for missing documentation |
additional-documentation loop, DTR re-launch |
| partial-approve | outcome: partial; some items A1, some A3 |
per-item adjudication, mixed-outcome rendering |
| token-expiry | OAuth access token 401s after 60s | refresh-token flow + silent retry |
| rate-limit | 429 after N req/min with a Retry-After header |
backoff, jitter, throttling |
| slow-payer | $submit responds after an 8s delay | client timeouts, async submission patterns |
validation
Send a bundle that violates the profile and MockPayer answers with an OperationOutcome
that says what's wrong in English, points at the FHIRPath, and shows the corrected shape. No guessing from a schema dump.
{
"resourceType": "Claim",
"use": "preauthorization",
"supportingInfo": [{
"sequence": 1,
"valueReference": {
"reference": "DocumentReference/doc-1"
}
}]
}
{
"resourceType": "OperationOutcome",
"issue": [{
"severity": "error",
"code": "required",
"expression": ["Claim.supportingInfo[0].category"],
"details": {
"text": "supportingInfo[0] has no category, so it matches no slice in the PAS Claim profile. To attach a document, set category to PASTempCodes#additionalInformation and add the required documentInformation extension. Corrected shape below."
}
}]
}
{
"sequence": 1,
"category": {
"coding": [{
"system": "http://hl7.org/fhir/us/davinci-pas/CodeSystem/PASTempCodes",
"code": "additionalInformation"
}]
},
"extension": [{
"url": "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-documentInformation",
"extension": [{
"url": "reportTypeCode",
"valueCodeableConcept": { "coding": [{
"system": "https://codesystem.x12.org/005010/755",
"code": "PY", "display": "Physician's Report"
}] }
}]
}],
"valueReference": { "reference": "DocumentReference/doc-1" }
}
Why: the PAS Claim profile slices supportingInfo by category. Without a
category coding the payer can't tell an attached document from admission dates or free-form message text, so it's
rejected before adjudication rather than silently dropped.
ci
Point a deterministic tenant at a fixed scenario and assert the full submit → poll loop in CI. Responses are byte-stable, so snapshot tests don't flake.
name: prior-auth-integration
on: [push, pull_request]
jobs:
pas-contract:
runs-on: ubuntu-latest
env:
MOCKPAYER_TENANT: ci-deterministic
MOCKPAYER_TOKEN: ${{ secrets.MOCKPAYER_CI_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: 20 }
- run: npm ci
# Pin the tenant to a fixed scenario so responses are byte-stable
- name: Select scenario
run: |
curl -sf -X POST \
https://mockpayer.dev/api/tenants/$MOCKPAYER_TENANT/scenario \
-H "Authorization: Bearer $MOCKPAYER_TOKEN" \
-d '{ "scenario": "pend-then-approve", "inquiryPollsUntilApproval": 2 }'
- name: PAS submit + inquire integration test
run: npm run test:pas # asserts A4 Pending → A1 Certified after 2 polls
pricing
Start on the free tier with one scenario. Upgrade when you need CI mode and the full scenario set. Cancel anytime.
free
email signup, no card
- 1 scenario (instant-approve)
- Shared demo tenant
- Rate-limited endpoints
- CRD / DTR / PAS sandbox
pro
14-day trial · card required
- All scenarios + scripting
- Deterministic CI mode
- Dedicated tenants
- 5 seats
- Synthetic cohort generator
team
14-day trial · card required
- Everything in Pro
- SSO / SAML
- Unlimited seats
- Priority scenario requests
- Private scenario library
faq
Is there any PHI?
No. Every patient, coverage, and claim is synthetic: generated cohorts, never derived from real records. Nothing you send is retained beyond your tenant's session.
Do I need a BAA?
No. There's no protected health information in the system, so there's nothing to cover. That's the point of testing against a mock payer instead of a real one.
What is CMS-0057-F?
A CMS final rule requiring impacted payers to expose FHIR Prior Authorization APIs built on the Da Vinci guides. The API compliance date is January 1, 2027.
Can I self-host?
Not yet. MockPayer is hosted only today. A self-hosted image for air-gapped CI is on the roadmap; tell us if that's a blocker.
What's on the roadmap after PAS?
The other CMS-0057 APIs: Provider Access and Payer-to-Payer, plus the Prior Authorization metrics reporting endpoints.
Which FHIR version and IG releases?
FHIR R4. Payloads track the published PAS, CRD, and DTR STU releases; the demo tenant pins a version and reports it in the capability statement.