{"info":{"title":"Medical Network Documentation Templates and Rules (DTR) API","description":"Implements the Da Vinci Documentation Templates and Rules (DTR) FHIR operations: retrieves a previously submitted QuestionnaireResponse, and runs $questionnaire-package to fetch the Questionnaire (plus its CQL Library and ValueSet dependencies) needed for a coverage or order.","version":"v1"},"openapi":"3.0.3","servers":[{"url":"/","description":"Relative to the deployed environment's host. The base path for this API is /priorauth/v1; the full hostname varies by environment (e.g. development, test, production)."}],"tags":[{"name":"DTR","description":"Da Vinci Documentation Templates and Rules operations."},{"name":"Health Check","description":"API availability and operational-status endpoint."}],"paths":{"/priorauth/v1/fhir/2.1/dtr/QuestionnaireResponse/{qr_id}":{"get":{"operationId":"dtr_get_questionnaire_response","parameters":[{"in":"path","name":"qr_id","required":true,"schema":{"title":"Qr Id","type":"string","pattern":"^[A-Za-z0-9\\-.]{1,64}$"},"description":"Logical id of the QuestionnaireResponse to retrieve. Only letters, digits, hyphens, and dots are accepted (max 64 chars) — anything else is rejected before any upstream call is made.","example":"qr-e2e-test-001"},{"in":"header","name":"x-mock-scenario","required":false,"schema":{"title":"X-Mock-Scenario","type":"string","nullable":true},"description":"Optional scenario name forwarded to the clearinghouse to select a canned response in non-production environments."},{"in":"header","name":"x-chng-trace-id","required":false,"schema":{"title":"X-Chng-Trace-Id","type":"string","nullable":true},"description":"Optional client-supplied correlation identifier, preferred over x-optum-trace-id when both are present."},{"in":"header","name":"x-optum-trace-id","required":false,"schema":{"title":"X-Optum-Trace-Id","type":"string","nullable":true},"description":"Optional client-supplied correlation identifier used to trace the request across systems. The resolved trace id (inbound or generated) is echoed back on this same header in the response.","example":"e2e-test-dtr-get"}],"responses":{"200":{"description":"The clearinghouse returned the requested QuestionnaireResponse. The response body is passed back exactly as received from the clearinghouse; the QuestionnaireResponse schema below describes the expected FHIR shape.","headers":{"x-optum-trace-id":{"description":"Echoes the resolved trace id.","schema":{"type":"string"}}},"content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/QuestionnaireResponse"},"example":{"resourceType":"QuestionnaireResponse","id":"qr-e2e-test-001","meta":{"profile":["http://hl7.org/fhir/us/davinci-dtr/StructureDefinition/dtr-questionnaireresponse"]},"questionnaire":"http://payer.example.com/fhir/Questionnaire/prior-auth-home-o2|1.0.0","status":"in-progress","subject":{"reference":"Patient/pat-00123","display":"Jane Smith"},"encounter":{"reference":"Encounter/enc-45678"},"authored":"2026-10-05T12:59:11Z","author":{"reference":"Practitioner/prac-99001","display":"Dr. Robert Chen"},"source":{"reference":"Patient/pat-00123"},"item":[{"linkId":"group-1","text":"Patient & Order Information","item":[{"linkId":"1.1","text":"Primary Diagnosis Code","answer":[{"valueCoding":{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"J96.10","display":"Chronic respiratory failure, unspecified whether with hypoxia or hypercapnia"}}]},{"linkId":"1.2","text":"Ordering Physician NPI","answer":[{"valueString":"1234567890"}]}]},{"linkId":"group-2","text":"Home Oxygen Therapy Details","item":[{"linkId":"2.1","text":"Oxygen flow rate (LPM)","answer":[{"valueDecimal":2}]},{"linkId":"2.2","text":"Prescribed hours per day","answer":[]},{"linkId":"2.3","text":"Qualifying test result: arterial blood O2 saturation (%)","answer":[]}]}]}}}},"502":{"description":"Returned when the supplied identifier is not in a valid format, or when the clearinghouse could not be reached or timed out. The error body is a simple message rather than a FHIR OperationOutcome resource.","headers":{"x-optum-trace-id":{"description":"Echoes the resolved trace id.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionError"},"example":{"detail":"Invalid questionnaire response id"}}}},"default":{"description":"Any other status code returned by the clearinghouse (e.g. 400, 404, 500) is passed back to the caller exactly as received, without modification. The trace id is always included in the response headers.","headers":{"x-optum-trace-id":{"description":"Echoes the resolved trace id.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"summary":"Get Questionnaire Response","tags":["DTR"],"description":"Retrieves a previously submitted QuestionnaireResponse from the configured clearinghouse."}},"/priorauth/v1/fhir/2.1/dtr/Questionnaire/$questionnaire-package":{"post":{"operationId":"dtr_post_questionnaire_package","parameters":[{"in":"header","name":"x-mock-scenario","required":false,"schema":{"title":"X-Mock-Scenario","type":"string","nullable":true},"description":"Optional scenario name forwarded to the clearinghouse to select a canned response in non-production environments."},{"in":"header","name":"x-chng-trace-id","required":false,"schema":{"title":"X-Chng-Trace-Id","type":"string","nullable":true},"description":"Optional client-supplied correlation identifier, preferred over x-optum-trace-id when both are present."},{"in":"header","name":"x-optum-trace-id","required":false,"schema":{"title":"X-Optum-Trace-Id","type":"string","nullable":true},"description":"Optional client-supplied correlation identifier used to trace the request across systems. The resolved trace id (inbound or generated) is echoed back on this same header in the response.","example":"e2e-test-dtr-post"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionnairePackageInput"},"example":{"resourceType":"Parameters","parameter":[{"name":"coverage","valueReference":{"reference":"Coverage/cov-001"}}]}}},"required":true,"description":"FHIR Parameters resource identifying which coverage, order, and/or questionnaire to fetch the package for. At least one `coverage` or `questionnaire` parameter is required by application logic (not by the schema itself)."},"responses":{"200":{"description":"The clearinghouse returned the requested questionnaire package. The response body is passed back exactly as received from the clearinghouse; the QuestionnairePackageBundle schema below describes the expected FHIR shape.","headers":{"x-optum-trace-id":{"description":"Echoes the resolved trace id.","schema":{"type":"string"}}},"content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/QuestionnairePackageBundle"},"example":{"resourceType":"Bundle","type":"searchset","total":3,"entry":[{"fullUrl":"http://payer.example.com/fhir/Questionnaire/prior-auth-home-o2","resource":{"resourceType":"Questionnaire","id":"prior-auth-home-o2","url":"http://payer.example.com/fhir/Questionnaire/prior-auth-home-o2","version":"1.0.0","title":"Home Oxygen Therapy — Prior Authorization Questionnaire","status":"active","subjectType":["Patient"],"item":[{"linkId":"group-1","text":"Patient & Order Information","type":"group","item":[{"linkId":"1.1","text":"Primary Diagnosis Code","type":"open-choice","required":true,"answerValueSet":"http://payer.example.com/fhir/ValueSet/resp-dx-codes"},{"linkId":"1.2","text":"Ordering Physician NPI","type":"string","required":true}]},{"linkId":"group-2","text":"Home Oxygen Therapy Details","type":"group","item":[{"linkId":"2.1","text":"Oxygen flow rate (LPM)","type":"decimal","required":true},{"linkId":"2.2","text":"Prescribed hours per day","type":"integer","required":true},{"linkId":"2.3","text":"Qualifying test result: arterial blood O2 saturation (%)","type":"decimal","required":true},{"linkId":"2.4","text":"Attending physician attestation: patient meets LCD criteria","type":"boolean","required":true}]}]}},{"fullUrl":"http://payer.example.com/fhir/Library/home-o2-cql-lib","resource":{"resourceType":"Library","id":"home-o2-cql-lib","url":"http://payer.example.com/fhir/Library/home-o2-cql-lib","version":"1.0.0","name":"HomeO2PriorAuth","title":"Home Oxygen Therapy Prior Authorization CQL Library","status":"active","type":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/library-type","code":"logic-library"}]},"content":[{"contentType":"text/cql","title":"HomeO2PriorAuth.cql","data":"bGlicmFyeSBIb21lTzJQcmlvckF1dGggdmVyc2lvbiAnMS4wLjAnCnVzaW5nIEZISVIgdmVyc2lvbiAnNC4wLjEnCmluY2x1ZGUgRkhJUkhlbHBlcnMgdmVyc2lvbiAnNC4wLjEnCgpjb250ZXh0IFBhdGllbnQKCmRlZmluZSBPcmRlcmluZ1BoeXNpY2lhbk5QSToKICBGaGlyLnN0cmluZygnMTIzNDU2Nzg5MCcp"},{"contentType":"application/elm+json","title":"HomeO2PriorAuth.elm.json","data":"eyJsaWJyYXJ5Ijp7ImlkZW50aWZpZXIiOnsiaWQiOiJIb21lTzJQcmlvckF1dGgiLCJ2ZXJzaW9uIjoiMS4wLjAifX19"}]}},{"fullUrl":"http://payer.example.com/fhir/ValueSet/resp-dx-codes","resource":{"resourceType":"ValueSet","id":"resp-dx-codes","url":"http://payer.example.com/fhir/ValueSet/resp-dx-codes","version":"2026-01","title":"Respiratory Diagnosis Codes (ICD-10-CM)","status":"active","compose":{"include":[{"system":"http://hl7.org/fhir/sid/icd-10-cm","concept":[{"code":"J96.10","display":"Chronic respiratory failure, unspecified"},{"code":"J96.11","display":"Chronic respiratory failure with hypoxia"},{"code":"J44.1","display":"COPD with acute exacerbation"},{"code":"J45.51","display":"Severe persistent asthma with acute exacerbation"}]}]}}}]}}}},"400":{"description":"Returned when neither a `coverage` nor a `questionnaire` parameter was supplied in the request; at least one is required to identify what to retrieve.","headers":{"x-optum-trace-id":{"description":"Echoes the resolved trace id.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionError"},"example":{"detail":"At least one of 'coverage' or 'questionnaire' parameters is required."}}}},"422":{"description":"The request body is syntactically valid JSON but fails schema validation (e.g. missing `parameter`, or an unsupported parameter `name`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"},"example":{"detail":[{"loc":["body","parameter"],"msg":"Field required","type":"missing"}]}}}},"502":{"description":"Returned when the clearinghouse could not be reached or the request timed out.","headers":{"x-optum-trace-id":{"description":"Echoes the resolved trace id.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPExceptionError"},"example":{"detail":"DTR clearinghouse unreachable: timeout"}}}},"default":{"description":"Any other status code returned by the clearinghouse (e.g. 404, 500) is passed back to the caller exactly as received, without modification. The trace id is always included in the response headers.","headers":{"x-optum-trace-id":{"description":"Echoes the resolved trace id.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"summary":"Post Questionnaire Package","tags":["DTR"],"description":"Runs the questionnaire package operation against the configured clearinghouse to fetch the Questionnaire, CQL Library, and ValueSet resources needed to complete DTR for a coverage or order. This endpoint does not currently enforce its own authentication."}},"/priorauth/v1/healthcheck":{"get":{"tags":["Health Check"],"summary":"Health Check","description":"Returns the availability status and API version. Exempt from the request-timeout middleware. No authentication is required or implemented.","operationId":"get_healthcheck","responses":{"200":{"description":"The API is available and operating normally.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthCheckResponse"},"example":{"version":"v1","status":"OK"}}}},"500":{"description":"An unexpected server error. This is not expected under normal operation."}}}}},"components":{"schemas":{"ParameterName":{"description":"Supported parameter names for $questionnaire-package.","enum":["coverage","order","questionnaire"],"title":"ParameterName","type":"string","example":"coverage","default":"coverage"},"Reference":{"description":"FHIR Reference datatype.","properties":{"reference":{"title":"Reference","type":"string","nullable":true,"description":"Literal reference (relative or absolute URL). Example — Patient/123.","example":"Coverage/cov-e2e-001","default":"Coverage/cov-e2e-001"},"type":{"title":"Type","type":"string","nullable":true,"description":"The FHIR resource type referenced.","example":"Coverage","default":"Coverage"},"display":{"title":"Display","type":"string","nullable":true,"description":"Human-readable label.","example":"Primary medical coverage","default":"Primary medical coverage"}},"title":"Reference","type":"object","example":{"reference":"Coverage/cov-e2e-001"},"default":{"reference":"Coverage/cov-e2e-001"}},"Parameter":{"description":"A single named parameter within the $questionnaire-package input.","properties":{"name":{"$ref":"#/components/schemas/ParameterName"},"valueReference":{"allOf":[{"$ref":"#/components/schemas/Reference"}],"nullable":true,"example":{"reference":"Coverage/cov-e2e-001"},"default":{"reference":"Coverage/cov-e2e-001"}},"valueCanonical":{"title":"Valuecanonical","type":"string","nullable":true,"description":"Canonical URL of a specific Questionnaire to retrieve. Used when the caller already knows which questionnaire is required.","example":"http://example.org/Questionnaire/prior-auth-imaging","default":"http://example.org/Questionnaire/prior-auth-imaging"}},"required":["name"],"title":"Parameter","type":"object","example":{"name":"coverage","valueReference":{"reference":"Coverage/cov-e2e-001"}},"default":{"name":"coverage","valueReference":{"reference":"Coverage/cov-e2e-001"}}},"QuestionnairePackageInput":{"description":"FHIR Parameters resource passed to the $questionnaire-package operation.","properties":{"resourceType":{"title":"Resourcetype","type":"string","pattern":"^Parameters$","example":"Parameters","default":"Parameters"},"parameter":{"title":"Parameter","type":"array","minItems":1,"items":{"$ref":"#/components/schemas/Parameter"},"example":[{"name":"coverage","valueReference":{"reference":"Coverage/cov-e2e-001"}}],"default":[{"name":"coverage","valueReference":{"reference":"Coverage/cov-e2e-001"}}]}},"required":["parameter"],"title":"QuestionnairePackageInput","type":"object","example":{"resourceType":"Parameters","parameter":[{"name":"coverage","valueReference":{"reference":"Coverage/cov-e2e-001"}}]},"default":{"resourceType":"Parameters","parameter":[{"name":"coverage","valueReference":{"reference":"Coverage/cov-e2e-001"}}]}},"Coding":{"description":"FHIR Coding datatype.","properties":{"system":{"title":"System","type":"string","nullable":true,"example":"http://loinc.org","default":"http://loinc.org"},"version":{"title":"Version","type":"string","nullable":true,"example":"2.76","default":"2.76"},"code":{"title":"Code","type":"string","nullable":true,"example":"LA33-6","default":"LA33-6"},"display":{"title":"Display","type":"string","nullable":true,"example":"Yes","default":"Yes"},"userSelected":{"title":"Userselected","type":"boolean","nullable":true,"example":true,"default":true}},"title":"Coding","type":"object","example":{"system":"http://loinc.org","code":"LA33-6","display":"Yes"},"default":{"system":"http://loinc.org","code":"LA33-6","display":"Yes"}},"CodeableConcept":{"description":"FHIR CodeableConcept datatype.","properties":{"coding":{"title":"Coding","type":"array","nullable":true,"items":{"$ref":"#/components/schemas/Coding"},"example":[{"system":"http://terminology.hl7.org/CodeSystem/library-type","code":"logic-library"}],"default":[{"system":"http://terminology.hl7.org/CodeSystem/library-type","code":"logic-library"}]},"text":{"title":"Text","type":"string","nullable":true,"example":"Logic Library","default":"Logic Library"}},"title":"CodeableConcept","type":"object","example":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/library-type","code":"logic-library"}]},"default":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/library-type","code":"logic-library"}]}},"Quantity":{"description":"FHIR Quantity datatype.","properties":{"value":{"title":"Value","type":"number","nullable":true,"example":5,"default":5},"unit":{"title":"Unit","type":"string","nullable":true,"example":"mg","default":"mg"},"system":{"title":"System","type":"string","nullable":true,"example":"http://unitsofmeasure.org","default":"http://unitsofmeasure.org"},"code":{"title":"Code","type":"string","nullable":true,"example":"mg","default":"mg"}},"title":"Quantity","type":"object","example":{"value":5,"unit":"mg","system":"http://unitsofmeasure.org","code":"mg"},"default":{"value":5,"unit":"mg","system":"http://unitsofmeasure.org","code":"mg"}},"QuestionnaireResponseStatus":{"description":"Lifecycle status of a QuestionnaireResponse. 'in-progress' is used for draft saves; 'completed' for final prior-auth submission.","enum":["in-progress","completed","amended","entered-in-error","stopped"],"title":"QuestionnaireResponseStatus","type":"string","example":"completed","default":"completed"},"QuestionnaireResponseAnswer":{"description":"A single answer value. Exactly one value[x] property should be populated.","properties":{"valueBoolean":{"title":"Valueboolean","type":"boolean","nullable":true,"example":true,"default":true},"valueDecimal":{"title":"Valuedecimal","type":"number","nullable":true,"example":1.5,"default":1.5},"valueInteger":{"title":"Valueinteger","type":"integer","nullable":true,"example":2,"default":2},"valueDate":{"title":"Valuedate","type":"string","nullable":true,"example":"2026-09-10","default":"2026-09-10"},"valueDateTime":{"title":"Valuedatetime","type":"string","nullable":true,"example":"2026-09-10T10:00:00Z","default":"2026-09-10T10:00:00Z"},"valueTime":{"title":"Valuetime","type":"string","nullable":true,"example":"10:00:00","default":"10:00:00"},"valueString":{"title":"Valuestring","type":"string","nullable":true,"example":"Yes","default":"Yes"},"valueUri":{"title":"Valueuri","type":"string","nullable":true,"example":"http://example.org/answer","default":"http://example.org/answer"},"valueCoding":{"allOf":[{"$ref":"#/components/schemas/Coding"}],"nullable":true,"example":{"system":"http://loinc.org","code":"LA33-6","display":"Yes"},"default":{"system":"http://loinc.org","code":"LA33-6","display":"Yes"}},"valueQuantity":{"allOf":[{"$ref":"#/components/schemas/Quantity"}],"nullable":true,"example":{"value":5,"unit":"mg"},"default":{"value":5,"unit":"mg"}},"valueReference":{"allOf":[{"$ref":"#/components/schemas/Reference"}],"nullable":true,"example":{"reference":"Observation/obs-001"},"default":{"reference":"Observation/obs-001"}},"item":{"title":"Item","type":"array","nullable":true,"items":{"$ref":"#/components/schemas/QuestionnaireResponseItem"},"description":"Nested items subordinate to this answer."}},"title":"QuestionnaireResponseAnswer","type":"object","example":{"valueBoolean":true},"default":{"valueBoolean":true}},"QuestionnaireResponseItem":{"description":"A single item within a FHIR QuestionnaireResponse.","properties":{"linkId":{"title":"Linkid","type":"string","description":"Corresponds to the linkId in the source Questionnaire item.","example":"imaging-indication","default":"imaging-indication"},"text":{"title":"Text","type":"string","nullable":true,"description":"Display text for the item (copied from Questionnaire for readability).","example":"Has conservative treatment been attempted?","default":"Has conservative treatment been attempted?"},"answer":{"title":"Answer","type":"array","nullable":true,"items":{"$ref":"#/components/schemas/QuestionnaireResponseAnswer"},"example":[{"valueBoolean":true}],"default":[{"valueBoolean":true}]},"item":{"title":"Item","type":"array","nullable":true,"items":{"$ref":"#/components/schemas/QuestionnaireResponseItem"},"description":"Nested child items (for group responses)."}},"required":["linkId"],"title":"QuestionnaireResponseItem","type":"object","example":{"linkId":"imaging-indication","text":"Has conservative treatment been attempted?","answer":[{"valueBoolean":true}]},"default":{"linkId":"imaging-indication","text":"Has conservative treatment been attempted?","answer":[{"valueBoolean":true}]}},"QuestionnaireResponse":{"description":"HL7 FHIR R4 QuestionnaireResponse resource.","properties":{"resourceType":{"title":"Resourcetype","type":"string","pattern":"^QuestionnaireResponse$","example":"QuestionnaireResponse","default":"QuestionnaireResponse"},"id":{"title":"Id","type":"string","nullable":true,"description":"Server-assigned logical id. Must be present on PUT and is returned on POST.","example":"qr-e2e-test-001","default":"qr-e2e-test-001"},"questionnaire":{"title":"Questionnaire","type":"string","description":"Canonical URL of the Questionnaire that was answered.","example":"http://example.org/Questionnaire/prior-auth-imaging","default":"http://example.org/Questionnaire/prior-auth-imaging"},"status":{"$ref":"#/components/schemas/QuestionnaireResponseStatus"},"subject":{"allOf":[{"$ref":"#/components/schemas/Reference"}],"nullable":true,"description":"The patient the response is about.","example":{"reference":"Patient/pat-e2e-001"},"default":{"reference":"Patient/pat-e2e-001"}},"encounter":{"allOf":[{"$ref":"#/components/schemas/Reference"}],"nullable":true,"description":"The encounter during which this response was completed.","example":{"reference":"Encounter/enc-e2e-001"},"default":{"reference":"Encounter/enc-e2e-001"}},"authored":{"title":"Authored","type":"string","nullable":true,"description":"Date/time the response was last saved.","example":"2026-09-10T10:00:00Z","default":"2026-09-10T10:00:00Z"},"author":{"allOf":[{"$ref":"#/components/schemas/Reference"}],"nullable":true,"description":"Practitioner or device that created/updated the response.","example":{"reference":"Practitioner/prac-e2e-001"},"default":{"reference":"Practitioner/prac-e2e-001"}},"source":{"allOf":[{"$ref":"#/components/schemas/Reference"}],"nullable":true,"description":"Person/device who provided the answers.","example":{"reference":"Practitioner/prac-e2e-001"},"default":{"reference":"Practitioner/prac-e2e-001"}},"item":{"title":"Item","type":"array","nullable":true,"items":{"$ref":"#/components/schemas/QuestionnaireResponseItem"},"example":[{"linkId":"imaging-indication","text":"Has conservative treatment been attempted?","answer":[{"valueBoolean":true}]}],"default":[{"linkId":"imaging-indication","text":"Has conservative treatment been attempted?","answer":[{"valueBoolean":true}]}]}},"required":["questionnaire","status"],"title":"QuestionnaireResponse","type":"object","example":{"resourceType":"QuestionnaireResponse","id":"qr-e2e-test-001","questionnaire":"http://example.org/Questionnaire/prior-auth-imaging","status":"completed"},"default":{"resourceType":"QuestionnaireResponse","id":"qr-e2e-test-001","questionnaire":"http://example.org/Questionnaire/prior-auth-imaging","status":"completed"}},"AnswerOption":{"description":"One allowed answer choice for a Questionnaire item.","properties":{"valueCoding":{"allOf":[{"$ref":"#/components/schemas/Coding"}],"nullable":true,"example":{"system":"http://loinc.org","code":"LA33-6","display":"Yes"},"default":{"system":"http://loinc.org","code":"LA33-6","display":"Yes"}},"valueString":{"title":"Valuestring","type":"string","nullable":true,"example":"Yes","default":"Yes"},"valueInteger":{"title":"Valueinteger","type":"integer","nullable":true,"example":1,"default":1},"valueDate":{"title":"Valuedate","type":"string","nullable":true,"example":"2026-09-10","default":"2026-09-10"},"initialSelected":{"title":"Initialselected","type":"boolean","nullable":true,"example":false,"default":false}},"title":"AnswerOption","type":"object","example":{"valueString":"Yes"},"default":{"valueString":"Yes"}},"QuestionnaireItemType":{"description":"The data type of a Questionnaire item.","enum":["group","display","boolean","decimal","integer","date","dateTime","time","string","text","url","choice","open-choice","attachment","reference","quantity"],"title":"QuestionnaireItemType","type":"string","example":"boolean","default":"boolean"},"QuestionnaireItem":{"description":"A single item (question or group) within a FHIR Questionnaire.","properties":{"linkId":{"title":"Linkid","type":"string","description":"Unique identifier for the item within the questionnaire.","example":"imaging-indication","default":"imaging-indication"},"text":{"title":"Text","type":"string","nullable":true,"description":"The display text for this item.","example":"Has conservative treatment been attempted?","default":"Has conservative treatment been attempted?"},"type":{"$ref":"#/components/schemas/QuestionnaireItemType"},"required":{"title":"Required","type":"boolean","nullable":true,"example":true,"default":true},"repeats":{"title":"Repeats","type":"boolean","nullable":true,"example":false,"default":false},"answerValueSet":{"title":"Answervalueset","type":"string","nullable":true,"description":"ValueSet canonical URL constraining allowed answers.","example":"http://example.org/ValueSet/yes-no","default":"http://example.org/ValueSet/yes-no"},"answerOption":{"title":"Answeroption","type":"array","nullable":true,"items":{"$ref":"#/components/schemas/AnswerOption"},"example":[{"valueString":"Yes"}],"default":[{"valueString":"Yes"}]},"item":{"title":"Item","type":"array","nullable":true,"items":{"$ref":"#/components/schemas/QuestionnaireItem"},"description":"Nested child items (for group type)."}},"required":["linkId","type"],"title":"QuestionnaireItem","type":"object","example":{"linkId":"imaging-indication","text":"Has conservative treatment been attempted?","type":"boolean","required":true},"default":{"linkId":"imaging-indication","text":"Has conservative treatment been attempted?","type":"boolean","required":true}},"UsageContext":{"description":"FHIR UsageContext datatype, used to scope a Questionnaire's applicability.","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/Coding"}],"nullable":true,"example":{"system":"http://terminology.hl7.org/CodeSystem/usage-context-type","code":"focus"},"default":{"system":"http://terminology.hl7.org/CodeSystem/usage-context-type","code":"focus"}},"valueCodeableConcept":{"allOf":[{"$ref":"#/components/schemas/CodeableConcept"}],"nullable":true,"example":{"text":"Diagnostic Imaging"},"default":{"text":"Diagnostic Imaging"}}},"title":"UsageContext","type":"object","example":{"code":{"system":"http://terminology.hl7.org/CodeSystem/usage-context-type","code":"focus"}},"default":{"code":{"system":"http://terminology.hl7.org/CodeSystem/usage-context-type","code":"focus"}}},"QuestionnaireStatus":{"description":"Publication status shared by Questionnaire, Library, and ValueSet.","enum":["draft","active","retired","unknown"],"title":"QuestionnaireStatus","type":"string","example":"active","default":"active"},"Questionnaire":{"description":"HL7 FHIR R4 Questionnaire resource (with SDC/CQL DTR extensions).","properties":{"resourceType":{"title":"Resourcetype","type":"string","pattern":"^Questionnaire$","example":"Questionnaire","default":"Questionnaire"},"id":{"title":"Id","type":"string","nullable":true,"example":"prior-auth-imaging","default":"prior-auth-imaging"},"url":{"title":"Url","type":"string","nullable":true,"description":"Canonical URL that uniquely identifies this questionnaire.","example":"http://example.org/Questionnaire/prior-auth-imaging","default":"http://example.org/Questionnaire/prior-auth-imaging"},"version":{"title":"Version","type":"string","nullable":true,"example":"1.0.0","default":"1.0.0"},"title":{"title":"Title","type":"string","nullable":true,"example":"Prior Authorization — Diagnostic Imaging","default":"Prior Authorization — Diagnostic Imaging"},"status":{"$ref":"#/components/schemas/QuestionnaireStatus"},"experimental":{"title":"Experimental","type":"boolean","nullable":true,"example":false,"default":false},"subjectType":{"title":"Subjecttype","type":"array","nullable":true,"items":{"type":"string"},"example":["Patient"],"default":["Patient"]},"description":{"title":"Description","type":"string","nullable":true,"example":"Prior authorization questionnaire for diagnostic imaging orders.","default":"Prior authorization questionnaire for diagnostic imaging orders."},"useContext":{"title":"Usecontext","type":"array","nullable":true,"items":{"$ref":"#/components/schemas/UsageContext"}},"item":{"title":"Item","type":"array","nullable":true,"items":{"$ref":"#/components/schemas/QuestionnaireItem"},"example":[{"linkId":"imaging-indication","text":"Has conservative treatment been attempted?","type":"boolean","required":true}],"default":[{"linkId":"imaging-indication","text":"Has conservative treatment been attempted?","type":"boolean","required":true}]}},"required":["status"],"title":"Questionnaire","type":"object","example":{"resourceType":"Questionnaire","id":"prior-auth-imaging","status":"active"},"default":{"resourceType":"Questionnaire","id":"prior-auth-imaging","status":"active"}},"Attachment":{"description":"FHIR Attachment datatype used for Library.content (embedded CQL/ELM).","properties":{"contentType":{"title":"Contenttype","type":"string","nullable":true,"description":"MIME type. E.g. text/cql or application/elm+json.","example":"text/cql","default":"text/cql"},"data":{"title":"Data","type":"string","nullable":true,"description":"Base64-encoded content.","example":"bGlicmFyeSBQcmlvckF1dGhMb2dpYw==","default":"bGlicmFyeSBQcmlvckF1dGhMb2dpYw=="},"url":{"title":"Url","type":"string","nullable":true,"example":"http://example.org/Library/prior-auth-logic/cql","default":"http://example.org/Library/prior-auth-logic/cql"},"title":{"title":"Title","type":"string","nullable":true,"example":"Prior Auth Logic (CQL)","default":"Prior Auth Logic (CQL)"}},"title":"Attachment","type":"object","example":{"contentType":"text/cql","title":"Prior Auth Logic (CQL)"},"default":{"contentType":"text/cql","title":"Prior Auth Logic (CQL)"}},"Library":{"description":"HL7 FHIR R4 Library resource carrying embedded CQL logic.","properties":{"resourceType":{"title":"Resourcetype","type":"string","pattern":"^Library$","example":"Library","default":"Library"},"id":{"title":"Id","type":"string","nullable":true,"example":"prior-auth-logic","default":"prior-auth-logic"},"url":{"title":"Url","type":"string","nullable":true,"example":"http://example.org/Library/prior-auth-logic","default":"http://example.org/Library/prior-auth-logic"},"version":{"title":"Version","type":"string","nullable":true,"example":"1.0.0","default":"1.0.0"},"name":{"title":"Name","type":"string","nullable":true,"example":"PriorAuthLogic","default":"PriorAuthLogic"},"title":{"title":"Title","type":"string","nullable":true,"example":"Prior Auth Logic","default":"Prior Auth Logic"},"status":{"$ref":"#/components/schemas/QuestionnaireStatus"},"type":{"allOf":[{"$ref":"#/components/schemas/CodeableConcept"}],"description":"Must be logic-library (http://terminology.hl7.org/CodeSystem/library-type).","example":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/library-type","code":"logic-library"}]},"default":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/library-type","code":"logic-library"}]}},"content":{"title":"Content","type":"array","nullable":true,"items":{"$ref":"#/components/schemas/Attachment"},"description":"Base64-encoded CQL or ELM content.","example":[{"contentType":"text/cql","title":"Prior Auth Logic (CQL)"}],"default":[{"contentType":"text/cql","title":"Prior Auth Logic (CQL)"}]}},"required":["status","type"],"title":"Library","type":"object","example":{"resourceType":"Library","id":"prior-auth-logic","status":"active","type":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/library-type","code":"logic-library"}]}},"default":{"resourceType":"Library","id":"prior-auth-logic","status":"active","type":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/library-type","code":"logic-library"}]}}},"ValueSetComposeConcept":{"description":"One code system's included concepts within a ValueSet.compose.include entry.","properties":{"system":{"title":"System","type":"string","nullable":true,"example":"http://loinc.org","default":"http://loinc.org"},"concept":{"title":"Concept","type":"array","nullable":true,"items":{"$ref":"#/components/schemas/Coding"},"example":[{"system":"http://loinc.org","code":"LA33-6","display":"Yes"}],"default":[{"system":"http://loinc.org","code":"LA33-6","display":"Yes"}]}},"title":"ValueSetComposeConcept","type":"object","example":{"system":"http://loinc.org","concept":[{"system":"http://loinc.org","code":"LA33-6","display":"Yes"}]},"default":{"system":"http://loinc.org","concept":[{"system":"http://loinc.org","code":"LA33-6","display":"Yes"}]}},"ValueSetCompose":{"description":"The content logical definition of a ValueSet.","properties":{"include":{"title":"Include","type":"array","nullable":true,"items":{"$ref":"#/components/schemas/ValueSetComposeConcept"}}},"title":"ValueSetCompose","type":"object"},"ValueSet":{"description":"HL7 FHIR R4 ValueSet used to constrain answer choices within a Questionnaire.","properties":{"resourceType":{"title":"Resourcetype","type":"string","pattern":"^ValueSet$","example":"ValueSet","default":"ValueSet"},"id":{"title":"Id","type":"string","nullable":true,"example":"yes-no","default":"yes-no"},"url":{"title":"Url","type":"string","nullable":true,"example":"http://example.org/ValueSet/yes-no","default":"http://example.org/ValueSet/yes-no"},"version":{"title":"Version","type":"string","nullable":true,"example":"1.0.0","default":"1.0.0"},"name":{"title":"Name","type":"string","nullable":true,"example":"YesNo","default":"YesNo"},"title":{"title":"Title","type":"string","nullable":true,"example":"Yes / No","default":"Yes / No"},"status":{"$ref":"#/components/schemas/QuestionnaireStatus"},"compose":{"allOf":[{"$ref":"#/components/schemas/ValueSetCompose"}],"nullable":true}},"required":["status"],"title":"ValueSet","type":"object","example":{"resourceType":"ValueSet","id":"yes-no","status":"active"},"default":{"resourceType":"ValueSet","id":"yes-no","status":"active"}},"BundleEntry":{"description":"One entry within the $questionnaire-package response Bundle.","properties":{"fullUrl":{"title":"Fullurl","type":"string","nullable":true,"example":"http://example.org/Questionnaire/prior-auth-imaging","default":"http://example.org/Questionnaire/prior-auth-imaging"},"resource":{"description":"One of: Questionnaire, Library, or ValueSet.","nullable":true,"anyOf":[{"$ref":"#/components/schemas/Questionnaire"},{"$ref":"#/components/schemas/Library"},{"$ref":"#/components/schemas/ValueSet"}],"example":{"resourceType":"Questionnaire","id":"prior-auth-imaging","status":"active"},"default":{"resourceType":"Questionnaire","id":"prior-auth-imaging","status":"active"}}},"title":"BundleEntry","type":"object","example":{"fullUrl":"http://example.org/Questionnaire/prior-auth-imaging","resource":{"resourceType":"Questionnaire","id":"prior-auth-imaging","status":"active"}},"default":{"fullUrl":"http://example.org/Questionnaire/prior-auth-imaging","resource":{"resourceType":"Questionnaire","id":"prior-auth-imaging","status":"active"}}},"QuestionnairePackageBundle":{"description":"FHIR Bundle (type searchset) returned by the questionnaire package operation. Contains one or more Questionnaire resources, associated Library (CQL) resources, and ValueSet resources. This schema is provided for guidance; the actual response is relayed from the clearinghouse as-is.","properties":{"resourceType":{"title":"Resourcetype","type":"string","pattern":"^Bundle$","example":"Bundle","default":"Bundle"},"type":{"title":"Type","type":"string","pattern":"^searchset$","example":"searchset","default":"searchset"},"total":{"title":"Total","type":"integer","nullable":true,"description":"Total number of entries in the Bundle.","example":1,"default":1},"entry":{"title":"Entry","type":"array","items":{"$ref":"#/components/schemas/BundleEntry"},"example":[{"fullUrl":"http://example.org/Questionnaire/prior-auth-imaging","resource":{"resourceType":"Questionnaire","id":"prior-auth-imaging","status":"active"}}],"default":[{"fullUrl":"http://example.org/Questionnaire/prior-auth-imaging","resource":{"resourceType":"Questionnaire","id":"prior-auth-imaging","status":"active"}}]}},"required":["entry"],"title":"QuestionnairePackageBundle","type":"object","example":{"resourceType":"Bundle","type":"searchset","total":1,"entry":[{"fullUrl":"http://example.org/Questionnaire/prior-auth-imaging","resource":{"resourceType":"Questionnaire","id":"prior-auth-imaging","status":"active"}}]},"default":{"resourceType":"Bundle","type":"searchset","total":1,"entry":[{"fullUrl":"http://example.org/Questionnaire/prior-auth-imaging","resource":{"resourceType":"Questionnaire","id":"prior-auth-imaging","status":"active"}}]}},"HTTPExceptionError":{"description":"The error response shape returned for the 400/502 cases on these endpoints.","properties":{"detail":{"title":"Detail","type":"string","example":"Invalid questionnaire response id","default":"Invalid questionnaire response id"}},"required":["detail"],"title":"HTTPExceptionError","type":"object","example":{"detail":"Invalid questionnaire response id"},"default":{"detail":"Invalid questionnaire response id"}},"ValidationError":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array","example":["body","parameter"],"default":["body","parameter"]},"msg":{"title":"Message","type":"string","example":"Field required","default":"Field required"},"type":{"title":"Error Type","type":"string","example":"missing","default":"missing"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"},"HealthCheckResponse":{"type":"object","description":"Represents the basic health status and version information of the API.","properties":{"status":{"type":"string","description":"Current API availability status.","nullable":true,"example":"OK","default":"OK"},"version":{"type":"string","description":"Published API version.","example":"v1","default":"v1"}},"example":{"status":"OK","version":"v1"},"default":{"status":"OK","version":"v1"}}}},"x-readme":{"explorer-enabled":true,"proxy-enabled":true}}