@rippling/rippling-sdk 0.2.0-alpha.82 → 0.2.0-alpha.83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client.d.mts +4 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +4 -4
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/core/platform/custom-objects/category.d.mts +125 -0
- package/core/platform/custom-objects/category.d.mts.map +1 -0
- package/core/platform/custom-objects/category.d.ts +125 -0
- package/core/platform/custom-objects/category.d.ts.map +1 -0
- package/core/platform/custom-objects/category.js +188 -0
- package/core/platform/custom-objects/category.js.map +1 -0
- package/core/platform/custom-objects/category.mjs +178 -0
- package/core/platform/custom-objects/category.mjs.map +1 -0
- package/core/platform/custom-objects/definition.d.mts +147 -0
- package/core/platform/custom-objects/definition.d.mts.map +1 -0
- package/core/platform/custom-objects/definition.d.ts +147 -0
- package/core/platform/custom-objects/definition.d.ts.map +1 -0
- package/core/platform/custom-objects/definition.js +200 -0
- package/core/platform/custom-objects/definition.js.map +1 -0
- package/core/platform/custom-objects/definition.mjs +190 -0
- package/core/platform/custom-objects/definition.mjs.map +1 -0
- package/core/platform/custom-objects/fields.d.mts +302 -0
- package/core/platform/custom-objects/fields.d.mts.map +1 -0
- package/core/platform/custom-objects/fields.d.ts +302 -0
- package/core/platform/custom-objects/fields.d.ts.map +1 -0
- package/core/platform/custom-objects/fields.js +369 -0
- package/core/platform/custom-objects/fields.js.map +1 -0
- package/core/platform/custom-objects/fields.mjs +347 -0
- package/core/platform/custom-objects/fields.mjs.map +1 -0
- package/core/platform/custom-objects/function-runtime.d.mts +42 -0
- package/core/platform/custom-objects/function-runtime.d.mts.map +1 -0
- package/core/platform/custom-objects/function-runtime.d.ts +42 -0
- package/core/platform/custom-objects/function-runtime.d.ts.map +1 -0
- package/core/platform/custom-objects/function-runtime.js +38 -0
- package/core/platform/custom-objects/function-runtime.js.map +1 -0
- package/core/platform/custom-objects/function-runtime.mjs +35 -0
- package/core/platform/custom-objects/function-runtime.mjs.map +1 -0
- package/core/platform/custom-objects/lifecycle.d.mts +83 -0
- package/core/platform/custom-objects/lifecycle.d.mts.map +1 -0
- package/core/platform/custom-objects/lifecycle.d.ts +83 -0
- package/core/platform/custom-objects/lifecycle.d.ts.map +1 -0
- package/core/platform/custom-objects/lifecycle.js +372 -0
- package/core/platform/custom-objects/lifecycle.js.map +1 -0
- package/core/platform/custom-objects/lifecycle.mjs +367 -0
- package/core/platform/custom-objects/lifecycle.mjs.map +1 -0
- package/core/platform/custom-objects/manager.d.mts +354 -0
- package/core/platform/custom-objects/manager.d.mts.map +1 -0
- package/core/platform/custom-objects/manager.d.ts +354 -0
- package/core/platform/custom-objects/manager.d.ts.map +1 -0
- package/core/platform/custom-objects/manager.js +646 -0
- package/core/platform/custom-objects/manager.js.map +1 -0
- package/core/platform/custom-objects/manager.mjs +637 -0
- package/core/platform/custom-objects/manager.mjs.map +1 -0
- package/core/platform/custom-objects/provisioning.d.mts +138 -0
- package/core/platform/custom-objects/provisioning.d.mts.map +1 -0
- package/core/platform/custom-objects/provisioning.d.ts +138 -0
- package/core/platform/custom-objects/provisioning.d.ts.map +1 -0
- package/core/platform/custom-objects/provisioning.js +455 -0
- package/core/platform/custom-objects/provisioning.js.map +1 -0
- package/core/platform/custom-objects/provisioning.mjs +447 -0
- package/core/platform/custom-objects/provisioning.mjs.map +1 -0
- package/core/platform/custom-objects/rql.d.mts +122 -0
- package/core/platform/custom-objects/rql.d.mts.map +1 -0
- package/core/platform/custom-objects/rql.d.ts +122 -0
- package/core/platform/custom-objects/rql.d.ts.map +1 -0
- package/core/platform/custom-objects/rql.js +225 -0
- package/core/platform/custom-objects/rql.js.map +1 -0
- package/core/platform/custom-objects/rql.mjs +222 -0
- package/core/platform/custom-objects/rql.mjs.map +1 -0
- package/core/platform/custom-objects/schema-manager.d.mts +203 -0
- package/core/platform/custom-objects/schema-manager.d.mts.map +1 -0
- package/core/platform/custom-objects/schema-manager.d.ts +203 -0
- package/core/platform/custom-objects/schema-manager.d.ts.map +1 -0
- package/core/platform/custom-objects/schema-manager.js +256 -0
- package/core/platform/custom-objects/schema-manager.js.map +1 -0
- package/core/platform/custom-objects/schema-manager.mjs +249 -0
- package/core/platform/custom-objects/schema-manager.mjs.map +1 -0
- package/core/platform/custom-objects/typed-rql.d.mts +157 -0
- package/core/platform/custom-objects/typed-rql.d.mts.map +1 -0
- package/core/platform/custom-objects/typed-rql.d.ts +157 -0
- package/core/platform/custom-objects/typed-rql.d.ts.map +1 -0
- package/core/platform/custom-objects/typed-rql.js +583 -0
- package/core/platform/custom-objects/typed-rql.js.map +1 -0
- package/core/platform/custom-objects/typed-rql.mjs +580 -0
- package/core/platform/custom-objects/typed-rql.mjs.map +1 -0
- package/core/platform/custom-objects/types.d.mts +549 -0
- package/core/platform/custom-objects/types.d.mts.map +1 -0
- package/core/platform/custom-objects/types.d.ts +549 -0
- package/core/platform/custom-objects/types.d.ts.map +1 -0
- package/core/platform/custom-objects/types.js +20 -0
- package/core/platform/custom-objects/types.js.map +1 -0
- package/core/platform/custom-objects/types.mjs +17 -0
- package/core/platform/custom-objects/types.mjs.map +1 -0
- package/core/platform/custom-objects/validation.d.mts +97 -0
- package/core/platform/custom-objects/validation.d.mts.map +1 -0
- package/core/platform/custom-objects/validation.d.ts +97 -0
- package/core/platform/custom-objects/validation.d.ts.map +1 -0
- package/core/platform/custom-objects/validation.js +477 -0
- package/core/platform/custom-objects/validation.js.map +1 -0
- package/core/platform/custom-objects/validation.mjs +465 -0
- package/core/platform/custom-objects/validation.mjs.map +1 -0
- package/core/platform/custom-objects.d.mts +67 -0
- package/core/platform/custom-objects.d.mts.map +1 -0
- package/core/platform/custom-objects.d.ts +67 -0
- package/core/platform/custom-objects.d.ts.map +1 -0
- package/core/platform/custom-objects.js +118 -0
- package/core/platform/custom-objects.js.map +1 -0
- package/core/platform/custom-objects.mjs +45 -0
- package/core/platform/custom-objects.mjs.map +1 -0
- package/core/platform/manifest/custom-objects/action.d.mts +58 -0
- package/core/platform/manifest/custom-objects/action.d.mts.map +1 -0
- package/core/platform/manifest/custom-objects/action.d.ts +58 -0
- package/core/platform/manifest/custom-objects/action.d.ts.map +1 -0
- package/core/platform/manifest/custom-objects/action.js +44 -0
- package/core/platform/manifest/custom-objects/action.js.map +1 -0
- package/core/platform/manifest/custom-objects/action.mjs +40 -0
- package/core/platform/manifest/custom-objects/action.mjs.map +1 -0
- package/core/platform/manifest/custom-objects/conditions.d.mts +240 -0
- package/core/platform/manifest/custom-objects/conditions.d.mts.map +1 -0
- package/core/platform/manifest/custom-objects/conditions.d.ts +240 -0
- package/core/platform/manifest/custom-objects/conditions.d.ts.map +1 -0
- package/core/platform/manifest/custom-objects/conditions.js +326 -0
- package/core/platform/manifest/custom-objects/conditions.js.map +1 -0
- package/core/platform/manifest/custom-objects/conditions.mjs +321 -0
- package/core/platform/manifest/custom-objects/conditions.mjs.map +1 -0
- package/core/platform/manifest/custom-objects/existing.d.mts +87 -0
- package/core/platform/manifest/custom-objects/existing.d.mts.map +1 -0
- package/core/platform/manifest/custom-objects/existing.d.ts +87 -0
- package/core/platform/manifest/custom-objects/existing.d.ts.map +1 -0
- package/core/platform/manifest/custom-objects/existing.js +113 -0
- package/core/platform/manifest/custom-objects/existing.js.map +1 -0
- package/core/platform/manifest/custom-objects/existing.mjs +109 -0
- package/core/platform/manifest/custom-objects/existing.mjs.map +1 -0
- package/core/platform/manifest/custom-objects/field-resolution.d.mts +48 -0
- package/core/platform/manifest/custom-objects/field-resolution.d.mts.map +1 -0
- package/core/platform/manifest/custom-objects/field-resolution.d.ts +48 -0
- package/core/platform/manifest/custom-objects/field-resolution.d.ts.map +1 -0
- package/core/platform/manifest/custom-objects/field-resolution.js +61 -0
- package/core/platform/manifest/custom-objects/field-resolution.js.map +1 -0
- package/core/platform/manifest/custom-objects/field-resolution.mjs +58 -0
- package/core/platform/manifest/custom-objects/field-resolution.mjs.map +1 -0
- package/core/platform/manifest/custom-objects/function-file.d.mts +87 -0
- package/core/platform/manifest/custom-objects/function-file.d.mts.map +1 -0
- package/core/platform/manifest/custom-objects/function-file.d.ts +87 -0
- package/core/platform/manifest/custom-objects/function-file.d.ts.map +1 -0
- package/core/platform/manifest/custom-objects/function-file.js +76 -0
- package/core/platform/manifest/custom-objects/function-file.js.map +1 -0
- package/core/platform/manifest/custom-objects/function-file.mjs +69 -0
- package/core/platform/manifest/custom-objects/function-file.mjs.map +1 -0
- package/core/platform/manifest/custom-objects/list-view.d.mts +65 -0
- package/core/platform/manifest/custom-objects/list-view.d.mts.map +1 -0
- package/core/platform/manifest/custom-objects/list-view.d.ts +65 -0
- package/core/platform/manifest/custom-objects/list-view.d.ts.map +1 -0
- package/core/platform/manifest/custom-objects/list-view.js +33 -0
- package/core/platform/manifest/custom-objects/list-view.js.map +1 -0
- package/core/platform/manifest/custom-objects/list-view.mjs +30 -0
- package/core/platform/manifest/custom-objects/list-view.mjs.map +1 -0
- package/core/platform/manifest/custom-objects/object-list-page.d.mts +43 -0
- package/core/platform/manifest/custom-objects/object-list-page.d.mts.map +1 -0
- package/core/platform/manifest/custom-objects/object-list-page.d.ts +43 -0
- package/core/platform/manifest/custom-objects/object-list-page.d.ts.map +1 -0
- package/core/platform/manifest/custom-objects/object-list-page.js +54 -0
- package/core/platform/manifest/custom-objects/object-list-page.js.map +1 -0
- package/core/platform/manifest/custom-objects/object-list-page.mjs +50 -0
- package/core/platform/manifest/custom-objects/object-list-page.mjs.map +1 -0
- package/core/platform/manifest/custom-objects/page-layout.d.mts +142 -0
- package/core/platform/manifest/custom-objects/page-layout.d.mts.map +1 -0
- package/core/platform/manifest/custom-objects/page-layout.d.ts +142 -0
- package/core/platform/manifest/custom-objects/page-layout.d.ts.map +1 -0
- package/core/platform/manifest/custom-objects/page-layout.js +184 -0
- package/core/platform/manifest/custom-objects/page-layout.js.map +1 -0
- package/core/platform/manifest/custom-objects/page-layout.mjs +180 -0
- package/core/platform/manifest/custom-objects/page-layout.mjs.map +1 -0
- package/core/platform/manifest/custom-objects/register.d.mts +87 -0
- package/core/platform/manifest/custom-objects/register.d.mts.map +1 -0
- package/core/platform/manifest/custom-objects/register.d.ts +87 -0
- package/core/platform/manifest/custom-objects/register.d.ts.map +1 -0
- package/core/platform/manifest/custom-objects/register.js +395 -0
- package/core/platform/manifest/custom-objects/register.js.map +1 -0
- package/core/platform/manifest/custom-objects/register.mjs +391 -0
- package/core/platform/manifest/custom-objects/register.mjs.map +1 -0
- package/core/platform/manifest/custom-objects/rule.d.mts +113 -0
- package/core/platform/manifest/custom-objects/rule.d.mts.map +1 -0
- package/core/platform/manifest/custom-objects/rule.d.ts +113 -0
- package/core/platform/manifest/custom-objects/rule.d.ts.map +1 -0
- package/core/platform/manifest/custom-objects/rule.js +49 -0
- package/core/platform/manifest/custom-objects/rule.js.map +1 -0
- package/core/platform/manifest/custom-objects/rule.mjs +45 -0
- package/core/platform/manifest/custom-objects/rule.mjs.map +1 -0
- package/core/platform/manifest/custom-objects/sdui-page.d.mts +214 -0
- package/core/platform/manifest/custom-objects/sdui-page.d.mts.map +1 -0
- package/core/platform/manifest/custom-objects/sdui-page.d.ts +214 -0
- package/core/platform/manifest/custom-objects/sdui-page.d.ts.map +1 -0
- package/core/platform/manifest/custom-objects/sdui-page.js +194 -0
- package/core/platform/manifest/custom-objects/sdui-page.js.map +1 -0
- package/core/platform/manifest/custom-objects/sdui-page.mjs +182 -0
- package/core/platform/manifest/custom-objects/sdui-page.mjs.map +1 -0
- package/core/platform/manifest/custom-objects/typed-condition.d.mts +28 -0
- package/core/platform/manifest/custom-objects/typed-condition.d.mts.map +1 -0
- package/core/platform/manifest/custom-objects/typed-condition.d.ts +28 -0
- package/core/platform/manifest/custom-objects/typed-condition.d.ts.map +1 -0
- package/core/platform/manifest/custom-objects/typed-condition.js +434 -0
- package/core/platform/manifest/custom-objects/typed-condition.js.map +1 -0
- package/core/platform/manifest/custom-objects/typed-condition.mjs +431 -0
- package/core/platform/manifest/custom-objects/typed-condition.mjs.map +1 -0
- package/core/platform/manifest/custom-objects/types.d.mts +29 -0
- package/core/platform/manifest/custom-objects/types.d.mts.map +1 -0
- package/core/platform/manifest/custom-objects/types.d.ts +29 -0
- package/core/platform/manifest/custom-objects/types.d.ts.map +1 -0
- package/core/platform/manifest/custom-objects/types.js +3 -0
- package/core/platform/manifest/custom-objects/types.js.map +1 -0
- package/core/platform/manifest/custom-objects/types.mjs +2 -0
- package/core/platform/manifest/custom-objects/types.mjs.map +1 -0
- package/core/platform/manifest/custom-objects/validation.d.mts +44 -0
- package/core/platform/manifest/custom-objects/validation.d.mts.map +1 -0
- package/core/platform/manifest/custom-objects/validation.d.ts +44 -0
- package/core/platform/manifest/custom-objects/validation.d.ts.map +1 -0
- package/core/platform/manifest/custom-objects/validation.js +30 -0
- package/core/platform/manifest/custom-objects/validation.js.map +1 -0
- package/core/platform/manifest/custom-objects/validation.mjs +27 -0
- package/core/platform/manifest/custom-objects/validation.mjs.map +1 -0
- package/core/platform/manifest/custom-objects/workflow.d.mts +47 -0
- package/core/platform/manifest/custom-objects/workflow.d.mts.map +1 -0
- package/core/platform/manifest/custom-objects/workflow.d.ts +47 -0
- package/core/platform/manifest/custom-objects/workflow.d.ts.map +1 -0
- package/core/platform/manifest/custom-objects/workflow.js +38 -0
- package/core/platform/manifest/custom-objects/workflow.js.map +1 -0
- package/core/platform/manifest/custom-objects/workflow.mjs +34 -0
- package/core/platform/manifest/custom-objects/workflow.mjs.map +1 -0
- package/core/platform/manifest/custom-objects.d.mts +85 -0
- package/core/platform/manifest/custom-objects.d.mts.map +1 -0
- package/core/platform/manifest/custom-objects.d.ts +85 -0
- package/core/platform/manifest/custom-objects.d.ts.map +1 -0
- package/core/platform/manifest/custom-objects.js +84 -0
- package/core/platform/manifest/custom-objects.js.map +1 -0
- package/core/platform/manifest/custom-objects.mjs +55 -0
- package/core/platform/manifest/custom-objects.mjs.map +1 -0
- package/examples/manifest/custom-object-creation-workflow/custom-object-creation-workflow.ts +26 -44
- package/examples/manifest/custom-object-creation-workflow/functions/intake-request-created.ts +20 -0
- package/examples/manifest/custom-object-creation-workflow/schema.ts +29 -0
- package/examples/manifest/dental-practice-management/dental-practice-management.ts +142 -470
- package/examples/manifest/dental-practice-management/functions/chair-schedule.ts +13 -23
- package/examples/manifest/dental-practice-management/functions/complete-visit.ts +32 -55
- package/examples/manifest/dental-practice-management/functions/operatory-list.ts +13 -23
- package/examples/manifest/dental-practice-management/functions/patient-list.ts +13 -23
- package/examples/manifest/dental-practice-management/functions/treatment-plan-list.ts +13 -23
- package/examples/manifest/dental-practice-management/schema.ts +298 -0
- package/examples/manifest/existing-manifest-mutations/existing-manifest-mutations.ts +68 -23
- package/examples/manifest/field-service-dispatch/field-service-dispatch.ts +102 -375
- package/examples/manifest/field-service-dispatch/schema.ts +248 -0
- package/examples/manifest/grant-program-management/grant-program-management.ts +125 -419
- package/examples/manifest/grant-program-management/schema.ts +269 -0
- package/examples/manifest/gym-membership-management/functions/check-in-desk.ts +13 -23
- package/examples/manifest/gym-membership-management/functions/member-list.ts +13 -23
- package/examples/manifest/gym-membership-management/functions/today-schedule.ts +13 -23
- package/examples/manifest/gym-membership-management/functions/trainer-list.ts +13 -23
- package/examples/manifest/gym-membership-management/gym-membership-management.ts +92 -442
- package/examples/manifest/gym-membership-management/schema.ts +266 -0
- package/examples/manifest/procurement-approval-hub/functions/route-purchase-request.ts +20 -0
- package/examples/manifest/procurement-approval-hub/procurement-approval-hub.ts +122 -408
- package/examples/manifest/procurement-approval-hub/schema.ts +256 -0
- package/examples/manifest/simple-todo-app/functions/mark-done.ts +16 -12
- package/examples/manifest/simple-todo-app/functions/todo-list.ts +13 -23
- package/examples/manifest/simple-todo-app/schema.ts +60 -0
- package/examples/manifest/simple-todo-app/simple-todo-app.ts +40 -109
- package/examples/manifest/todo-app-without-object-list-view/functions/todo-page.ts +166 -193
- package/examples/manifest/todo-app-without-object-list-view/schema.ts +28 -0
- package/examples/manifest/todo-app-without-object-list-view/todo-app-without-object-list-view.ts +24 -47
- package/package.json +7 -13
- package/resources/custom-objects/custom-objects.d.mts +7 -0
- package/resources/custom-objects/custom-objects.d.mts.map +1 -1
- package/resources/custom-objects/custom-objects.d.ts +7 -0
- package/resources/custom-objects/custom-objects.d.ts.map +1 -1
- package/resources/custom-objects/custom-objects.js.map +1 -1
- package/resources/custom-objects/custom-objects.mjs.map +1 -1
- package/resources/custom-objects/fields.d.mts +170 -15
- package/resources/custom-objects/fields.d.mts.map +1 -1
- package/resources/custom-objects/fields.d.ts +170 -15
- package/resources/custom-objects/fields.d.ts.map +1 -1
- package/resources/index.d.mts +2 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/leave-program-evaluations.d.mts +510 -3
- package/resources/leave-program-evaluations.d.mts.map +1 -1
- package/resources/leave-program-evaluations.d.ts +510 -3
- package/resources/leave-program-evaluations.d.ts.map +1 -1
- package/resources/levels.d.mts +64 -2
- package/resources/levels.d.mts.map +1 -1
- package/resources/levels.d.ts +64 -2
- package/resources/levels.d.ts.map +1 -1
- package/resources/levels.js +22 -0
- package/resources/levels.js.map +1 -1
- package/resources/levels.mjs +22 -0
- package/resources/levels.mjs.map +1 -1
- package/resources/tracks.d.mts +45 -1
- package/resources/tracks.d.mts.map +1 -1
- package/resources/tracks.d.ts +45 -1
- package/resources/tracks.d.ts.map +1 -1
- package/resources/tracks.js +22 -0
- package/resources/tracks.js.map +1 -1
- package/resources/tracks.mjs +22 -0
- package/resources/tracks.mjs.map +1 -1
- package/src/client.ts +8 -0
- package/src/core/platform/README.md +20 -0
- package/src/core/platform/custom-objects/category.ts +294 -0
- package/src/core/platform/custom-objects/definition.ts +373 -0
- package/src/core/platform/custom-objects/fields.ts +653 -0
- package/src/core/platform/custom-objects/function-runtime.ts +76 -0
- package/src/core/platform/custom-objects/lifecycle.ts +557 -0
- package/src/core/platform/custom-objects/manager.ts +959 -0
- package/src/core/platform/custom-objects/provisioning.ts +672 -0
- package/src/core/platform/custom-objects/rql.ts +375 -0
- package/src/core/platform/custom-objects/schema-manager.ts +351 -0
- package/src/core/platform/custom-objects/typed-rql.ts +1273 -0
- package/src/core/platform/custom-objects/types.ts +753 -0
- package/src/core/platform/custom-objects/validation.ts +573 -0
- package/src/core/platform/custom-objects.ts +269 -0
- package/src/core/platform/manifest/README.md +26 -0
- package/src/core/platform/manifest/custom-objects/action.ts +87 -0
- package/src/core/platform/manifest/custom-objects/conditions.ts +762 -0
- package/src/core/platform/manifest/custom-objects/existing.ts +221 -0
- package/src/core/platform/manifest/custom-objects/field-resolution.ts +116 -0
- package/src/core/platform/manifest/custom-objects/function-file.ts +149 -0
- package/src/core/platform/manifest/custom-objects/list-view.ts +95 -0
- package/src/core/platform/manifest/custom-objects/object-list-page.ts +87 -0
- package/src/core/platform/manifest/custom-objects/page-layout.ts +380 -0
- package/src/core/platform/manifest/custom-objects/register.ts +555 -0
- package/src/core/platform/manifest/custom-objects/rule.ts +192 -0
- package/src/core/platform/manifest/custom-objects/sdui-page.ts +515 -0
- package/src/core/platform/manifest/custom-objects/typed-condition.ts +617 -0
- package/src/core/platform/manifest/custom-objects/types.ts +92 -0
- package/src/core/platform/manifest/custom-objects/validation.ts +70 -0
- package/src/core/platform/manifest/custom-objects/workflow.ts +71 -0
- package/src/core/platform/manifest/custom-objects.ts +203 -0
- package/src/pebble-sdui-web-custom-apps-shim.d.ts +3 -0
- package/src/resources/custom-objects/custom-objects.ts +8 -0
- package/src/resources/custom-objects/fields.ts +239 -14
- package/src/resources/index.ts +4 -0
- package/src/resources/leave-program-evaluations.ts +610 -3
- package/src/resources/levels.ts +93 -1
- package/src/resources/tracks.ts +70 -0
- package/src/tsconfig.json +1 -1
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -2,46 +2,43 @@
|
|
|
2
2
|
* Dental Practice Management — patient charts, operatories (chairs), appointments
|
|
3
3
|
* with status, treatment plans, rollups, and an SDUI ObjectListView tab for appointments.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* dental_appointment__c ← child of operatory; patient lookup, time, status, visit type
|
|
9
|
-
* dental_treatment_plan__c ← child of patient; plan status, procedures, estimates
|
|
5
|
+
* This example demonstrates the typed custom-object schema layer under
|
|
6
|
+
* `@rippling/rippling-sdk/core/platform/custom-objects` and then compiles those
|
|
7
|
+
* structural definitions back into the existing manifest class model.
|
|
10
8
|
*
|
|
11
9
|
* Run:
|
|
12
10
|
* yarn tsn examples/manifest/dental-practice-management/dental-practice-management.ts \
|
|
13
11
|
* > examples/manifest/dental-practice-management/manifest.json
|
|
14
12
|
*/
|
|
15
13
|
|
|
16
|
-
import * as fs from 'node:fs';
|
|
17
14
|
import * as path from 'node:path';
|
|
15
|
+
import { toCustomCategoryApiName } from '@rippling/rippling-sdk/core/platform/custom-objects';
|
|
16
|
+
import {
|
|
17
|
+
defineSduiPageFromFunctionFile,
|
|
18
|
+
defineTypedCustomObjectActionFromFunctionFile,
|
|
19
|
+
defineTypedListView,
|
|
20
|
+
defineTypedPageLayout,
|
|
21
|
+
defineTypedRule,
|
|
22
|
+
defineTypedValidation,
|
|
23
|
+
registerManifestCustomObject,
|
|
24
|
+
} from '@rippling/rippling-sdk/core/platform/manifest/custom-objects';
|
|
18
25
|
import {
|
|
19
26
|
App,
|
|
20
|
-
BooleanField,
|
|
21
27
|
Category,
|
|
22
|
-
CustomObject,
|
|
23
|
-
CustomObjectAction,
|
|
24
|
-
CustomObjectFieldSection,
|
|
25
|
-
CustomObjectPageLayout,
|
|
26
|
-
DatetimeField,
|
|
27
|
-
DateField,
|
|
28
|
-
EmailField,
|
|
29
|
-
FormulaField,
|
|
30
|
-
ListViewDef,
|
|
31
|
-
LongTextField,
|
|
32
|
-
LookupField,
|
|
28
|
+
type CustomObject,
|
|
33
29
|
ManifestBuilder,
|
|
34
|
-
ManifestFunction,
|
|
35
|
-
NumberField,
|
|
36
|
-
ParentChildField,
|
|
37
|
-
PhoneField,
|
|
38
|
-
Rule,
|
|
39
|
-
RadioField,
|
|
40
30
|
SduiPage,
|
|
41
31
|
SummaryField,
|
|
42
|
-
TextField,
|
|
43
|
-
Validation,
|
|
44
32
|
} from '@rippling/rippling-sdk/lib/manifest';
|
|
33
|
+
import {
|
|
34
|
+
appointmentDefinition,
|
|
35
|
+
DENTAL_CATEGORY_NAME,
|
|
36
|
+
operatoryDefinition,
|
|
37
|
+
patientDefinition,
|
|
38
|
+
providerDefinition,
|
|
39
|
+
treatmentPlanDefinition,
|
|
40
|
+
} from './schema';
|
|
41
|
+
|
|
45
42
|
const manifest = new ManifestBuilder({
|
|
46
43
|
key: 'dental_practice_management',
|
|
47
44
|
name: 'Dental Practice Management',
|
|
@@ -50,477 +47,165 @@ const manifest = new ManifestBuilder({
|
|
|
50
47
|
});
|
|
51
48
|
|
|
52
49
|
const dentalCategory = new Category(manifest, {
|
|
53
|
-
apiName:
|
|
50
|
+
apiName: toCustomCategoryApiName(DENTAL_CATEGORY_NAME),
|
|
54
51
|
name: 'Dental',
|
|
55
52
|
description: 'Patients, chairs, visits, and treatment plans',
|
|
56
53
|
});
|
|
57
54
|
|
|
58
|
-
|
|
59
|
-
const patientObj = new CustomObject(manifest, {
|
|
60
|
-
apiName: 'dental_patient__c',
|
|
61
|
-
name: 'Patient',
|
|
62
|
-
pluralLabel: 'Patients',
|
|
63
|
-
category: dentalCategory,
|
|
64
|
-
description: 'Clinical chart, demographics, and care preferences',
|
|
65
|
-
icon: { emoji: '🦷' },
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
const patientIdentitySection = new CustomObjectFieldSection(patientObj, {
|
|
69
|
-
name: 'Demographics',
|
|
70
|
-
sectionId: 'sec_pt_identity',
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
const patientClinicalSection = new CustomObjectFieldSection(patientObj, {
|
|
74
|
-
name: 'Clinical',
|
|
75
|
-
sectionId: 'sec_pt_clinical',
|
|
76
|
-
});
|
|
77
|
-
|
|
78
|
-
const patientNameField = new TextField(patientObj, {
|
|
79
|
-
apiName: 'legal_name__c',
|
|
80
|
-
displayName: 'Full legal name',
|
|
81
|
-
description: 'Full legal name field',
|
|
82
|
-
required: true,
|
|
83
|
-
maxLength: 160,
|
|
84
|
-
section: patientIdentitySection,
|
|
85
|
-
});
|
|
86
|
-
|
|
87
|
-
const patientDobField = new DateField(patientObj, {
|
|
88
|
-
apiName: 'date_of_birth__c',
|
|
89
|
-
displayName: 'Date of birth',
|
|
90
|
-
description: 'Date of birth field',
|
|
91
|
-
section: patientIdentitySection,
|
|
92
|
-
});
|
|
93
|
-
|
|
94
|
-
const patientPhoneField = new PhoneField(patientObj, {
|
|
95
|
-
apiName: 'phone__c',
|
|
96
|
-
displayName: 'Phone',
|
|
97
|
-
description: 'Phone field',
|
|
98
|
-
section: patientIdentitySection,
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
const patientEmailField = new EmailField(patientObj, {
|
|
102
|
-
apiName: 'email__c',
|
|
103
|
-
displayName: 'Email',
|
|
104
|
-
description: 'Email field',
|
|
105
|
-
unique: true,
|
|
106
|
-
section: patientIdentitySection,
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
const patientActiveField = new BooleanField(patientObj, {
|
|
110
|
-
apiName: 'active_patient__c',
|
|
111
|
-
displayName: 'Active patient',
|
|
112
|
-
description: 'Whether the patient is currently active in the practice',
|
|
113
|
-
required: true,
|
|
114
|
-
section: patientIdentitySection,
|
|
115
|
-
});
|
|
116
|
-
|
|
117
|
-
const patientAllergiesField = new LongTextField(patientObj, {
|
|
118
|
-
apiName: 'allergies_and_alerts__c',
|
|
119
|
-
displayName: 'Allergies & medical alerts',
|
|
120
|
-
maxLength: 2000,
|
|
121
|
-
description: 'Drug allergies, bisphosphonates, anticoagulants, latex, etc.',
|
|
122
|
-
section: patientClinicalSection,
|
|
123
|
-
});
|
|
124
|
-
|
|
125
|
-
const patientInsuranceField = new TextField(patientObj, {
|
|
126
|
-
apiName: 'insurance_plan__c',
|
|
127
|
-
displayName: 'Insurance / payer',
|
|
128
|
-
description: 'Insurance / payer field',
|
|
129
|
-
maxLength: 120,
|
|
130
|
-
section: patientClinicalSection,
|
|
131
|
-
});
|
|
132
|
-
|
|
133
|
-
const patientChartNotesField = new LongTextField(patientObj, {
|
|
134
|
-
apiName: 'chart_summary__c',
|
|
135
|
-
displayName: 'Chart summary & preferences',
|
|
136
|
-
maxLength: 4000,
|
|
137
|
-
description: 'Narrative, anxiety notes, perio class, last prophy, family history',
|
|
138
|
-
section: patientClinicalSection,
|
|
139
|
-
});
|
|
55
|
+
const registeredObjects = new Map<string, { object: CustomObject }>();
|
|
140
56
|
|
|
141
|
-
|
|
142
|
-
apiName
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
section: patientIdentitySection,
|
|
149
|
-
});
|
|
57
|
+
function resolveCustomObjectTarget(apiName: string): CustomObject {
|
|
58
|
+
const target = registeredObjects.get(apiName);
|
|
59
|
+
if (target == null) {
|
|
60
|
+
throw new Error(`Custom object target "${apiName}" must be registered before dependents.`);
|
|
61
|
+
}
|
|
62
|
+
return target.object;
|
|
63
|
+
}
|
|
150
64
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
apiName: 'dental_provider__c',
|
|
154
|
-
name: 'Provider',
|
|
155
|
-
pluralLabel: 'Providers',
|
|
65
|
+
const patient = registerManifestCustomObject(manifest, {
|
|
66
|
+
definition: patientDefinition,
|
|
156
67
|
category: dentalCategory,
|
|
157
|
-
|
|
158
|
-
icon: { emoji: '🧑⚕️' },
|
|
159
|
-
});
|
|
160
|
-
|
|
161
|
-
const providerSection = new CustomObjectFieldSection(providerObj, {
|
|
162
|
-
name: 'Provider',
|
|
163
|
-
sectionId: 'sec_provider_info',
|
|
164
|
-
});
|
|
165
|
-
|
|
166
|
-
const providerNameField = providerObj.standardFields.name;
|
|
167
|
-
|
|
168
|
-
const providerStatusField = new RadioField(providerObj, {
|
|
169
|
-
apiName: 'provider_status__c',
|
|
170
|
-
displayName: 'Status',
|
|
171
|
-
description: 'Whether this provider is active in the practice',
|
|
172
|
-
options: ['Active', 'On leave', 'Inactive'],
|
|
173
|
-
required: true,
|
|
174
|
-
section: providerSection,
|
|
175
|
-
});
|
|
176
|
-
|
|
177
|
-
const providerBookingStatusField = new RadioField(providerObj, {
|
|
178
|
-
apiName: 'booking_status__c',
|
|
179
|
-
displayName: 'Booking status',
|
|
180
|
-
description: 'Whether scheduling should offer this provider for new appointments',
|
|
181
|
-
options: ['Open', 'Limited', 'Closed'],
|
|
182
|
-
required: true,
|
|
183
|
-
section: providerSection,
|
|
184
|
-
});
|
|
185
|
-
|
|
186
|
-
const providerNextAvailableDaysField = new NumberField(providerObj, {
|
|
187
|
-
apiName: 'next_available_days__c',
|
|
188
|
-
displayName: 'Next available (days)',
|
|
189
|
-
description: 'Estimated days until this provider has an open appointment slot',
|
|
190
|
-
decimalPlaces: 0,
|
|
191
|
-
required: true,
|
|
192
|
-
section: providerSection,
|
|
68
|
+
resolveCustomObjectTarget,
|
|
193
69
|
});
|
|
70
|
+
registeredObjects.set(patient.definition.apiName, patient);
|
|
194
71
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
apiName: 'dental_operatory__c',
|
|
198
|
-
name: 'Operatory',
|
|
199
|
-
pluralLabel: 'Operatories',
|
|
72
|
+
const provider = registerManifestCustomObject(manifest, {
|
|
73
|
+
definition: providerDefinition,
|
|
200
74
|
category: dentalCategory,
|
|
201
|
-
|
|
202
|
-
icon: { emoji: '🪥' },
|
|
203
|
-
});
|
|
204
|
-
|
|
205
|
-
const operatorySection = new CustomObjectFieldSection(operatoryObj, {
|
|
206
|
-
name: 'Operatory',
|
|
207
|
-
sectionId: 'sec_op_info',
|
|
208
|
-
});
|
|
209
|
-
|
|
210
|
-
const opNameField = operatoryObj.standardFields.name;
|
|
211
|
-
|
|
212
|
-
const opCodeField = new TextField(operatoryObj, {
|
|
213
|
-
apiName: 'room_code__c',
|
|
214
|
-
displayName: 'Room code',
|
|
215
|
-
maxLength: 20,
|
|
216
|
-
description: 'Short code for whiteboards and schedules',
|
|
217
|
-
section: operatorySection,
|
|
75
|
+
resolveCustomObjectTarget,
|
|
218
76
|
});
|
|
77
|
+
registeredObjects.set(provider.definition.apiName, provider);
|
|
219
78
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
apiName: 'dental_appointment__c',
|
|
223
|
-
name: 'Appointment',
|
|
224
|
-
pluralLabel: 'Appointments',
|
|
79
|
+
const operatory = registerManifestCustomObject(manifest, {
|
|
80
|
+
definition: operatoryDefinition,
|
|
225
81
|
category: dentalCategory,
|
|
226
|
-
|
|
227
|
-
icon: { emoji: '📅' },
|
|
228
|
-
});
|
|
229
|
-
|
|
230
|
-
const apptOperatorySection = new CustomObjectFieldSection(apptObj, {
|
|
231
|
-
name: 'Operatory & time',
|
|
232
|
-
sectionId: 'sec_appt_op',
|
|
233
|
-
});
|
|
234
|
-
|
|
235
|
-
const apptPatientSection = new CustomObjectFieldSection(apptObj, {
|
|
236
|
-
name: 'Patient & visit',
|
|
237
|
-
sectionId: 'sec_appt_patient',
|
|
82
|
+
resolveCustomObjectTarget,
|
|
238
83
|
});
|
|
84
|
+
registeredObjects.set(operatory.definition.apiName, operatory);
|
|
239
85
|
|
|
240
|
-
const
|
|
241
|
-
|
|
242
|
-
displayName: 'Operatory (chair)',
|
|
243
|
-
target: operatoryObj,
|
|
244
|
-
relatedDataLabel: 'Appointments',
|
|
245
|
-
parentChildType: 'PRIMARY',
|
|
246
|
-
enableParentOwnerInheritance: false,
|
|
247
|
-
description: 'Which chair or bay this visit is booked on',
|
|
248
|
-
section: apptOperatorySection,
|
|
249
|
-
});
|
|
250
|
-
|
|
251
|
-
const apptStartField = new DatetimeField(apptObj, {
|
|
252
|
-
apiName: 'start_time__c',
|
|
253
|
-
displayName: 'Start (local)',
|
|
254
|
-
required: true,
|
|
255
|
-
description: 'Planned or actual start; board sorts by this',
|
|
256
|
-
section: apptOperatorySection,
|
|
257
|
-
});
|
|
258
|
-
|
|
259
|
-
const apptDurationMins = new NumberField(apptObj, {
|
|
260
|
-
apiName: 'duration_minutes__c',
|
|
261
|
-
displayName: 'Duration (minutes)',
|
|
262
|
-
required: true,
|
|
263
|
-
decimalPlaces: 0,
|
|
264
|
-
description: 'Expected chair time for the procedure block',
|
|
265
|
-
section: apptOperatorySection,
|
|
266
|
-
});
|
|
267
|
-
|
|
268
|
-
const apptPatientRef = new LookupField(apptObj, {
|
|
269
|
-
apiName: 'patient_ref__c',
|
|
270
|
-
displayName: 'Patient',
|
|
271
|
-
target: patientObj,
|
|
272
|
-
relatedDataLabel: 'Appointments',
|
|
273
|
-
required: true,
|
|
274
|
-
lookup_filter_rql_condition: '(active_patient__c == True)',
|
|
275
|
-
description: 'Chart to open for this visit (active patients only)',
|
|
276
|
-
section: apptPatientSection,
|
|
277
|
-
});
|
|
278
|
-
|
|
279
|
-
const apptProviderRef = new LookupField(apptObj, {
|
|
280
|
-
apiName: 'provider_ref__c',
|
|
281
|
-
displayName: 'Provider',
|
|
282
|
-
target: providerObj,
|
|
283
|
-
relatedDataLabel: 'Appointments',
|
|
284
|
-
required: true,
|
|
285
|
-
lookup_filter_rql_condition:
|
|
286
|
-
"((provider_status__c IN ['Active']) AND (next_available_days__c <= 14) AND (booking_status__c NOT_IN ['Closed']))",
|
|
287
|
-
description: 'Provider assigned to this visit (active and bookable within two weeks)',
|
|
288
|
-
section: apptPatientSection,
|
|
289
|
-
});
|
|
290
|
-
|
|
291
|
-
const apptVisitTypeField = new RadioField(apptObj, {
|
|
292
|
-
apiName: 'visit_type__c',
|
|
293
|
-
displayName: 'Visit type',
|
|
294
|
-
description: 'Visit type field',
|
|
295
|
-
options: [
|
|
296
|
-
'New patient exam',
|
|
297
|
-
'Periodic / recall exam',
|
|
298
|
-
'Prophy / cleaning',
|
|
299
|
-
'Restorative',
|
|
300
|
-
'Endodontic',
|
|
301
|
-
'Perio / SRP',
|
|
302
|
-
'Oral surgery / extraction',
|
|
303
|
-
'Orthodontic',
|
|
304
|
-
'Emergency / pain',
|
|
305
|
-
'Other',
|
|
306
|
-
],
|
|
307
|
-
required: true,
|
|
308
|
-
section: apptPatientSection,
|
|
309
|
-
});
|
|
310
|
-
|
|
311
|
-
const apptStatusField = new RadioField(apptObj, {
|
|
312
|
-
apiName: 'appointment_status__c',
|
|
313
|
-
displayName: 'Visit status',
|
|
314
|
-
options: ['Scheduled', 'Checked in', 'In treatment', 'Completed', 'Cancelled', 'No-show'],
|
|
315
|
-
required: true,
|
|
316
|
-
description: 'Front-desk and clinical workflow status',
|
|
317
|
-
section: apptPatientSection,
|
|
318
|
-
});
|
|
319
|
-
|
|
320
|
-
const apptClinicalNotes = new LongTextField(apptObj, {
|
|
321
|
-
apiName: 'visit_notes__c',
|
|
322
|
-
displayName: 'Visit notes',
|
|
323
|
-
maxLength: 4000,
|
|
324
|
-
description: 'Chairside notes for this block (sync with EDR as needed)',
|
|
325
|
-
section: apptPatientSection,
|
|
326
|
-
});
|
|
327
|
-
|
|
328
|
-
const apptBoardLabel = new FormulaField(apptObj, {
|
|
329
|
-
apiName: 'board_label__c',
|
|
330
|
-
displayName: 'Board label',
|
|
331
|
-
description: 'Board label field',
|
|
332
|
-
fieldType: 'TEXT',
|
|
333
|
-
maxLength: 260,
|
|
334
|
-
formula: "CONCATENATE(visit_type__c, ' · ', appointment_status__c)",
|
|
335
|
-
section: apptPatientSection,
|
|
336
|
-
});
|
|
337
|
-
|
|
338
|
-
// ── Treatment plan (child of patient) ─────────────────────────────────────────
|
|
339
|
-
const planObj = new CustomObject(manifest, {
|
|
340
|
-
apiName: 'dental_treatment_plan__c',
|
|
341
|
-
name: 'Treatment plan',
|
|
342
|
-
pluralLabel: 'Treatment plans',
|
|
86
|
+
const appointment = registerManifestCustomObject(manifest, {
|
|
87
|
+
definition: appointmentDefinition,
|
|
343
88
|
category: dentalCategory,
|
|
344
|
-
|
|
345
|
-
icon: { emoji: '📋' },
|
|
346
|
-
});
|
|
347
|
-
|
|
348
|
-
const planLinkSection = new CustomObjectFieldSection(planObj, {
|
|
349
|
-
name: 'Link',
|
|
350
|
-
sectionId: 'sec_plan_link',
|
|
89
|
+
resolveCustomObjectTarget,
|
|
351
90
|
});
|
|
91
|
+
registeredObjects.set(appointment.definition.apiName, appointment);
|
|
352
92
|
|
|
353
|
-
const
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
const planNameField = planObj.standardFields.name;
|
|
359
|
-
|
|
360
|
-
const planPatientRef = new ParentChildField(planObj, {
|
|
361
|
-
apiName: 'plan_patient_ref__c',
|
|
362
|
-
displayName: 'Patient',
|
|
363
|
-
target: patientObj,
|
|
364
|
-
relatedDataLabel: 'Treatment plans',
|
|
365
|
-
parentChildType: 'PRIMARY',
|
|
366
|
-
enableParentOwnerInheritance: false,
|
|
367
|
-
description: 'Which chart owns this plan',
|
|
368
|
-
section: planLinkSection,
|
|
369
|
-
});
|
|
370
|
-
|
|
371
|
-
const planStatusField = new RadioField(planObj, {
|
|
372
|
-
apiName: 'plan_status__c',
|
|
373
|
-
displayName: 'Status',
|
|
374
|
-
description: 'Status field',
|
|
375
|
-
options: ['Draft', 'Presented', 'Accepted', 'In progress', 'Completed', 'Declined / on hold'],
|
|
376
|
-
required: true,
|
|
377
|
-
section: planBodySection,
|
|
378
|
-
});
|
|
379
|
-
|
|
380
|
-
const planTargetField = new DateField(planObj, {
|
|
381
|
-
apiName: 'target_completion__c',
|
|
382
|
-
displayName: 'Target completion',
|
|
383
|
-
description: 'Goal to finish or next review',
|
|
384
|
-
section: planBodySection,
|
|
385
|
-
});
|
|
386
|
-
|
|
387
|
-
const planProceduresField = new LongTextField(planObj, {
|
|
388
|
-
apiName: 'procedures_summary__c',
|
|
389
|
-
displayName: 'Procedures & sequence',
|
|
390
|
-
maxLength: 8000,
|
|
391
|
-
description: 'Tooth numbers, codes, and staging',
|
|
392
|
-
section: planBodySection,
|
|
393
|
-
});
|
|
394
|
-
|
|
395
|
-
const planFeeCents = new NumberField(planObj, {
|
|
396
|
-
apiName: 'fee_estimate_cents__c',
|
|
397
|
-
displayName: 'Fee estimate (cents)',
|
|
398
|
-
decimalPlaces: 0,
|
|
399
|
-
description: 'Rough office fee total for planning; adjust per office policy',
|
|
400
|
-
section: planBodySection,
|
|
93
|
+
const treatmentPlan = registerManifestCustomObject(manifest, {
|
|
94
|
+
definition: treatmentPlanDefinition,
|
|
95
|
+
category: dentalCategory,
|
|
96
|
+
resolveCustomObjectTarget,
|
|
401
97
|
});
|
|
98
|
+
registeredObjects.set(treatmentPlan.definition.apiName, treatmentPlan);
|
|
402
99
|
|
|
403
100
|
// ── Rollups ────────────────────────────────────────────────────────────────
|
|
404
|
-
const apptCountOnOperatory = new SummaryField(
|
|
101
|
+
const apptCountOnOperatory = new SummaryField(operatory.object, {
|
|
405
102
|
apiName: 'appointment_count__c',
|
|
406
103
|
displayName: 'Appointments (count)',
|
|
407
|
-
aggregates:
|
|
104
|
+
aggregates: appointment.object.standardFields.name,
|
|
408
105
|
using: 'COUNT',
|
|
409
|
-
lookup:
|
|
106
|
+
lookup: appointment.fields.operatory_ref,
|
|
410
107
|
description: 'Rows in this operatory (filter by day in the chair board function)',
|
|
411
|
-
section:
|
|
108
|
+
section: operatory.sections.operatory,
|
|
412
109
|
});
|
|
413
110
|
|
|
414
|
-
const planCountOnPatient = new SummaryField(
|
|
111
|
+
const planCountOnPatient = new SummaryField(patient.object, {
|
|
415
112
|
apiName: 'treatment_plan_count__c',
|
|
416
113
|
displayName: 'Treatment plans',
|
|
417
|
-
aggregates:
|
|
114
|
+
aggregates: treatmentPlan.object.standardFields.name,
|
|
418
115
|
using: 'COUNT',
|
|
419
|
-
lookup:
|
|
116
|
+
lookup: treatmentPlan.fields.plan_patient_ref,
|
|
420
117
|
description: 'Active plans tied to the chart',
|
|
421
|
-
section:
|
|
118
|
+
section: patient.sections.clinical,
|
|
422
119
|
});
|
|
423
120
|
|
|
424
|
-
// ── Validations & defaults
|
|
425
|
-
|
|
121
|
+
// ── Validations & defaults ────────────────────────────────────────────────
|
|
122
|
+
defineTypedValidation(appointment, {
|
|
426
123
|
ruleId: 'dental_appt_duration_positive',
|
|
427
124
|
displayName: 'Duration must be positive',
|
|
428
|
-
|
|
125
|
+
whenInvalid: (c) => c.lte(c.fields.duration_minutes, 0),
|
|
429
126
|
errorMessage: 'Duration must be at least 1 minute.',
|
|
430
127
|
ruleDescription: 'Blocks empty or zero chair blocks',
|
|
431
128
|
state: 'ACTIVE',
|
|
432
129
|
level: 'FIELD',
|
|
433
|
-
|
|
130
|
+
field: 'duration_minutes',
|
|
434
131
|
});
|
|
435
132
|
|
|
436
|
-
|
|
133
|
+
defineTypedRule(appointment, {
|
|
437
134
|
flowId: 'dental_default_appt_status',
|
|
438
135
|
flowName: 'Default visit status to Scheduled',
|
|
439
136
|
triggerType: 'CREATE',
|
|
440
137
|
description: 'New bookings start as Scheduled unless the team changes it',
|
|
441
|
-
actions:
|
|
138
|
+
actions: (rules) => [rules.setField('appointment_status').toValue('Scheduled')],
|
|
442
139
|
});
|
|
443
140
|
|
|
444
141
|
// ── List views ─────────────────────────────────────────────────────────────
|
|
445
|
-
|
|
142
|
+
defineTypedListView(patient, {
|
|
446
143
|
viewId: 'view_dental_all_patients',
|
|
447
144
|
name: 'All patients',
|
|
448
145
|
description: 'Full chart list with plan counts',
|
|
449
|
-
fields: [
|
|
450
|
-
'name',
|
|
451
|
-
patientDobField,
|
|
452
|
-
patientPhoneField,
|
|
453
|
-
patientActiveField,
|
|
454
|
-
patientLabelField,
|
|
455
|
-
planCountOnPatient,
|
|
456
|
-
],
|
|
146
|
+
fields: ['name', 'date_of_birth', 'phone', 'active_patient', 'patient_label', planCountOnPatient],
|
|
457
147
|
orderBy: 'name',
|
|
458
148
|
sortOrder: 'ASC',
|
|
459
149
|
isPublic: true,
|
|
460
150
|
objectScope: 'all',
|
|
461
151
|
});
|
|
462
152
|
|
|
463
|
-
|
|
153
|
+
defineTypedListView(provider, {
|
|
464
154
|
viewId: 'view_dental_providers',
|
|
465
155
|
name: 'All providers',
|
|
466
156
|
description: 'Provider directory with appointment booking fields',
|
|
467
|
-
fields: [
|
|
468
|
-
providerNameField,
|
|
469
|
-
providerStatusField,
|
|
470
|
-
providerBookingStatusField,
|
|
471
|
-
providerNextAvailableDaysField,
|
|
472
|
-
],
|
|
157
|
+
fields: ['name', 'provider_status', 'booking_status', 'next_available_days'],
|
|
473
158
|
orderBy: 'name',
|
|
474
159
|
sortOrder: 'ASC',
|
|
475
160
|
isPublic: true,
|
|
476
161
|
objectScope: 'all',
|
|
477
162
|
});
|
|
478
163
|
|
|
479
|
-
|
|
164
|
+
defineTypedListView(operatory, {
|
|
480
165
|
viewId: 'view_dental_all_operatories',
|
|
481
166
|
name: 'All operatories',
|
|
482
167
|
description: 'Chairs and daily volume rollups',
|
|
483
|
-
fields: [
|
|
168
|
+
fields: ['name', 'room_code', apptCountOnOperatory],
|
|
484
169
|
orderBy: 'name',
|
|
485
170
|
sortOrder: 'ASC',
|
|
486
171
|
isPublic: true,
|
|
487
172
|
objectScope: 'all',
|
|
488
173
|
});
|
|
489
174
|
|
|
490
|
-
|
|
175
|
+
defineTypedListView(appointment, {
|
|
491
176
|
viewId: 'view_dental_appointments_all',
|
|
492
177
|
name: 'All appointments',
|
|
493
178
|
description: 'Chronological board with chair and status',
|
|
494
179
|
fields: [
|
|
495
180
|
'name',
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
181
|
+
'operatory_ref',
|
|
182
|
+
'start_time',
|
|
183
|
+
'duration_minutes',
|
|
184
|
+
'patient_ref',
|
|
185
|
+
'provider_ref',
|
|
186
|
+
'visit_type',
|
|
187
|
+
'appointment_status',
|
|
188
|
+
'board_label',
|
|
504
189
|
],
|
|
505
|
-
orderBy:
|
|
190
|
+
orderBy: 'start_time',
|
|
506
191
|
sortOrder: 'ASC',
|
|
507
192
|
isPublic: true,
|
|
508
193
|
objectScope: 'all',
|
|
509
194
|
});
|
|
510
195
|
|
|
511
|
-
|
|
196
|
+
defineTypedListView(treatmentPlan, {
|
|
512
197
|
viewId: 'view_dental_treatment_plans',
|
|
513
198
|
name: 'All treatment plans',
|
|
514
199
|
description: 'Case tracking by status',
|
|
515
|
-
fields: [
|
|
516
|
-
orderBy:
|
|
200
|
+
fields: ['name', 'plan_patient_ref', 'plan_status', 'target_completion', 'fee_estimate_cents'],
|
|
201
|
+
orderBy: 'target_completion',
|
|
517
202
|
sortOrder: 'ASC',
|
|
518
203
|
isPublic: true,
|
|
519
204
|
objectScope: 'all',
|
|
520
205
|
});
|
|
521
206
|
|
|
522
|
-
// ── Page layouts
|
|
523
|
-
|
|
207
|
+
// ── Page layouts ───────────────────────────────────────────────────────────
|
|
208
|
+
defineTypedPageLayout(patient, {
|
|
524
209
|
apiName: 'default',
|
|
525
210
|
name: 'Patient chart',
|
|
526
211
|
layoutId: 'layout_dental_patient',
|
|
@@ -534,27 +219,22 @@ new CustomObjectPageLayout(patientObj, {
|
|
|
534
219
|
{
|
|
535
220
|
name: 'Profile',
|
|
536
221
|
type: 'fields_section',
|
|
537
|
-
section:
|
|
222
|
+
section: patient.sections.identity,
|
|
538
223
|
fields: [
|
|
539
224
|
{ field: 'name', editable: true },
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
225
|
+
'legal_name',
|
|
226
|
+
'date_of_birth',
|
|
227
|
+
'phone',
|
|
228
|
+
'email',
|
|
229
|
+
'active_patient',
|
|
230
|
+
'patient_label',
|
|
546
231
|
],
|
|
547
232
|
},
|
|
548
233
|
{
|
|
549
234
|
name: 'Clinical & billing',
|
|
550
235
|
type: 'fields_section',
|
|
551
|
-
section:
|
|
552
|
-
fields: [
|
|
553
|
-
patientAllergiesField,
|
|
554
|
-
patientInsuranceField,
|
|
555
|
-
patientChartNotesField,
|
|
556
|
-
planCountOnPatient,
|
|
557
|
-
],
|
|
236
|
+
section: patient.sections.clinical,
|
|
237
|
+
fields: ['allergies_and_alerts', 'insurance_plan', 'chart_summary', planCountOnPatient],
|
|
558
238
|
},
|
|
559
239
|
],
|
|
560
240
|
},
|
|
@@ -565,7 +245,7 @@ new CustomObjectPageLayout(patientObj, {
|
|
|
565
245
|
visibilityConditions: {},
|
|
566
246
|
});
|
|
567
247
|
|
|
568
|
-
|
|
248
|
+
defineTypedPageLayout(provider, {
|
|
569
249
|
apiName: 'default',
|
|
570
250
|
name: 'Provider',
|
|
571
251
|
layoutId: 'layout_dental_provider',
|
|
@@ -579,12 +259,12 @@ new CustomObjectPageLayout(providerObj, {
|
|
|
579
259
|
{
|
|
580
260
|
name: 'Booking',
|
|
581
261
|
type: 'fields_section',
|
|
582
|
-
section:
|
|
262
|
+
section: provider.sections.provider,
|
|
583
263
|
fields: [
|
|
584
|
-
{ field:
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
264
|
+
{ field: 'name', editable: true },
|
|
265
|
+
'provider_status',
|
|
266
|
+
'booking_status',
|
|
267
|
+
'next_available_days',
|
|
588
268
|
],
|
|
589
269
|
},
|
|
590
270
|
],
|
|
@@ -596,7 +276,7 @@ new CustomObjectPageLayout(providerObj, {
|
|
|
596
276
|
visibilityConditions: {},
|
|
597
277
|
});
|
|
598
278
|
|
|
599
|
-
|
|
279
|
+
defineTypedPageLayout(operatory, {
|
|
600
280
|
apiName: 'default',
|
|
601
281
|
name: 'Operatory',
|
|
602
282
|
layoutId: 'layout_dental_operatory',
|
|
@@ -610,8 +290,8 @@ new CustomObjectPageLayout(operatoryObj, {
|
|
|
610
290
|
{
|
|
611
291
|
name: 'Room',
|
|
612
292
|
type: 'fields_section',
|
|
613
|
-
section:
|
|
614
|
-
fields: [{ field:
|
|
293
|
+
section: operatory.sections.operatory,
|
|
294
|
+
fields: [{ field: 'name', editable: true }, 'room_code', apptCountOnOperatory],
|
|
615
295
|
},
|
|
616
296
|
],
|
|
617
297
|
},
|
|
@@ -622,23 +302,22 @@ new CustomObjectPageLayout(operatoryObj, {
|
|
|
622
302
|
visibilityConditions: {},
|
|
623
303
|
});
|
|
624
304
|
|
|
625
|
-
|
|
626
|
-
apiName: 'dental_complete_visit_fn',
|
|
627
|
-
name: 'completeVisit',
|
|
628
|
-
description: 'Detail-view action that completes an appointment and drafts follow-up treatment',
|
|
629
|
-
code: fs.readFileSync(path.join(__dirname, 'functions', 'complete-visit.ts'), 'utf-8'),
|
|
630
|
-
dependencies: { '@rippling/rippling-sdk': '^0.2.0-alpha.65' },
|
|
631
|
-
isAsync: false,
|
|
632
|
-
});
|
|
633
|
-
|
|
634
|
-
new CustomObjectAction(apptObj, {
|
|
305
|
+
defineTypedCustomObjectActionFromFunctionFile(manifest, appointment, {
|
|
635
306
|
actionId: 'action_dental_complete_visit',
|
|
636
307
|
name: 'Complete visit',
|
|
637
|
-
function: completeVisitFn,
|
|
638
308
|
visibilityPreferences: ['DETAIL_VIEW'],
|
|
309
|
+
function: {
|
|
310
|
+
apiName: 'dental_complete_visit_fn',
|
|
311
|
+
name: 'completeVisit',
|
|
312
|
+
description: 'Detail-view action that completes an appointment and drafts follow-up treatment',
|
|
313
|
+
codeDirectory: path.join(__dirname, 'functions'),
|
|
314
|
+
codeFilename: 'complete-visit.ts',
|
|
315
|
+
dependencies: { '@rippling/rippling-sdk': '^0.2.0-alpha.65' },
|
|
316
|
+
isAsync: false,
|
|
317
|
+
},
|
|
639
318
|
});
|
|
640
319
|
|
|
641
|
-
|
|
320
|
+
defineTypedPageLayout(appointment, {
|
|
642
321
|
apiName: 'default',
|
|
643
322
|
name: 'Appointment',
|
|
644
323
|
layoutId: 'layout_dental_appointment',
|
|
@@ -652,20 +331,20 @@ new CustomObjectPageLayout(apptObj, {
|
|
|
652
331
|
{
|
|
653
332
|
name: 'Chair & schedule',
|
|
654
333
|
type: 'fields_section',
|
|
655
|
-
section:
|
|
656
|
-
fields: [{ field: 'name', editable: true },
|
|
334
|
+
section: appointment.sections.operatory_and_time,
|
|
335
|
+
fields: [{ field: 'name', editable: true }, 'operatory_ref', 'start_time', 'duration_minutes'],
|
|
657
336
|
},
|
|
658
337
|
{
|
|
659
338
|
name: 'Patient & status',
|
|
660
339
|
type: 'fields_section',
|
|
661
|
-
section:
|
|
340
|
+
section: appointment.sections.patient_and_visit,
|
|
662
341
|
fields: [
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
342
|
+
'patient_ref',
|
|
343
|
+
'provider_ref',
|
|
344
|
+
'visit_type',
|
|
345
|
+
'appointment_status',
|
|
346
|
+
'board_label',
|
|
347
|
+
'visit_notes',
|
|
669
348
|
],
|
|
670
349
|
},
|
|
671
350
|
],
|
|
@@ -678,7 +357,7 @@ new CustomObjectPageLayout(apptObj, {
|
|
|
678
357
|
visibilityConditions: {},
|
|
679
358
|
});
|
|
680
359
|
|
|
681
|
-
|
|
360
|
+
defineTypedPageLayout(treatmentPlan, {
|
|
682
361
|
apiName: 'default',
|
|
683
362
|
name: 'Treatment plan',
|
|
684
363
|
layoutId: 'layout_dental_treatment_plan',
|
|
@@ -692,19 +371,19 @@ new CustomObjectPageLayout(planObj, {
|
|
|
692
371
|
{
|
|
693
372
|
name: 'Patient',
|
|
694
373
|
type: 'fields_section',
|
|
695
|
-
section:
|
|
696
|
-
fields: [
|
|
374
|
+
section: treatmentPlan.sections.link,
|
|
375
|
+
fields: ['plan_patient_ref'],
|
|
697
376
|
},
|
|
698
377
|
{
|
|
699
378
|
name: 'Planned work',
|
|
700
379
|
type: 'fields_section',
|
|
701
|
-
section:
|
|
380
|
+
section: treatmentPlan.sections.plan,
|
|
702
381
|
fields: [
|
|
703
|
-
{ field:
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
382
|
+
{ field: 'name', editable: true },
|
|
383
|
+
'plan_status',
|
|
384
|
+
'target_completion',
|
|
385
|
+
'procedures_summary',
|
|
386
|
+
'fee_estimate_cents',
|
|
708
387
|
],
|
|
709
388
|
},
|
|
710
389
|
],
|
|
@@ -716,16 +395,12 @@ new CustomObjectPageLayout(planObj, {
|
|
|
716
395
|
visibilityConditions: {},
|
|
717
396
|
});
|
|
718
397
|
|
|
719
|
-
// ── SDUI object-list tabs
|
|
398
|
+
// ── SDUI object-list tabs ─────────────────────────────────────────────────
|
|
720
399
|
const sduiObjectListDependencies = {
|
|
721
400
|
'@rippling/rippling-sdk': '^0.2.0-alpha.65',
|
|
722
401
|
'@rippling/pebble-sdui-web': '^0.9.2',
|
|
723
402
|
};
|
|
724
403
|
|
|
725
|
-
function loadFunctionCode(filename: string): string {
|
|
726
|
-
return fs.readFileSync(path.join(__dirname, 'functions', filename), 'utf-8');
|
|
727
|
-
}
|
|
728
|
-
|
|
729
404
|
function createObjectListPage(props: {
|
|
730
405
|
codeFilename: string;
|
|
731
406
|
functionApiName: string;
|
|
@@ -734,20 +409,17 @@ function createObjectListPage(props: {
|
|
|
734
409
|
pageId: string;
|
|
735
410
|
pageName: string;
|
|
736
411
|
}): SduiPage {
|
|
737
|
-
|
|
412
|
+
return defineSduiPageFromFunctionFile(manifest, {
|
|
738
413
|
apiName: props.functionApiName,
|
|
739
414
|
name: props.functionName,
|
|
740
415
|
description: props.functionDescription,
|
|
741
|
-
|
|
416
|
+
codeDirectory: path.join(__dirname, 'functions'),
|
|
417
|
+
codeFilename: props.codeFilename,
|
|
742
418
|
dependencies: sduiObjectListDependencies,
|
|
743
419
|
isAsync: false,
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
sduiPageId: props.pageId,
|
|
748
|
-
name: props.pageName,
|
|
749
|
-
function: listFn,
|
|
750
|
-
});
|
|
420
|
+
pageId: props.pageId,
|
|
421
|
+
pageName: props.pageName,
|
|
422
|
+
}).page;
|
|
751
423
|
}
|
|
752
424
|
|
|
753
425
|
const patientListPage = createObjectListPage({
|