Skip to content

DTR App ​

Note: This app lives in a separate repository: max-health-inc/dtr-app. It deploys independently -- its CI builds static assets and pushes them into the apps_static Docker volume on the target server. The backend serves it at /apps/dtr-app/.

Da Vinci Documentation Templates & Rules (DTR) application. A SMART on FHIR app for prior authorization documentation, questionnaire rendering, and CQL-based auto-population.

The DTR App implements the Da Vinci DTR IG workflow: it launches from an EHR or standalone, fetches payer-defined Questionnaires, auto-populates answers using CQL expressions and patient data, and submits completed documentation for prior authorization.

┌───────────┐   SMART launch   ┌──────────────┐   FHIR R4   ┌─────────────┐
│  DTR App  │ ──────────────── │  Proxy Smart │ ──────────── │ FHIR Server │
│ (browser) │   Bearer token   │  /fhir/*     │             │ (PAS, DTR)  │
└───────────┘                  └──────────────┘             └─────────────┘

The workflow starts from a clinical service, finds the payer questionnaires that apply to it, and renders them through AEHRC Smart Forms. Answers that can be derived from the patient record are populated by CQL before the practitioner sees the form, so the manual step is review rather than transcription. Completed documentation is reviewed once more and submitted as a prior authorization request, and submitted requests stay visible with their status.

Launch mode is detected rather than configured (see Launch Modes below): an EHR launch arrives with its patient context already set, and a standalone launch opens patient search first.

SMART Configuration ​

FieldValue
Client IDdtr-app
Launch TypeStandalone, EHR Launch
Scopesopenid, profile, launch, patient/Patient.read, patient/Questionnaire.read, patient/QuestionnaireResponse.*
Redirect URI{base}/callback

Development ​

See the dtr-app repository for development instructions.

CommandDescription
bun run devStart dev server on port 5175
bun run buildProduction build
bun run typecheckTypeScript type checking
bun run lintESLint

Key Components ​

ComponentPurpose
DashboardMain landing page after launch
PatientSearchSearch and select patient context
PatientBannerDisplay current patient info
ServiceSelectorChoose the clinical service for PA
QuestionnaireBrowserBrowse available questionnaires
QuestionnaireRendererRender and fill FHIR Questionnaires
SmartFormsQuestionnaireRendererAEHRC Smart Forms integration
NewPaWorkflowStep-by-step prior auth workflow
PaRequestListView submitted PA requests
PaReviewSubmitReview and submit completed documentation

Launch Modes ​

The DTR App detects its launch mode from URL parameters:

ParameterModeBehavior
launch + issEHR LaunchUses provided launch context, skips patient search
NeitherStandaloneShows patient search, user selects context

Tech Stack ​

LayerTechnology
FrameworkReact 19, TypeScript
BuildVite, Tailwind CSS
UIshadcn/ui (via shared-ui)
Forms@aehrc/smart-forms-renderer
FHIR@types/fhir, Da Vinci PAS types
AuthSMART on FHIR (SmartAppShell)

Proxy Smart — Healthcare Interoperability Platform