From 000bf4afdb3823691441cc4e03e7d320d6825fc6 Mon Sep 17 00:00:00 2001 From: Aleksei Serednev Date: Sat, 19 Sep 2026 08:34:17 +0200 Subject: [PATCH] Document the PlanDefinition route required for form packages The Forms page reads form packages alongside questionnaires, so the SMART access policy needs to allow the PlanDefinition route. Co-Authored-By: Claude Opus 5 --- .../smart-app-integration.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/aidbox-ui-builder-alpha/smart-app-integration.md b/docs/aidbox-ui-builder-alpha/smart-app-integration.md index 11d79a1..d9ea8a2 100644 --- a/docs/aidbox-ui-builder-alpha/smart-app-integration.md +++ b/docs/aidbox-ui-builder-alpha/smart-app-integration.md @@ -150,10 +150,28 @@ matcho: - '#^/QuestionnaireResponse/[^/]+/\$[a-z-]+$' - '#^/fhir/Questionnaire(/[^/]+)?(/\$[a-z-]+)?/?$' - '#^/fhir/QuestionnaireResponse(/\$[a-z-]+)?/?$' + - '#^/fhir/PlanDefinition(/[^/]+)?(/\$[a-z-]+)?/?$' request-method: $one-of: [get, post, put, patch, delete] ``` +### Form packages access + +Form packages are stored as `PlanDefinition` resources. The **Forms** page reads them alongside questionnaires, so the SMART client needs access to that route as well. Without it, the forms list may not display correctly. + +The `PlanDefinition` route is included in the policy above. If the policy was generated by the SMART setup in the Formbox UI, add the route manually: + +```yaml + uri: + $one-of: + # keep the existing routes, then add + - '#^/fhir/PlanDefinition(/[^/]+)?(/\$[a-z-]+)?/?$' +``` + +`$one-of` is replaced as a whole rather than extended, so send the full list of routes with this one appended. + +Including this route in the generated policy can be covered by request. + ### Sandbox note EHR sandboxes may require whitelisting or a support request before SMART launch is available in the provider UI.