{"openapi":"3.1.0","info":{"title":"Documentation Templates and Rules","description":"Facade REST APIs for Documentation Templates and Rules (DTR) workflows. This specification fully documents all four DTR stages: documentation-requirements, questionnaire-package, next-question, and generate-guidance.","version":"1.0.0"},"servers":[{"url":"https://sandbox-apigw.optum.com/abm","description":"OI API Gateway - Dev"}],"tags":[{"name":"DTR API","description":""}],"x-readme":{"explorer-enabled":true,"proxy-enabled":true},"security":[{"bearerAuth":[]}],"paths":{"/dtr/v1":{"post":{"description":"Accepts a FHIR DTR request and returns a FHIR response.\n\nUse the `stage` query parameter to select the workflow step. If `stage` is omitted, the default is `questionnaire-package`.\n\nRecommended call sequence:\n1. `documentation-requirements` - Check whether documentation is required for the submitted coverage and order(s).\n2. `questionnaire-package` - Retrieve PackageBundle containing `Questionnare` and `QuestionnaireResponse`.\n3. `next-question` - Submit an in-progress `QuestionnaireResponse` to get the next question(s). Repeat until status is `completed`.\n4. `generate-guidance` - Submit one or more completed `QuestionnaireResponse` resources to produce final documentation/guidance.","operationId":"handleIqxDtrRequest","parameters":[{"description":"Execution stage. Selects which of the four DTR operations is executed and determines the expected request/response payload shape (see the operation description and the request examples for each stage). This is Optional - when it is not provided, the backend defaults to `questionnaire-package`.","in":"query","name":"stage","required":false,"schema":{"type":"string","enum":["documentation-requirements","questionnaire-package","next-question","generate-guidance"],"default":"questionnaire-package"}}],"requestBody":{"content":{"application/fhir+json":{"schema":{"type":"string","description":"FHIR payload, sent as raw JSON text. Shape depends on the `stage` query parameter: a FHIR `Parameters` resource (containing `coverage` + `order`, `coverage` + `context`, or `coverage` + `questionnaire` canonical entries) for `documentation-requirements` and `questionnaire-package`, a FHIR `QuestionnaireResponse` resource for `next-question`, and a FHIR `Parameters` resource containing one or more `questionnaireResponse` entries for `generate-guidance`. Server-side, this is received and passed through as a raw JSON string without deserialization into a typed object."},"examples":{"Documentation Requirements - Success":{"summary":"documentation-requirements: coverage + order","description":"Determines whether documentation is required for the given coverage and order.","value":"{\n  \"resourceType\": \"Parameters\",\n  \"parameter\": [\n    {\n      \"name\": \"coverage\",\n      \"resource\": {\n        \"resourceType\": \"Coverage\",\n        \"id\": \"CoverageExample\",\n        \"extension\": [\n          {\n            \"extension\": [\n              {\n                \"extension\": [\n                  {\n                    \"url\": \"key\",\n                    \"valueString\": \"LineOfBusiness1\"\n                  },\n                  {\n                    \"url\": \"contents\",\n                    \"valueString\": \"demo\"\n                  }\n                ],\n                \"url\": \"lineOfBusinessN\"\n              }\n            ],\n            \"url\": \"https://payer-crd.s3docs.optum.com/StructureDefinition/interqual-line-of-business\"\n          }\n        ]\n      }\n    },\n    {\n      \"name\": \"order\",\n      \"resource\": {\n        \"resourceType\": \"ServiceRequest\",\n        \"id\": \"External-Demo-Context-Order-partner-provided-context-ef2ffa7c-ab5e-43c5-a242-a68f0f680c0e\",\n        \"code\": {\n          \"coding\": [\n            {\n              \"system\": \"http://www.ama-assn.org/go/cpt\",\n              \"code\": \"42831\"\n            }\n          ],\n          \"text\": \"adenoidectomy\"\n        }\n      }\n    }\n  ]\n}"},"Questionnaire Package - Orders":{"summary":"questionnaire-package: coverage + orders","description":"Retrieves the questionnaire(s) needed for each of the supplied orders. `order.id` is optional.","value":"{\n  \"resourceType\": \"Parameters\",\n  \"parameter\": [\n    {\n      \"name\": \"coverage\",\n      \"resource\": {\n        \"resourceType\": \"Coverage\",\n        \"id\": \"CoverageExample\",\n        \"extension\": [\n          {\n            \"extension\": [\n              {\n                \"extension\": [\n                  {\n                    \"url\": \"key\",\n                    \"valueString\": \"LineOfBusiness1\"\n                  },\n                  {\n                    \"url\": \"contents\",\n                    \"valueString\": \"demo\"\n                  }\n                ],\n                \"url\": \"lineOfBusinessN\"\n              }\n            ],\n            \"url\": \"https://payer-crd.s3docs.optum.com/StructureDefinition/interqual-line-of-business\"\n          }\n        ]\n      }\n    },\n    {\n      \"name\": \"order\",\n      \"resource\": {\n        \"resourceType\": \"ServiceRequest\",\n        \"id\": \"External-Demo-Context-Order-partner-provided-context-ef2ffa7c-ab5e-43c5-a242-a68f0f680c0e\",\n        \"code\": {\n          \"coding\": [\n            {\n              \"system\": \"http://www.ama-assn.org/go/cpt\",\n              \"code\": \"42831\"\n            }\n          ],\n          \"text\": \"adenoidectomy\"\n        }\n      }\n    }\n  ]\n}"},"Questionnaire Package - Context Id":{"summary":"questionnaire-package: coverage + previously issued context id","description":"Re-uses a `processingContextId` returned by a prior `documentation-requirements` or `questionnaire-package` call instead of re-supplying the order(s).","value":"{\n  \"resourceType\": \"Parameters\",\n  \"parameter\": [\n    {\n      \"name\": \"coverage\",\n      \"resource\": {\n        \"resourceType\": \"Coverage\",\n        \"id\": \"CoverageExample\",\n        \"extension\": [\n          {\n            \"extension\": [\n              {\n                \"extension\": [\n                  {\n                    \"url\": \"key\",\n                    \"valueString\": \"LineOfBusiness1\"\n                  },\n                  {\n                    \"url\": \"contents\",\n                    \"valueString\": \"demo\"\n                  }\n                ],\n                \"url\": \"lineOfBusinessN\"\n              }\n            ],\n            \"url\": \"https://payer-crd.s3docs.optum.com/StructureDefinition/interqual-line-of-business\"\n          }\n        ]\n      }\n    },\n    {\n      \"name\": \"context\",\n      \"valueString\": \"d3a7fa88-2922-432f-a263-c77604009e02\"\n    }\n  ]\n}"},"Questionnaire Package - Canonical Questionnaire URLs":{"summary":"questionnaire-package: coverage + known questionnaire canonical URLs","description":"Requests questionnaire package(s) directly by canonical URL instead of by order.","value":"{\n  \"resourceType\": \"Parameters\",\n  \"parameter\": [\n    {\n      \"name\": \"coverage\",\n      \"resource\": {\n        \"resourceType\": \"Coverage\",\n        \"id\": \"CoverageExample\",\n        \"extension\": [\n          {\n            \"extension\": [\n              {\n                \"extension\": [\n                  {\n                    \"url\": \"key\",\n                    \"valueString\": \"LineOfBusiness1\"\n                  },\n                  {\n                    \"url\": \"contents\",\n                    \"valueString\": \"demo\"\n                  }\n                ],\n                \"url\": \"lineOfBusinessN\"\n              }\n            ],\n            \"url\": \"https://payer-crd.s3docs.optum.com/StructureDefinition/interqual-line-of-business\"\n          }\n        ]\n      }\n    },\n    {\n      \"name\": \"questionnaire\",\n      \"valueCanonical\": \"https://integ.ds.interqual.com/caas/fhir/Questionnaire/RM24%7CPROCEDURES%7CISP6301%7CR000\"\n    },\n    {\n      \"name\": \"questionnaire\",\n      \"valueCanonical\": \"https://integ.ds.interqual.com/caas/fhir/Questionnaire/RM24%7CPROCEDURES%7CISP7501%7CR000\"\n    }\n  ]\n}"},"Next Question - Initial Request":{"summary":"next-question: first call for a newly started questionnaire","description":"Illustrative example (long-form clinical `description` text has been truncated for brevity). No `item` answers have been supplied yet.","value":"{\n  \"resourceType\": \"QuestionnaireResponse\",\n  \"id\": \"c1ab3cd7-2566-49e7-aab8-3c27305e4b0d\",\n  \"meta\": {\n    \"profile\": [\n      \"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaireresponse-adapt\"\n    ]\n  },\n  \"contained\": [\n    {\n      \"resourceType\": \"Questionnaire\",\n      \"id\": \"407518\",\n      \"meta\": {\n        \"profile\": [\n          \"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-adapt\"\n        ]\n      },\n      \"text\": {\n        \"status\": \"empty\",\n        \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>No description available at this time.</p></div>\"\n      },\n      \"extension\": [\n        {\n          \"url\": \"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-questionnaireAdaptive\",\n          \"valueUrl\": \"https://api.test.auth.optum.com/burden-reduction\"\n        }\n      ],\n      \"identifier\": [\n        {\n          \"value\": \"RM24|PROCEDURES|ISP6301|R000\"\n        }\n      ],\n      \"name\": \"Adenoidectomy\",\n      \"title\": \"Adenoidectomy (CP:Procedures, InterQual® 2024, Mar. 2024 Release)\",\n      \"derivedFrom\": [\n        \"https://integ.ds.interqual.com/caas/fhir/Questionnaire/RM24%7CPROCEDURES%7CISP6301%7CR000\"\n      ],\n      \"status\": \"active\",\n      \"date\": \"2024-03-22T00:00:00-05:00\",\n      \"description\": \"Informational Note: I/O Setting - Outpatient. (Clinical description text truncated for brevity.)\"\n    }\n  ],\n  \"extension\": [\n    {\n      \"url\": \"http://hl7.org/fhir/StructureDefinition/questionnaireresponse-reason\",\n      \"valueCodeableConcept\": {\n        \"coding\": [\n          {\n            \"system\": \"http://www.ama-assn.org/go/cpt\",\n            \"code\": \"42831\"\n          }\n        ]\n      }\n    },\n    {\n      \"url\": \"http://hl7.org/fhir/us/davinci-dtr/StructureDefinition/qr-context\",\n      \"valueReference\": {\n        \"reference\": \"Coverage/CoverageExample\"\n      }\n    },\n    {\n      \"url\": \"http://hl7.org/fhir/us/davinci-dtr/StructureDefinition/intendedUse\",\n      \"valueCodeableConcept\": {\n        \"coding\": [\n          {\n            \"system\": \"http://hl7.org/fhir/us/davinci-crd/CodeSystem/temp\",\n            \"code\": \"withpa\",\n            \"display\": \"Include in prior authorization\"\n          }\n        ]\n      }\n    },\n    {\n      \"url\": \"http://hl7.org/fhir/us/davinci-dtr/StructureDefinition/qr-context\",\n      \"valueReference\": {\n        \"reference\": \"ServiceRequest/External-Demo-Context-Order-partner-provided-context-ef2ffa7c-ab5e-43c5-a242-a68f0f680c0e\"\n      }\n    }\n  ],\n  \"identifier\": {\n    \"system\": \"https://payer-dtr.s3docs.optum.com/CodeSystem/iqx-consultation-identifier\",\n    \"value\": \"c1ab3cd7-2566-49e7-aab8-3c27305e4b0d\"\n  },\n  \"questionnaire\": \"#407518\",\n  \"status\": \"in-progress\",\n  \"subject\": {\n    \"reference\": \"Patient/anonymous\"\n  },\n  \"authored\": \"2026-08-10T15:12:18.8838+00:00\"\n}"},"Next Question - Request with Answers":{"summary":"next-question: first call for a newly started questionnaire","description":"Illustrative example (long-form clinical `description` text has been truncated for brevity). No `item` answers have been supplied yet.","value":"{\n  \"resourceType\": \"QuestionnaireResponse\",\n  \"id\": \"c1ab3cd7-2566-49e7-aab8-3c27305e4b0d\",\n  \"meta\": {\n    \"profile\": [\n      \"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaireresponse-adapt\"\n    ]\n  },\n  \"contained\": [\n    {\n      \"resourceType\": \"Questionnaire\",\n      \"id\": \"407518\",\n      \"meta\": {\n        \"profile\": [\n          \"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-adapt\"\n        ]\n      },\n      \"text\": {\n        \"status\": \"empty\",\n        \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>No description available at this time.</p></div>\"\n      },\n      \"extension\": [\n        {\n          \"url\": \"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-questionnaireAdaptive\",\n          \"valueUrl\": \"https://api.test.auth.optum.com/burden-reduction\"\n        },\n        {\n          \"url\": \"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-endpoint\",\n          \"valueUri\": \"/caas/fhir/QuestionnaireResponse/$qr-eval\"\n        }\n      ],\n      \"identifier\": [\n        {\n          \"value\": \"RM24|PROCEDURES|ISP6301|R000\"\n        }\n      ],\n      \"name\": \"Adenoidectomy\",\n      \"title\": \"Adenoidectomy (CP:Procedures, InterQual® 2024, Mar. 2024 Release)\",\n      \"derivedFrom\": [\n        \"https://integ.ds.interqual.com/caas/fhir/Questionnaire/RM24%7CPROCEDURES%7CISP6301%7CR000\"\n      ],\n      \"status\": \"active\",\n      \"date\": \"2024-03-22T00:00:00-05:00\",\n      \"description\": \"<strong>Informational Note</strong><br /><p>I/O Setting:&nbsp;Outpatient</p><br /><p>Adenoidectomy is frequently performed with tonsillectomy. Tonsillectomy must be approved separately. For criteria covering tonsillectomy, see the \\\"Tonsillectomy\\\" criteria subset.&nbsp;&nbsp;&nbsp;&nbsp;</p><br /><p>InterQual® Procedures criteria are derived from the systematic, continuous review and critical appraisal of the most current evidence-based literature and include input from our independent panel of clinical experts. To generate the most appropriate recommendations, a comprehensive literature review of the clinical evidence was conducted. Sources searched included PubMed, Agency for Healthcare Research and Quality (AHRQ) Comparative Effectiveness Reviews, the Cochrane Library, Choosing Wisely, Centers for Medicare &amp; Medicaid Services (CMS) National Coverage Determinations, and the National Institute of Health and Care Excellence (NICE). Other medical literature databases, medical content providers, data sources, regulatory body websites, and specialty society resources may also have been used. Relevant studies were assessed for risk of bias following principles described in the Cochrane Handbook. The resulting evidence was assessed for consistency, directness, precision, effect size, and publication bias. Observational trials were also evaluated for the presence of a dose-response gradient and the likely effect of plausible confounders.</p>\",\n      \"item\": [\n        {\n          \"id\": \"2039841954\",\n          \"extension\": [\n            {\n              \"url\": \"http://hl7.org/fhir/StructureDefinition/questionnaire-supportLink\",\n              \"valueUri\": \"https://api.test.auth.optum.com/burden-reduction/DocumentReference?queryContext=1ab2755e-e153-4090-9424-dd2541e2034e&_query=notes&noteType=QUESTION_NOTE&reference=1&questionnaire=407518\"\n            }\n          ],\n          \"linkId\": \"1\",\n          \"text\": \"Choose one:\",\n          \"type\": \"choice\",\n          \"required\": true,\n          \"repeats\": false,\n          \"answerOption\": [\n            {\n              \"valueCoding\": {\n                \"code\": \"1\",\n                \"display\": \"Age ≥ 18\"\n              }\n            },\n            {\n              \"valueCoding\": {\n                \"code\": \"2\",\n                \"display\": \"Age < 18\"\n              }\n            }\n          ],\n          \"item\": [\n            {\n              \"linkId\": \"1.comment\",\n              \"text\": \"Comment:\",\n              \"type\": \"string\",\n              \"required\": false,\n              \"repeats\": false\n            }\n          ]\n        },\n        {\n          \"id\": \"2039841955\",\n          \"extension\": [\n            {\n              \"url\": \"http://hl7.org/fhir/StructureDefinition/questionnaire-supportLink\",\n              \"valueUri\": \"https://api.test.auth.optum.com/burden-reduction/DocumentReference?queryContext=1ab2755e-e153-4090-9424-dd2541e2034e&_query=notes&noteType=ANSWER_NOTE&linkId=2&reference=1&questionnaire=407518\"\n            },\n            {\n              \"url\": \"http://hl7.org/fhir/StructureDefinition/questionnaire-supportLink\",\n              \"valueUri\": \"https://api.test.auth.optum.com/burden-reduction/DocumentReference?queryContext=1ab2755e-e153-4090-9424-dd2541e2034e&_query=notes&noteType=ANSWER_NOTE&linkId=2&reference=2&questionnaire=407518\"\n            }\n          ],\n          \"linkId\": \"2\",\n          \"text\": \"Choose one:\",\n          \"type\": \"choice\",\n          \"required\": true,\n          \"repeats\": false,\n          \"answerOption\": [\n            {\n              \"valueCoding\": {\n                \"code\": \"1\",\n                \"display\": \"Adenoid tumor by imaging or transnasal endoscopy\"\n              }\n            },\n            {\n              \"valueCoding\": {\n                \"code\": \"2\",\n                \"display\": \"Obstructive sleep apnea\"\n              }\n            },\n            {\n              \"valueCoding\": {\n                \"code\": \"3\",\n                \"display\": \"None of the above\"\n              }\n            }\n          ],\n          \"item\": [\n            {\n              \"linkId\": \"2.comment\",\n              \"text\": \"Comment:\",\n              \"type\": \"string\",\n              \"required\": false,\n              \"repeats\": false\n            }\n          ]\n        },\n        {\n          \"id\": \"2039841956\",\n          \"extension\": [\n            {\n              \"url\": \"http://hl7.org/fhir/StructureDefinition/questionnaire-supportLink\",\n              \"valueUri\": \"https://api.test.auth.optum.com/burden-reduction/DocumentReference?queryContext=1ab2755e-e153-4090-9424-dd2541e2034e&_query=notes&noteType=QUESTION_NOTE&reference=9015&questionnaire=407518\"\n            }\n          ],\n          \"linkId\": \"9015\",\n          \"text\": \"Obstructive sleep apnea (OSA) confirmed by sleep study or sleep study not tolerated\",\n          \"type\": \"choice\",\n          \"required\": true,\n          \"repeats\": false,\n          \"answerOption\": [\n            {\n              \"valueCoding\": {\n                \"code\": \"Y\",\n                \"display\": \"Yes\"\n              }\n            },\n            {\n              \"valueCoding\": {\n                \"code\": \"N\",\n                \"display\": \"No\"\n              }\n            }\n          ],\n          \"item\": [\n            {\n              \"linkId\": \"9015.comment\",\n              \"text\": \"Comment:\",\n              \"type\": \"string\",\n              \"required\": false,\n              \"repeats\": false\n            }\n          ]\n        },\n        {\n          \"id\": \"2039841957\",\n          \"extension\": [\n            {\n              \"url\": \"http://hl7.org/fhir/StructureDefinition/questionnaire-supportLink\",\n              \"valueUri\": \"https://api.test.auth.optum.com/burden-reduction/DocumentReference?queryContext=1ab2755e-e153-4090-9424-dd2541e2034e&_query=notes&noteType=QUESTION_NOTE&reference=9030&questionnaire=407518\"\n            },\n            {\n              \"url\": \"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-openLabel\",\n              \"valueString\": \"Other clinical information (add comment)\",\n              \"_valueString\": {\n                \"extension\": [\n                  {\n                    \"url\": \"https://integ.ds.interqual.com/caas/fhir/StructureDefinition/additional-context\",\n                    \"valueCoding\": {\n                      \"system\": \"urn:interqual:answeroption-code\",\n                      \"code\": \"3\"\n                    }\n                  }\n                ]\n              }\n            },\n            {\n              \"extension\": [\n                {\n                  \"url\": \"key\",\n                  \"valueId\": \"free-text-exclusive\"\n                },\n                {\n                  \"url\": \"human\",\n                  \"valueString\": \"If any answer is a string, no repetitions are permitted.\"\n                },\n                {\n                  \"url\": \"severity\",\n                  \"valueCode\": \"error\"\n                },\n                {\n                  \"url\": \"expression\",\n                  \"valueExpression\": {\n                    \"language\": \"text/fhirpath\",\n                    \"expression\": \"answer.value.ofType(string).exists() implies answer.count() = 1\"\n                  }\n                }\n              ],\n              \"url\": \"http://hl7.org/fhir/StructureDefinition/targetConstraint\"\n            }\n          ],\n          \"linkId\": \"9030\",\n          \"text\": \"Choose one:\",\n          \"type\": \"open-choice\",\n          \"required\": true,\n          \"repeats\": false,\n          \"answerOption\": [\n            {\n              \"valueCoding\": {\n                \"code\": \"1\",\n                \"display\": \"Tonsillectomy planned\"\n              }\n            },\n            {\n              \"valueCoding\": {\n                \"code\": \"2\",\n                \"display\": \"Prior tonsillectomy performed\"\n              }\n            }\n          ],\n          \"item\": [\n            {\n              \"linkId\": \"9030.comment\",\n              \"text\": \"Comment:\",\n              \"type\": \"string\",\n              \"required\": false,\n              \"repeats\": false\n            }\n          ]\n        },\n        {\n          \"id\": \"2039841958\",\n          \"linkId\": \"9035\",\n          \"text\": \"Adenoid hypertrophy confirmed by physical examination or transnasal endoscopy or x-ray\",\n          \"type\": \"choice\",\n          \"required\": true,\n          \"repeats\": false,\n          \"answerOption\": [\n            {\n              \"valueCoding\": {\n                \"code\": \"Y\",\n                \"display\": \"Yes\"\n              }\n            },\n            {\n              \"valueCoding\": {\n                \"code\": \"N\",\n                \"display\": \"No\"\n              }\n            }\n          ],\n          \"item\": [\n            {\n              \"linkId\": \"9035.comment\",\n              \"text\": \"Comment:\",\n              \"type\": \"string\",\n              \"required\": false,\n              \"repeats\": false\n            }\n          ]\n        }\n      ]\n    }\n  ],\n  \"extension\": [\n    {\n      \"url\": \"http://hl7.org/fhir/StructureDefinition/questionnaireresponse-reason\",\n      \"valueCodeableConcept\": {\n        \"coding\": [\n          {\n            \"system\": \"http://www.ama-assn.org/go/cpt\",\n            \"code\": \"42831\"\n          }\n        ]\n      }\n    },\n    {\n      \"url\": \"http://hl7.org/fhir/us/davinci-dtr/StructureDefinition/qr-context\",\n      \"valueReference\": {\n        \"reference\": \"Coverage/CoverageExample\"\n      }\n    },\n    {\n      \"url\": \"http://hl7.org/fhir/us/davinci-dtr/StructureDefinition/intendedUse\",\n      \"valueCodeableConcept\": {\n        \"coding\": [\n          {\n            \"system\": \"http://hl7.org/fhir/us/davinci-crd/CodeSystem/temp\",\n            \"code\": \"withpa\",\n            \"display\": \"Include in prior authorization\"\n          }\n        ]\n      }\n    },\n    {\n      \"url\": \"http://hl7.org/fhir/us/davinci-dtr/StructureDefinition/qr-context\",\n      \"valueReference\": {\n        \"reference\": \"ServiceRequest/External-Demo-Context-Order-partner-provided-context-ef2ffa7c-ab5e-43c5-a242-a68f0f680c0e\"\n      }\n    }\n  ],\n  \"identifier\": {\n    \"system\": \"https://payer-dtr.s3docs.optum.com/CodeSystem/iqx-consultation-identifier\",\n    \"value\": \"c1ab3cd7-2566-49e7-aab8-3c27305e4b0d\"\n  },\n  \"questionnaire\": \"#407518\",\n  \"status\": \"in-progress\",\n  \"subject\": {\n    \"reference\": \"Patient/anonymous\"\n  },\n  \"authored\": \"2026-08-10T15:12:18.8838+00:00\",\n  \"item\": [\n    {\n      \"linkId\": \"1\",\n      \"answer\": [\n        {\n          \"valueCoding\": {\n            \"code\": \"1\"\n          },\n          \"item\": [\n            {\n              \"linkId\": \"1.comment\",\n              \"answer\": [\n                {\n                  \"valueString\": \"This is my comment\"\n                }\n              ]\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"linkId\": \"2\",\n      \"answer\": [\n        {\n          \"valueCoding\": {\n            \"code\": \"2\"\n          },\n          \"item\": [\n            {\n              \"linkId\": \"2.comment\",\n              \"answer\": [\n                {\n                  \"valueString\": \"This is my 2nd comment\"\n                }\n              ]\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"linkId\": \"9015\",\n      \"answer\": [\n        {\n          \"valueCoding\": {\n            \"code\": \"Y\"\n          },\n          \"item\": [\n            {\n              \"linkId\": \"9015.comment\",\n              \"answer\": [\n                {\n                  \"valueString\": \"This is my 3rd comment\"\n                }\n              ]\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"linkId\": \"9030\",\n      \"answer\": [\n        {\n          \"valueCoding\": {\n            \"code\": \"2\"\n          },\n          \"item\": [\n            {\n              \"linkId\": \"9030.comment\",\n              \"answer\": [\n                {\n                  \"valueString\": \"This is my 4rd comment\"\n                }\n              ]\n            }\n          ]\n        }\n      ]\n    },\n    {\n      \"linkId\": \"9035\",\n      \"answer\": [\n        {\n          \"valueCoding\": {\n            \"code\": \"Y\"\n          },\n          \"item\": [\n            {\n              \"linkId\": \"9035.comment\",\n              \"answer\": [\n                {\n                  \"valueString\": \"This is my 5th comment\"\n                }\n              ]\n            }\n          ]\n        }\n      ]\n    }\n  ]\n}"},"Generate Guidance":{"summary":"generate-guidance: two completed QuestionnaireResponses","description":"Illustrative example (long-form clinical `description`/`item` detail truncated for brevity). Each `questionnaireResponse` must have `status` = `completed`.","value":"{\n  \"resourceType\": \"Parameters\",\n  \"parameter\": [\n    {\n      \"name\": \"questionnaireResponse\",\n      \"resource\": {\n        \"resourceType\": \"QuestionnaireResponse\",\n        \"id\": \"2bbc4d2e-9568-4cb3-9dad-bc2978a98b3c\",\n        \"questionnaire\": \"#407518\",\n        \"status\": \"completed\",\n        \"subject\": {\n          \"reference\": \"Patient/anonymous\"\n        },\n        \"authored\": \"2026-08-03T10:42:42.2632+00:00\",\n        \"item\": [\n          {\n            \"linkId\": \"1\",\n            \"answer\": [\n              {\n                \"valueCoding\": {\n                  \"code\": \"2\"\n                }\n              }\n            ]\n          }\n        ]\n      }\n    },\n    {\n      \"name\": \"questionnaireResponse\",\n      \"resource\": {\n        \"resourceType\": \"QuestionnaireResponse\",\n        \"id\": \"64fab6af-ffb5-44aa-a41c-8d790c56515c\",\n        \"questionnaire\": \"#407586\",\n        \"status\": \"completed\",\n        \"subject\": {\n          \"reference\": \"Patient/anonymous\"\n        },\n        \"authored\": \"2026-08-03T10:42:42.2633+00:00\",\n        \"item\": [\n          {\n            \"linkId\": \"1\",\n            \"answer\": [\n              {\n                \"valueCoding\": {\n                  \"code\": \"2\"\n                }\n              }\n            ]\n          },\n          {\n            \"linkId\": \"2\",\n            \"answer\": [\n              {\n                \"valueCoding\": {\n                  \"code\": \"7\"\n                }\n              }\n            ]\n          }\n        ]\n      }\n    }\n  ]\n}"}}}},"description":"FHIR DTR request payload","required":true},"responses":{"200":{"content":{"application/fhir+json":{"schema":{"type":"object","additionalProperties":true},"examples":{"Documentation Requirements - Response":{"summary":"documentation-requirements response","description":"Representative response indicating documentation is required, along with a `processingContextId` that can be reused in a subsequent `questionnaire-package` call via the `context` parameter.","value":{"resourceType":"Parameters","parameter":[{"name":"documentationRequired","valueCode":"Y"},{"name":"documentationNeeded","valueCode":"both"},{"name":"processingContextId","valueString":"d3a7fa88-2922-432f-a263-c77604009e02"}]}},"Questionnaire Package - Response":{"summary":"questionnaire-package response","description":"Returns one canonical questionnaire URL per order/topic identified, plus a `processingContextId` for reuse in later `next-question`/`generate-guidance` calls.","value":{"resourceType":"Parameters","parameter":[{"name":"documentationRequired","valueCode":"Y"},{"name":"documentationNeeded","valueCode":"both"},{"name":"questionnaire","valueCanonical":"https://integ.ds.interqual.com/caas/fhir/Questionnaire/RM24%7CPROCEDURES%7CISP6301%7CR000"},{"name":"questionnaire","valueCanonical":"https://integ.ds.interqual.com/caas/fhir/Questionnaire/RM24%7CPROCEDURES%7CISP7501%7CR000"},{"name":"processingContextId","valueString":"d3a7fa88-2922-432f-a263-c77604009e02"}]}},"Next Question - Response (Question Returned)":{"summary":"next-question response (status : in-progress)","description":"Illustrative example. Returns the updated `QuestionnaireResponse` with the next question item(s) to present. `status` remains `in-progress`.","value":{"resourceType":"QuestionnaireResponse","id":"c1ab3cd7-2566-49e7-aab8-3c27305e4b0d","questionnaire":"#407518","status":"in-progress","subject":{"reference":"Patient/anonymous"},"item":[{"linkId":"2","text":"Choose one:"}]}},"Next Question - Response (Completed)":{"summary":"next-question response (status : completed)","description":"Illustrative example. `status` becomes `completed` once all required questions have been answered; the caller should proceed to `generate-guidance`.","value":{"resourceType":"QuestionnaireResponse","id":"c1ab3cd7-2566-49e7-aab8-3c27305e4b0d","questionnaire":"#407518","status":"completed","subject":{"reference":"Patient/anonymous"}}},"Generate Guidance - Response":{"summary":"generate-guidance response","description":"Illustrative example. Represents the final documentation/guidance outcome for the supplied, completed QuestionnaireResponse(s).","value":{"resourceType":"Parameters","parameter":[{"name":"guidanceStatus","valueCode":"complete"},{"name":"processingContextId","valueString":"d3a7fa88-2922-432f-a263-c77604009e02"}]}}}}},"description":"Successful DTR response"}},"summary":"DTR API Endpoint","tags":["DTR API"]}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer token issued by the auth token endpoint. Sent as `Authorization: Bearer <token>`. Note: per the OpenAPI spec, the Authorization header is documented via a security scheme rather than as a plain header parameter."}}}}