@rippling/rippling-sdk 0.2.0-alpha.82 โ 0.2.0-alpha.84
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
|
@@ -1,28 +1,18 @@
|
|
|
1
|
-
import { FunctionContext, FunctionResponse
|
|
2
|
-
import {
|
|
1
|
+
import { FunctionContext, FunctionResponse } from '@rippling/rippling-sdk';
|
|
2
|
+
import {
|
|
3
|
+
handleTypedObjectListPageEvent,
|
|
4
|
+
type TypedObjectListPageInput,
|
|
5
|
+
type TypedObjectListPageOutput,
|
|
6
|
+
} from '@rippling/rippling-sdk/core/platform/manifest/custom-objects';
|
|
7
|
+
import { appointmentDefinition } from '../schema';
|
|
3
8
|
|
|
4
|
-
|
|
9
|
+
export type Input = TypedObjectListPageInput;
|
|
10
|
+
|
|
11
|
+
export type Output = TypedObjectListPageOutput;
|
|
5
12
|
|
|
6
13
|
export async function onRipplingEvent(
|
|
7
|
-
event:
|
|
14
|
+
event: Input,
|
|
8
15
|
context: FunctionContext,
|
|
9
|
-
): Promise<FunctionResponse
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
if (action === 'init') {
|
|
13
|
-
const spec = render({
|
|
14
|
-
root: ObjectListView({
|
|
15
|
-
props: { objectApiName: OBJECT },
|
|
16
|
-
}),
|
|
17
|
-
state: {},
|
|
18
|
-
});
|
|
19
|
-
return new FunctionResponse({
|
|
20
|
-
body: { spec: JSON.stringify(spec) },
|
|
21
|
-
statusCode: 200,
|
|
22
|
-
headers: {},
|
|
23
|
-
message: '',
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
return new FunctionResponse({ body: {}, statusCode: 200, headers: {}, message: '' });
|
|
16
|
+
): Promise<FunctionResponse<Output>> {
|
|
17
|
+
return handleTypedObjectListPageEvent(event, context, appointmentDefinition);
|
|
28
18
|
}
|
|
@@ -1,47 +1,26 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
FunctionResponse,
|
|
5
|
-
} from '@rippling/rippling-sdk';
|
|
6
|
-
import type { CustomObjectDataRow } from '@rippling/rippling-sdk/resources/custom-objects/records';
|
|
1
|
+
import { DetailViewActionFunctionEvent, FunctionContext, FunctionResponse } from '@rippling/rippling-sdk';
|
|
2
|
+
import { createCustomObjectFunctionRuntime } from '@rippling/rippling-sdk/core/platform/custom-objects';
|
|
3
|
+
import { appointmentDefinition, treatmentPlanDefinition } from '../schema';
|
|
7
4
|
|
|
8
|
-
const APPOINTMENT_OBJECT_API_NAME =
|
|
9
|
-
const TREATMENT_PLAN_OBJECT_API_NAME =
|
|
5
|
+
const APPOINTMENT_OBJECT_API_NAME = appointmentDefinition.apiName;
|
|
6
|
+
const TREATMENT_PLAN_OBJECT_API_NAME = treatmentPlanDefinition.apiName;
|
|
10
7
|
|
|
11
|
-
type
|
|
8
|
+
export type Input = DetailViewActionFunctionEvent<
|
|
12
9
|
{},
|
|
13
10
|
typeof APPOINTMENT_OBJECT_API_NAME,
|
|
14
11
|
'Complete visit',
|
|
15
12
|
'layout_dental_appointment'
|
|
16
13
|
>;
|
|
17
14
|
|
|
18
|
-
type
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
export type Output =
|
|
16
|
+
| {
|
|
17
|
+
appointmentId: string;
|
|
18
|
+
treatmentPlanId?: string;
|
|
19
|
+
message: string;
|
|
20
|
+
}
|
|
21
|
+
| { error: string };
|
|
23
22
|
|
|
24
|
-
function
|
|
25
|
-
return new RipplingSDK({
|
|
26
|
-
bearerToken: context.env.rippling_user_bearer_token,
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
function stringValue(record: CustomObjectDataRow, key: string): string {
|
|
31
|
-
const value = record[key];
|
|
32
|
-
return typeof value === 'string' ? value : '';
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function lookupId(record: CustomObjectDataRow, key: string): string | undefined {
|
|
36
|
-
const value = record[key];
|
|
37
|
-
if (typeof value === 'string') return value;
|
|
38
|
-
if (value == null || typeof value !== 'object') return undefined;
|
|
39
|
-
|
|
40
|
-
const nested = value as Record<string, unknown>;
|
|
41
|
-
return typeof nested['id'] === 'string' ? nested['id'] : undefined;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
function ok(body: CompleteVisitResponse): FunctionResponse<CompleteVisitResponse> {
|
|
23
|
+
function ok(body: Extract<Output, { appointmentId: string }>): FunctionResponse<Output> {
|
|
45
24
|
return new FunctionResponse({
|
|
46
25
|
body,
|
|
47
26
|
statusCode: 200,
|
|
@@ -50,7 +29,7 @@ function ok(body: CompleteVisitResponse): FunctionResponse<CompleteVisitResponse
|
|
|
50
29
|
});
|
|
51
30
|
}
|
|
52
31
|
|
|
53
|
-
function badRequest(message: string): FunctionResponse<
|
|
32
|
+
function badRequest(message: string): FunctionResponse<Output> {
|
|
54
33
|
return new FunctionResponse({
|
|
55
34
|
body: { error: message },
|
|
56
35
|
statusCode: 400,
|
|
@@ -60,32 +39,31 @@ function badRequest(message: string): FunctionResponse<{ error: string }> {
|
|
|
60
39
|
}
|
|
61
40
|
|
|
62
41
|
export async function onRipplingEvent(
|
|
63
|
-
event:
|
|
42
|
+
event: Input,
|
|
64
43
|
context: FunctionContext,
|
|
65
|
-
): Promise<FunctionResponse<
|
|
44
|
+
): Promise<FunctionResponse<Output>> {
|
|
66
45
|
if (event.object_api_name !== APPOINTMENT_OBJECT_API_NAME) {
|
|
67
46
|
return badRequest('Unsupported detail view action.');
|
|
68
47
|
}
|
|
69
48
|
|
|
70
|
-
const
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
);
|
|
49
|
+
const runtime = createCustomObjectFunctionRuntime(context);
|
|
50
|
+
const appointments = runtime.for(appointmentDefinition);
|
|
51
|
+
const treatmentPlans = runtime.for(treatmentPlanDefinition);
|
|
52
|
+
const appointment = await appointments.get(event.record_id);
|
|
75
53
|
|
|
76
|
-
if (
|
|
54
|
+
if (appointment.appointment_status === 'Completed') {
|
|
77
55
|
return ok({
|
|
78
56
|
appointmentId: event.record_id,
|
|
79
57
|
message: `${appointment.name} is already completed.`,
|
|
80
58
|
});
|
|
81
59
|
}
|
|
82
60
|
|
|
83
|
-
await
|
|
84
|
-
|
|
85
|
-
|
|
61
|
+
await appointments.update(event.record_id, {
|
|
62
|
+
appointment_status: 'Completed',
|
|
63
|
+
visit_notes: appointment.visit_notes ?? '',
|
|
86
64
|
});
|
|
87
65
|
|
|
88
|
-
const patientId =
|
|
66
|
+
const patientId = appointment.patient_ref?.id;
|
|
89
67
|
if (!patientId) {
|
|
90
68
|
return ok({
|
|
91
69
|
appointmentId: event.record_id,
|
|
@@ -93,18 +71,17 @@ export async function onRipplingEvent(
|
|
|
93
71
|
});
|
|
94
72
|
}
|
|
95
73
|
|
|
96
|
-
const treatmentPlan = await
|
|
74
|
+
const treatmentPlan = await treatmentPlans.create({
|
|
97
75
|
name: `Follow-up: ${appointment.name}`,
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
stringValue(appointment, 'visit_notes__c') || 'Follow up after the completed visit.',
|
|
76
|
+
plan_patient_ref: { id: patientId },
|
|
77
|
+
plan_status: 'Draft',
|
|
78
|
+
procedures_summary: appointment.visit_notes || 'Follow up after the completed visit.',
|
|
102
79
|
});
|
|
103
|
-
const response:
|
|
80
|
+
const response: Extract<Output, { appointmentId: string }> = {
|
|
104
81
|
appointmentId: event.record_id,
|
|
105
82
|
message: `${appointment.name} marked completed and follow-up treatment plan drafted.`,
|
|
106
83
|
};
|
|
107
|
-
|
|
84
|
+
response.treatmentPlanId = treatmentPlan.id;
|
|
108
85
|
|
|
109
86
|
return ok(response);
|
|
110
87
|
}
|
|
@@ -1,28 +1,18 @@
|
|
|
1
|
-
import { FunctionContext, FunctionResponse
|
|
2
|
-
import {
|
|
1
|
+
import { FunctionContext, FunctionResponse } from '@rippling/rippling-sdk';
|
|
2
|
+
import {
|
|
3
|
+
handleTypedObjectListPageEvent,
|
|
4
|
+
type TypedObjectListPageInput,
|
|
5
|
+
type TypedObjectListPageOutput,
|
|
6
|
+
} from '@rippling/rippling-sdk/core/platform/manifest/custom-objects';
|
|
7
|
+
import { operatoryDefinition } from '../schema';
|
|
3
8
|
|
|
4
|
-
|
|
9
|
+
export type Input = TypedObjectListPageInput;
|
|
10
|
+
|
|
11
|
+
export type Output = TypedObjectListPageOutput;
|
|
5
12
|
|
|
6
13
|
export async function onRipplingEvent(
|
|
7
|
-
event:
|
|
14
|
+
event: Input,
|
|
8
15
|
context: FunctionContext,
|
|
9
|
-
): Promise<FunctionResponse
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
if (action === 'init') {
|
|
13
|
-
const spec = render({
|
|
14
|
-
root: ObjectListView({
|
|
15
|
-
props: { objectApiName: OBJECT },
|
|
16
|
-
}),
|
|
17
|
-
state: {},
|
|
18
|
-
});
|
|
19
|
-
return new FunctionResponse({
|
|
20
|
-
body: { spec: JSON.stringify(spec) },
|
|
21
|
-
statusCode: 200,
|
|
22
|
-
headers: {},
|
|
23
|
-
message: '',
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
return new FunctionResponse({ body: {}, statusCode: 200, headers: {}, message: '' });
|
|
16
|
+
): Promise<FunctionResponse<Output>> {
|
|
17
|
+
return handleTypedObjectListPageEvent(event, context, operatoryDefinition);
|
|
28
18
|
}
|
|
@@ -1,28 +1,18 @@
|
|
|
1
|
-
import { FunctionContext, FunctionResponse
|
|
2
|
-
import {
|
|
1
|
+
import { FunctionContext, FunctionResponse } from '@rippling/rippling-sdk';
|
|
2
|
+
import {
|
|
3
|
+
handleTypedObjectListPageEvent,
|
|
4
|
+
type TypedObjectListPageInput,
|
|
5
|
+
type TypedObjectListPageOutput,
|
|
6
|
+
} from '@rippling/rippling-sdk/core/platform/manifest/custom-objects';
|
|
7
|
+
import { patientDefinition } from '../schema';
|
|
3
8
|
|
|
4
|
-
|
|
9
|
+
export type Input = TypedObjectListPageInput;
|
|
10
|
+
|
|
11
|
+
export type Output = TypedObjectListPageOutput;
|
|
5
12
|
|
|
6
13
|
export async function onRipplingEvent(
|
|
7
|
-
event:
|
|
14
|
+
event: Input,
|
|
8
15
|
context: FunctionContext,
|
|
9
|
-
): Promise<FunctionResponse
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
if (action === 'init') {
|
|
13
|
-
const spec = render({
|
|
14
|
-
root: ObjectListView({
|
|
15
|
-
props: { objectApiName: OBJECT },
|
|
16
|
-
}),
|
|
17
|
-
state: {},
|
|
18
|
-
});
|
|
19
|
-
return new FunctionResponse({
|
|
20
|
-
body: { spec: JSON.stringify(spec) },
|
|
21
|
-
statusCode: 200,
|
|
22
|
-
headers: {},
|
|
23
|
-
message: '',
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
return new FunctionResponse({ body: {}, statusCode: 200, headers: {}, message: '' });
|
|
16
|
+
): Promise<FunctionResponse<Output>> {
|
|
17
|
+
return handleTypedObjectListPageEvent(event, context, patientDefinition);
|
|
28
18
|
}
|
|
@@ -1,28 +1,18 @@
|
|
|
1
|
-
import { FunctionContext, FunctionResponse
|
|
2
|
-
import {
|
|
1
|
+
import { FunctionContext, FunctionResponse } from '@rippling/rippling-sdk';
|
|
2
|
+
import {
|
|
3
|
+
handleTypedObjectListPageEvent,
|
|
4
|
+
type TypedObjectListPageInput,
|
|
5
|
+
type TypedObjectListPageOutput,
|
|
6
|
+
} from '@rippling/rippling-sdk/core/platform/manifest/custom-objects';
|
|
7
|
+
import { treatmentPlanDefinition } from '../schema';
|
|
3
8
|
|
|
4
|
-
|
|
9
|
+
export type Input = TypedObjectListPageInput;
|
|
10
|
+
|
|
11
|
+
export type Output = TypedObjectListPageOutput;
|
|
5
12
|
|
|
6
13
|
export async function onRipplingEvent(
|
|
7
|
-
event:
|
|
14
|
+
event: Input,
|
|
8
15
|
context: FunctionContext,
|
|
9
|
-
): Promise<FunctionResponse
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
if (action === 'init') {
|
|
13
|
-
const spec = render({
|
|
14
|
-
root: ObjectListView({
|
|
15
|
-
props: { objectApiName: OBJECT },
|
|
16
|
-
}),
|
|
17
|
-
state: {},
|
|
18
|
-
});
|
|
19
|
-
return new FunctionResponse({
|
|
20
|
-
body: { spec: JSON.stringify(spec) },
|
|
21
|
-
statusCode: 200,
|
|
22
|
-
headers: {},
|
|
23
|
-
message: '',
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
return new FunctionResponse({ body: {}, statusCode: 200, headers: {}, message: '' });
|
|
16
|
+
): Promise<FunctionResponse<Output>> {
|
|
17
|
+
return handleTypedObjectListPageEvent(event, context, treatmentPlanDefinition);
|
|
28
18
|
}
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed custom-object schema definitions for the dental practice management example.
|
|
3
|
+
*
|
|
4
|
+
* This file demonstrates the TypeScript-first schema layer under
|
|
5
|
+
* `core/platform/custom-objects`. The exported definitions are plain structural
|
|
6
|
+
* values that can be shared across manifests, validators, tests, and other
|
|
7
|
+
* tooling without depending on side-effectful constructor calls.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import {
|
|
11
|
+
boolean,
|
|
12
|
+
date,
|
|
13
|
+
datetime,
|
|
14
|
+
defineCustomObject,
|
|
15
|
+
email,
|
|
16
|
+
formula,
|
|
17
|
+
longText,
|
|
18
|
+
lookup,
|
|
19
|
+
number,
|
|
20
|
+
parentChild,
|
|
21
|
+
phone,
|
|
22
|
+
radio,
|
|
23
|
+
section,
|
|
24
|
+
text,
|
|
25
|
+
typedRql,
|
|
26
|
+
} from '@rippling/rippling-sdk/core/platform/custom-objects';
|
|
27
|
+
|
|
28
|
+
/** Logical category name shared by all custom objects in this example. */
|
|
29
|
+
export const DENTAL_CATEGORY_NAME = 'dental';
|
|
30
|
+
|
|
31
|
+
/** Patient chart schema: demographics, allergies, billing context, and chart notes. */
|
|
32
|
+
export const patientDefinition = defineCustomObject({
|
|
33
|
+
name: 'dental_patient',
|
|
34
|
+
displayName: 'Patient',
|
|
35
|
+
pluralLabel: 'Patients',
|
|
36
|
+
category: DENTAL_CATEGORY_NAME,
|
|
37
|
+
description: 'Clinical chart, demographics, and care preferences',
|
|
38
|
+
icon: { emoji: '๐ฆท' },
|
|
39
|
+
sections: {
|
|
40
|
+
identity: section('Demographics', { sectionId: 'sec_pt_identity' }),
|
|
41
|
+
clinical: section('Clinical', { sectionId: 'sec_pt_clinical' }),
|
|
42
|
+
},
|
|
43
|
+
fields: {
|
|
44
|
+
legal_name: text({
|
|
45
|
+
displayName: 'Full legal name',
|
|
46
|
+
description: 'Full legal name field',
|
|
47
|
+
required: true,
|
|
48
|
+
maxLength: 160,
|
|
49
|
+
section: 'identity',
|
|
50
|
+
}),
|
|
51
|
+
date_of_birth: date({
|
|
52
|
+
displayName: 'Date of birth',
|
|
53
|
+
description: 'Date of birth field',
|
|
54
|
+
section: 'identity',
|
|
55
|
+
}),
|
|
56
|
+
phone: phone({
|
|
57
|
+
displayName: 'Phone',
|
|
58
|
+
description: 'Phone field',
|
|
59
|
+
section: 'identity',
|
|
60
|
+
}),
|
|
61
|
+
email: email({
|
|
62
|
+
displayName: 'Email',
|
|
63
|
+
description: 'Email field',
|
|
64
|
+
unique: true,
|
|
65
|
+
section: 'identity',
|
|
66
|
+
}),
|
|
67
|
+
active_patient: boolean({
|
|
68
|
+
displayName: 'Active patient',
|
|
69
|
+
description: 'Whether the patient is currently active in the practice',
|
|
70
|
+
required: true,
|
|
71
|
+
section: 'identity',
|
|
72
|
+
}),
|
|
73
|
+
allergies_and_alerts: longText({
|
|
74
|
+
displayName: 'Allergies & medical alerts',
|
|
75
|
+
description: 'Drug allergies, bisphosphonates, anticoagulants, latex, etc.',
|
|
76
|
+
maxLength: 2000,
|
|
77
|
+
section: 'clinical',
|
|
78
|
+
}),
|
|
79
|
+
insurance_plan: text({
|
|
80
|
+
displayName: 'Insurance / payer',
|
|
81
|
+
description: 'Insurance / payer field',
|
|
82
|
+
maxLength: 120,
|
|
83
|
+
section: 'clinical',
|
|
84
|
+
}),
|
|
85
|
+
chart_summary: longText({
|
|
86
|
+
displayName: 'Chart summary & preferences',
|
|
87
|
+
description: 'Narrative, anxiety notes, perio class, last prophy, family history',
|
|
88
|
+
maxLength: 4000,
|
|
89
|
+
section: 'clinical',
|
|
90
|
+
}),
|
|
91
|
+
patient_label: formula.text({
|
|
92
|
+
displayName: 'Chart label',
|
|
93
|
+
description: 'Quick list label (name and birth year)',
|
|
94
|
+
formula: "CONCATENATE(legal_name__c, ' (b. ', YEAR(date_of_birth__c), ')')",
|
|
95
|
+
maxLength: 220,
|
|
96
|
+
section: 'identity',
|
|
97
|
+
}),
|
|
98
|
+
},
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
/** Provider schema used for appointment assignment and scheduling filters. */
|
|
102
|
+
export const providerDefinition = defineCustomObject({
|
|
103
|
+
name: 'dental_provider',
|
|
104
|
+
displayName: 'Provider',
|
|
105
|
+
pluralLabel: 'Providers',
|
|
106
|
+
category: DENTAL_CATEGORY_NAME,
|
|
107
|
+
description: 'Clinicians who can be assigned to appointment blocks',
|
|
108
|
+
icon: { emoji: '๐งโโ๏ธ' },
|
|
109
|
+
sections: {
|
|
110
|
+
provider: section('Provider', { sectionId: 'sec_provider_info' }),
|
|
111
|
+
},
|
|
112
|
+
fields: {
|
|
113
|
+
provider_status: radio({
|
|
114
|
+
displayName: 'Status',
|
|
115
|
+
description: 'Whether this provider is active in the practice',
|
|
116
|
+
options: ['Active', 'On leave', 'Inactive'],
|
|
117
|
+
required: true,
|
|
118
|
+
section: 'provider',
|
|
119
|
+
}),
|
|
120
|
+
booking_status: radio({
|
|
121
|
+
displayName: 'Booking status',
|
|
122
|
+
description: 'Whether scheduling should offer this provider for new appointments',
|
|
123
|
+
options: ['Open', 'Limited', 'Closed'],
|
|
124
|
+
required: true,
|
|
125
|
+
section: 'provider',
|
|
126
|
+
}),
|
|
127
|
+
next_available_days: number({
|
|
128
|
+
displayName: 'Next available (days)',
|
|
129
|
+
description: 'Estimated days until this provider has an open appointment slot',
|
|
130
|
+
decimalPlaces: 0,
|
|
131
|
+
required: true,
|
|
132
|
+
section: 'provider',
|
|
133
|
+
}),
|
|
134
|
+
},
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
/** Operatory schema used as the parent object for the daily chair board. */
|
|
138
|
+
export const operatoryDefinition = defineCustomObject({
|
|
139
|
+
name: 'dental_operatory',
|
|
140
|
+
displayName: 'Operatory',
|
|
141
|
+
pluralLabel: 'Operatories',
|
|
142
|
+
category: DENTAL_CATEGORY_NAME,
|
|
143
|
+
description: 'A chair, bay, or room you book on the daily board',
|
|
144
|
+
icon: { emoji: '๐ชฅ' },
|
|
145
|
+
sections: {
|
|
146
|
+
operatory: section('Operatory', { sectionId: 'sec_op_info' }),
|
|
147
|
+
},
|
|
148
|
+
fields: {
|
|
149
|
+
room_code: text({
|
|
150
|
+
displayName: 'Room code',
|
|
151
|
+
description: 'Short code for whiteboards and schedules',
|
|
152
|
+
maxLength: 20,
|
|
153
|
+
section: 'operatory',
|
|
154
|
+
}),
|
|
155
|
+
},
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
/** Appointment schema covering chair, patient, provider, schedule, and status. */
|
|
159
|
+
export const appointmentDefinition = defineCustomObject({
|
|
160
|
+
name: 'dental_appointment',
|
|
161
|
+
displayName: 'Appointment',
|
|
162
|
+
pluralLabel: 'Appointments',
|
|
163
|
+
category: DENTAL_CATEGORY_NAME,
|
|
164
|
+
description: 'Chair booking with visit type and real-time visit status',
|
|
165
|
+
icon: { emoji: '๐
' },
|
|
166
|
+
sections: {
|
|
167
|
+
operatory_and_time: section('Operatory & time', { sectionId: 'sec_appt_op' }),
|
|
168
|
+
patient_and_visit: section('Patient & visit', { sectionId: 'sec_appt_patient' }),
|
|
169
|
+
},
|
|
170
|
+
fields: {
|
|
171
|
+
operatory_ref: parentChild(operatoryDefinition, {
|
|
172
|
+
displayName: 'Operatory (chair)',
|
|
173
|
+
description: 'Which chair or bay this visit is booked on',
|
|
174
|
+
relatedDataLabel: 'Appointments',
|
|
175
|
+
parentChildType: 'PRIMARY',
|
|
176
|
+
enableParentOwnerInheritance: false,
|
|
177
|
+
section: 'operatory_and_time',
|
|
178
|
+
}),
|
|
179
|
+
start_time: datetime({
|
|
180
|
+
displayName: 'Start (local)',
|
|
181
|
+
description: 'Planned or actual start; board sorts by this',
|
|
182
|
+
required: true,
|
|
183
|
+
section: 'operatory_and_time',
|
|
184
|
+
}),
|
|
185
|
+
duration_minutes: number({
|
|
186
|
+
displayName: 'Duration (minutes)',
|
|
187
|
+
description: 'Expected chair time for the procedure block',
|
|
188
|
+
required: true,
|
|
189
|
+
decimalPlaces: 0,
|
|
190
|
+
section: 'operatory_and_time',
|
|
191
|
+
}),
|
|
192
|
+
patient_ref: lookup(patientDefinition, {
|
|
193
|
+
displayName: 'Patient',
|
|
194
|
+
description: 'Chart to open for this visit (active patients only)',
|
|
195
|
+
relatedDataLabel: 'Appointments',
|
|
196
|
+
required: true,
|
|
197
|
+
lookupFilterRqlCondition: typedRql(patientDefinition, '(active_patient == True)'),
|
|
198
|
+
section: 'patient_and_visit',
|
|
199
|
+
}),
|
|
200
|
+
provider_ref: lookup(providerDefinition, {
|
|
201
|
+
displayName: 'Provider',
|
|
202
|
+
description: 'Provider assigned to this visit (active and bookable within two weeks)',
|
|
203
|
+
relatedDataLabel: 'Appointments',
|
|
204
|
+
required: true,
|
|
205
|
+
lookupFilterRqlCondition: typedRql(
|
|
206
|
+
providerDefinition,
|
|
207
|
+
"((provider_status IN ['Active']) AND (next_available_days <= 14) AND (booking_status NOT_IN ['Closed']))",
|
|
208
|
+
),
|
|
209
|
+
section: 'patient_and_visit',
|
|
210
|
+
}),
|
|
211
|
+
visit_type: radio({
|
|
212
|
+
displayName: 'Visit type',
|
|
213
|
+
description: 'Visit type field',
|
|
214
|
+
options: [
|
|
215
|
+
'New patient exam',
|
|
216
|
+
'Periodic / recall exam',
|
|
217
|
+
'Prophy / cleaning',
|
|
218
|
+
'Restorative',
|
|
219
|
+
'Endodontic',
|
|
220
|
+
'Perio / SRP',
|
|
221
|
+
'Oral surgery / extraction',
|
|
222
|
+
'Orthodontic',
|
|
223
|
+
'Emergency / pain',
|
|
224
|
+
'Other',
|
|
225
|
+
],
|
|
226
|
+
required: true,
|
|
227
|
+
section: 'patient_and_visit',
|
|
228
|
+
}),
|
|
229
|
+
appointment_status: radio({
|
|
230
|
+
displayName: 'Visit status',
|
|
231
|
+
description: 'Front-desk and clinical workflow status',
|
|
232
|
+
options: ['Scheduled', 'Checked in', 'In treatment', 'Completed', 'Cancelled', 'No-show'],
|
|
233
|
+
required: true,
|
|
234
|
+
section: 'patient_and_visit',
|
|
235
|
+
}),
|
|
236
|
+
visit_notes: longText({
|
|
237
|
+
displayName: 'Visit notes',
|
|
238
|
+
description: 'Chairside notes for this block (sync with EDR as needed)',
|
|
239
|
+
maxLength: 4000,
|
|
240
|
+
section: 'patient_and_visit',
|
|
241
|
+
}),
|
|
242
|
+
board_label: formula.text({
|
|
243
|
+
displayName: 'Board label',
|
|
244
|
+
description: 'Board label field',
|
|
245
|
+
formula: "CONCATENATE(visit_type__c, ' ยท ', appointment_status__c)",
|
|
246
|
+
maxLength: 260,
|
|
247
|
+
section: 'patient_and_visit',
|
|
248
|
+
}),
|
|
249
|
+
},
|
|
250
|
+
});
|
|
251
|
+
|
|
252
|
+
/** Treatment-plan schema for staged work owned by a patient chart. */
|
|
253
|
+
export const treatmentPlanDefinition = defineCustomObject({
|
|
254
|
+
name: 'dental_treatment_plan',
|
|
255
|
+
displayName: 'Treatment plan',
|
|
256
|
+
pluralLabel: 'Treatment plans',
|
|
257
|
+
category: DENTAL_CATEGORY_NAME,
|
|
258
|
+
description: 'Staged work sequenced for a patient',
|
|
259
|
+
icon: { emoji: '๐' },
|
|
260
|
+
sections: {
|
|
261
|
+
link: section('Link', { sectionId: 'sec_plan_link' }),
|
|
262
|
+
plan: section('Plan', { sectionId: 'sec_plan_body' }),
|
|
263
|
+
},
|
|
264
|
+
fields: {
|
|
265
|
+
plan_patient_ref: parentChild(patientDefinition, {
|
|
266
|
+
displayName: 'Patient',
|
|
267
|
+
description: 'Which chart owns this plan',
|
|
268
|
+
relatedDataLabel: 'Treatment plans',
|
|
269
|
+
parentChildType: 'PRIMARY',
|
|
270
|
+
enableParentOwnerInheritance: false,
|
|
271
|
+
section: 'link',
|
|
272
|
+
}),
|
|
273
|
+
plan_status: radio({
|
|
274
|
+
displayName: 'Status',
|
|
275
|
+
description: 'Status field',
|
|
276
|
+
options: ['Draft', 'Presented', 'Accepted', 'In progress', 'Completed', 'Declined / on hold'],
|
|
277
|
+
required: true,
|
|
278
|
+
section: 'plan',
|
|
279
|
+
}),
|
|
280
|
+
target_completion: date({
|
|
281
|
+
displayName: 'Target completion',
|
|
282
|
+
description: 'Goal to finish or next review',
|
|
283
|
+
section: 'plan',
|
|
284
|
+
}),
|
|
285
|
+
procedures_summary: longText({
|
|
286
|
+
displayName: 'Procedures & sequence',
|
|
287
|
+
description: 'Tooth numbers, codes, and staging',
|
|
288
|
+
maxLength: 8000,
|
|
289
|
+
section: 'plan',
|
|
290
|
+
}),
|
|
291
|
+
fee_estimate_cents: number({
|
|
292
|
+
displayName: 'Fee estimate (cents)',
|
|
293
|
+
description: 'Rough office fee total for planning; adjust per office policy',
|
|
294
|
+
decimalPlaces: 0,
|
|
295
|
+
section: 'plan',
|
|
296
|
+
}),
|
|
297
|
+
},
|
|
298
|
+
});
|