@almadar/std 5.0.0 → 5.2.0

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.
Files changed (421) hide show
  1. package/behaviors/exports/atoms/std-agent-activity-log.orb +5 -45
  2. package/behaviors/exports/atoms/std-agent-chat-thread.orb +5 -55
  3. package/behaviors/exports/atoms/std-agent-classifier.orb +8 -8
  4. package/behaviors/exports/atoms/std-agent-completion.orb +8 -8
  5. package/behaviors/exports/atoms/std-agent-context-window.orb +5 -4
  6. package/behaviors/exports/atoms/std-agent-conversation.orb +5 -71
  7. package/behaviors/exports/atoms/std-agent-memory.orb +13 -127
  8. package/behaviors/exports/atoms/std-agent-provider.orb +8 -8
  9. package/behaviors/exports/atoms/std-agent-search.orb +6 -27
  10. package/behaviors/exports/atoms/std-agent-session.orb +11 -85
  11. package/behaviors/exports/atoms/std-agent-step-progress.orb +5 -4
  12. package/behaviors/exports/atoms/std-agent-token-gauge.orb +5 -4
  13. package/behaviors/exports/atoms/std-agent-tool-call.orb +8 -8
  14. package/behaviors/exports/atoms/std-async.orb +5 -8
  15. package/behaviors/exports/atoms/std-autoregressive.orb +4 -2
  16. package/behaviors/exports/atoms/std-browse.orb +5 -4
  17. package/behaviors/exports/atoms/std-cache-aside.orb +5 -8
  18. package/behaviors/exports/atoms/std-calendar.orb +5 -4
  19. package/behaviors/exports/atoms/std-circuit-breaker.orb +5 -4
  20. package/behaviors/exports/atoms/std-collision.orb +5 -4
  21. package/behaviors/exports/atoms/std-combat-log.orb +5 -4
  22. package/behaviors/exports/atoms/std-combat.orb +5 -4
  23. package/behaviors/exports/atoms/std-confirmation.orb +10 -4
  24. package/behaviors/exports/atoms/std-dialogue-box.orb +5 -4
  25. package/behaviors/exports/atoms/std-display.orb +5 -4
  26. package/behaviors/exports/atoms/std-drawer.orb +5 -4
  27. package/behaviors/exports/atoms/std-filter.orb +5 -4
  28. package/behaviors/exports/atoms/std-flip-card.orb +5 -4
  29. package/behaviors/exports/atoms/std-gallery.orb +5 -4
  30. package/behaviors/exports/atoms/std-game-audio.orb +5 -4
  31. package/behaviors/exports/atoms/std-game-canvas2d.orb +4 -2
  32. package/behaviors/exports/atoms/std-game-canvas3d.orb +4 -2
  33. package/behaviors/exports/atoms/std-game-hud.orb +5 -4
  34. package/behaviors/exports/atoms/std-game-menu.orb +5 -4
  35. package/behaviors/exports/atoms/std-game-over-screen.orb +5 -4
  36. package/behaviors/exports/atoms/std-gameflow.orb +5 -4
  37. package/behaviors/exports/atoms/std-input.orb +5 -4
  38. package/behaviors/exports/atoms/std-inventory-panel.orb +5 -8
  39. package/behaviors/exports/atoms/std-isometric-canvas.orb +5 -4
  40. package/behaviors/exports/atoms/std-loading.orb +5 -4
  41. package/behaviors/exports/atoms/std-modal.orb +89 -4
  42. package/behaviors/exports/atoms/std-movement.orb +5 -4
  43. package/behaviors/exports/atoms/std-notification.orb +5 -4
  44. package/behaviors/exports/atoms/std-overworld.orb +5 -4
  45. package/behaviors/exports/atoms/std-pagination.orb +5 -4
  46. package/behaviors/exports/atoms/std-physics2d.orb +5 -4
  47. package/behaviors/exports/atoms/std-platformer-canvas.orb +5 -4
  48. package/behaviors/exports/atoms/std-quest.orb +5 -8
  49. package/behaviors/exports/atoms/std-rate-limiter.orb +5 -4
  50. package/behaviors/exports/atoms/std-rating.orb +5 -4
  51. package/behaviors/exports/atoms/std-score-board.orb +5 -4
  52. package/behaviors/exports/atoms/std-score.orb +5 -4
  53. package/behaviors/exports/atoms/std-search.orb +5 -4
  54. package/behaviors/exports/atoms/std-selection.orb +5 -4
  55. package/behaviors/exports/atoms/std-service-custom-bearer.orb +5 -15
  56. package/behaviors/exports/atoms/std-service-custom-header.orb +5 -17
  57. package/behaviors/exports/atoms/std-service-custom-noauth.orb +5 -11
  58. package/behaviors/exports/atoms/std-service-custom-query.orb +5 -17
  59. package/behaviors/exports/atoms/std-service-email.orb +5 -4
  60. package/behaviors/exports/atoms/std-service-github.orb +5 -4
  61. package/behaviors/exports/atoms/std-service-llm.orb +5 -4
  62. package/behaviors/exports/atoms/std-service-oauth.orb +5 -4
  63. package/behaviors/exports/atoms/std-service-redis.orb +5 -4
  64. package/behaviors/exports/atoms/std-service-storage.orb +5 -4
  65. package/behaviors/exports/atoms/std-service-stripe.orb +5 -4
  66. package/behaviors/exports/atoms/std-service-twilio.orb +5 -4
  67. package/behaviors/exports/atoms/std-service-youtube.orb +5 -4
  68. package/behaviors/exports/atoms/std-simulation-canvas.orb +5 -4
  69. package/behaviors/exports/atoms/std-sort.orb +5 -4
  70. package/behaviors/exports/atoms/std-sprite.orb +5 -4
  71. package/behaviors/exports/atoms/std-tabs.orb +5 -4
  72. package/behaviors/exports/atoms/std-text-effects.orb +5 -4
  73. package/behaviors/exports/atoms/std-theme.orb +5 -4
  74. package/behaviors/exports/atoms/std-timer.orb +5 -4
  75. package/behaviors/exports/atoms/std-undo.orb +5 -4
  76. package/behaviors/exports/atoms/std-upload.orb +5 -4
  77. package/behaviors/exports/atoms/std-validate-on-save.orb +5 -32
  78. package/behaviors/exports/atoms/std-wizard.orb +5 -4
  79. package/behaviors/exports/molecules/std-agent-fix-loop.orb +1141 -1709
  80. package/behaviors/exports/molecules/std-agent-learner.orb +608 -938
  81. package/behaviors/exports/molecules/std-agent-planner.orb +613 -961
  82. package/behaviors/exports/molecules/std-agent-rag.orb +586 -915
  83. package/behaviors/exports/molecules/std-agent-tool-loop.orb +915 -2846
  84. package/behaviors/exports/molecules/std-builder-game.orb +5 -4
  85. package/behaviors/exports/molecules/std-cart.orb +196 -307
  86. package/behaviors/exports/molecules/std-classifier-game.orb +5 -4
  87. package/behaviors/exports/molecules/std-debugger-game.orb +5 -4
  88. package/behaviors/exports/molecules/std-detail.orb +309 -467
  89. package/behaviors/exports/molecules/std-event-handler-game.orb +5 -4
  90. package/behaviors/exports/molecules/std-form-advanced.orb +5 -8
  91. package/behaviors/exports/molecules/std-geospatial.orb +363 -539
  92. package/behaviors/exports/molecules/std-inventory.orb +390 -720
  93. package/behaviors/exports/molecules/std-list.orb +526 -1156
  94. package/behaviors/exports/molecules/std-messaging.orb +295 -452
  95. package/behaviors/exports/molecules/std-negotiator-game.orb +5 -4
  96. package/behaviors/exports/molecules/std-platformer-game.orb +5 -4
  97. package/behaviors/exports/molecules/std-puzzle-game.orb +5 -4
  98. package/behaviors/exports/molecules/std-quiz.orb +5 -4
  99. package/behaviors/exports/molecules/std-sequencer-game.orb +5 -4
  100. package/behaviors/exports/molecules/std-service-content-pipeline.orb +5 -4
  101. package/behaviors/exports/molecules/std-service-custom-api-tester.orb +5 -42
  102. package/behaviors/exports/molecules/std-service-devops-toolkit.orb +5 -4
  103. package/behaviors/exports/molecules/std-service-notification-hub.orb +5 -4
  104. package/behaviors/exports/molecules/std-service-payment-flow.orb +5 -4
  105. package/behaviors/exports/molecules/std-simulator-game.orb +5 -4
  106. package/behaviors/exports/molecules/std-turn-based-battle.orb +5 -4
  107. package/behaviors/exports/organisms/std-agent-assistant.orb +15 -143
  108. package/behaviors/exports/organisms/std-agent-builder.orb +814 -1476
  109. package/behaviors/exports/organisms/std-agent-pipeline.orb +785 -1567
  110. package/behaviors/exports/organisms/std-agent-reviewer.orb +299 -502
  111. package/behaviors/exports/organisms/std-agent-tutor.orb +306 -493
  112. package/behaviors/exports/organisms/std-api-gateway.orb +284 -626
  113. package/behaviors/exports/organisms/std-arcade-game.orb +4 -4
  114. package/behaviors/exports/organisms/std-booking-system.orb +1422 -2160
  115. package/behaviors/exports/organisms/std-cicd-pipeline.orb +274 -617
  116. package/behaviors/exports/organisms/std-cms.orb +1274 -1972
  117. package/behaviors/exports/organisms/std-coding-academy.orb +4 -4
  118. package/behaviors/exports/organisms/std-crm.orb +999 -1775
  119. package/behaviors/exports/organisms/std-devops-dashboard.orb +284 -638
  120. package/behaviors/exports/organisms/std-ecommerce.orb +1653 -2398
  121. package/behaviors/exports/organisms/std-finance-tracker.orb +340 -684
  122. package/behaviors/exports/organisms/std-healthcare.orb +984 -1838
  123. package/behaviors/exports/organisms/std-helpdesk.orb +340 -744
  124. package/behaviors/exports/organisms/std-hr-portal.orb +1401 -2151
  125. package/behaviors/exports/organisms/std-iot-dashboard.orb +284 -626
  126. package/behaviors/exports/organisms/std-lms.orb +284 -632
  127. package/behaviors/exports/organisms/std-logic-training.orb +4 -4
  128. package/behaviors/exports/organisms/std-platformer-app.orb +15 -98
  129. package/behaviors/exports/organisms/std-project-manager.orb +970 -1774
  130. package/behaviors/exports/organisms/std-puzzle-app.orb +4 -4
  131. package/behaviors/exports/organisms/std-realtime-chat.orb +364 -714
  132. package/behaviors/exports/organisms/std-rpg-game.orb +15 -102
  133. package/behaviors/exports/organisms/std-service-marketplace.orb +1589 -2361
  134. package/behaviors/exports/organisms/std-service-research-assistant.orb +4 -15
  135. package/behaviors/exports/organisms/std-social-feed.orb +62 -66
  136. package/behaviors/exports/organisms/std-stem-lab.orb +4 -4
  137. package/behaviors/exports/organisms/std-strategy-game.orb +4 -4
  138. package/behaviors/exports/organisms/std-trading-dashboard.orb +274 -620
  139. package/dist/behaviors/exports/atoms/std-agent-activity-log.orb +5 -45
  140. package/dist/behaviors/exports/atoms/std-agent-chat-thread.orb +5 -55
  141. package/dist/behaviors/exports/atoms/std-agent-classifier.orb +8 -8
  142. package/dist/behaviors/exports/atoms/std-agent-completion.orb +8 -8
  143. package/dist/behaviors/exports/atoms/std-agent-context-window.orb +5 -4
  144. package/dist/behaviors/exports/atoms/std-agent-conversation.orb +5 -71
  145. package/dist/behaviors/exports/atoms/std-agent-memory.orb +13 -127
  146. package/dist/behaviors/exports/atoms/std-agent-provider.orb +8 -8
  147. package/dist/behaviors/exports/atoms/std-agent-search.orb +6 -27
  148. package/dist/behaviors/exports/atoms/std-agent-session.orb +11 -85
  149. package/dist/behaviors/exports/atoms/std-agent-step-progress.orb +5 -4
  150. package/dist/behaviors/exports/atoms/std-agent-token-gauge.orb +5 -4
  151. package/dist/behaviors/exports/atoms/std-agent-tool-call.orb +8 -8
  152. package/dist/behaviors/exports/atoms/std-async.orb +5 -8
  153. package/dist/behaviors/exports/atoms/std-autoregressive.orb +4 -2
  154. package/dist/behaviors/exports/atoms/std-browse.orb +5 -4
  155. package/dist/behaviors/exports/atoms/std-cache-aside.orb +5 -8
  156. package/dist/behaviors/exports/atoms/std-calendar.orb +5 -4
  157. package/dist/behaviors/exports/atoms/std-circuit-breaker.orb +5 -4
  158. package/dist/behaviors/exports/atoms/std-collision.orb +5 -4
  159. package/dist/behaviors/exports/atoms/std-combat-log.orb +5 -4
  160. package/dist/behaviors/exports/atoms/std-combat.orb +5 -4
  161. package/dist/behaviors/exports/atoms/std-confirmation.orb +10 -4
  162. package/dist/behaviors/exports/atoms/std-dialogue-box.orb +5 -4
  163. package/dist/behaviors/exports/atoms/std-display.orb +5 -4
  164. package/dist/behaviors/exports/atoms/std-drawer.orb +5 -4
  165. package/dist/behaviors/exports/atoms/std-filter.orb +5 -4
  166. package/dist/behaviors/exports/atoms/std-flip-card.orb +5 -4
  167. package/dist/behaviors/exports/atoms/std-gallery.orb +5 -4
  168. package/dist/behaviors/exports/atoms/std-game-audio.orb +5 -4
  169. package/dist/behaviors/exports/atoms/std-game-canvas2d.orb +4 -2
  170. package/dist/behaviors/exports/atoms/std-game-canvas3d.orb +4 -2
  171. package/dist/behaviors/exports/atoms/std-game-hud.orb +5 -4
  172. package/dist/behaviors/exports/atoms/std-game-menu.orb +5 -4
  173. package/dist/behaviors/exports/atoms/std-game-over-screen.orb +5 -4
  174. package/dist/behaviors/exports/atoms/std-gameflow.orb +5 -4
  175. package/dist/behaviors/exports/atoms/std-input.orb +5 -4
  176. package/dist/behaviors/exports/atoms/std-inventory-panel.orb +5 -8
  177. package/dist/behaviors/exports/atoms/std-isometric-canvas.orb +5 -4
  178. package/dist/behaviors/exports/atoms/std-loading.orb +5 -4
  179. package/dist/behaviors/exports/atoms/std-modal.orb +89 -4
  180. package/dist/behaviors/exports/atoms/std-movement.orb +5 -4
  181. package/dist/behaviors/exports/atoms/std-notification.orb +5 -4
  182. package/dist/behaviors/exports/atoms/std-overworld.orb +5 -4
  183. package/dist/behaviors/exports/atoms/std-pagination.orb +5 -4
  184. package/dist/behaviors/exports/atoms/std-physics2d.orb +5 -4
  185. package/dist/behaviors/exports/atoms/std-platformer-canvas.orb +5 -4
  186. package/dist/behaviors/exports/atoms/std-quest.orb +5 -8
  187. package/dist/behaviors/exports/atoms/std-rate-limiter.orb +5 -4
  188. package/dist/behaviors/exports/atoms/std-rating.orb +5 -4
  189. package/dist/behaviors/exports/atoms/std-score-board.orb +5 -4
  190. package/dist/behaviors/exports/atoms/std-score.orb +5 -4
  191. package/dist/behaviors/exports/atoms/std-search.orb +5 -4
  192. package/dist/behaviors/exports/atoms/std-selection.orb +5 -4
  193. package/dist/behaviors/exports/atoms/std-service-custom-bearer.orb +5 -15
  194. package/dist/behaviors/exports/atoms/std-service-custom-header.orb +5 -17
  195. package/dist/behaviors/exports/atoms/std-service-custom-noauth.orb +5 -11
  196. package/dist/behaviors/exports/atoms/std-service-custom-query.orb +5 -17
  197. package/dist/behaviors/exports/atoms/std-service-email.orb +5 -4
  198. package/dist/behaviors/exports/atoms/std-service-github.orb +5 -4
  199. package/dist/behaviors/exports/atoms/std-service-llm.orb +5 -4
  200. package/dist/behaviors/exports/atoms/std-service-oauth.orb +5 -4
  201. package/dist/behaviors/exports/atoms/std-service-redis.orb +5 -4
  202. package/dist/behaviors/exports/atoms/std-service-storage.orb +5 -4
  203. package/dist/behaviors/exports/atoms/std-service-stripe.orb +5 -4
  204. package/dist/behaviors/exports/atoms/std-service-twilio.orb +5 -4
  205. package/dist/behaviors/exports/atoms/std-service-youtube.orb +5 -4
  206. package/dist/behaviors/exports/atoms/std-simulation-canvas.orb +5 -4
  207. package/dist/behaviors/exports/atoms/std-sort.orb +5 -4
  208. package/dist/behaviors/exports/atoms/std-sprite.orb +5 -4
  209. package/dist/behaviors/exports/atoms/std-tabs.orb +5 -4
  210. package/dist/behaviors/exports/atoms/std-text-effects.orb +5 -4
  211. package/dist/behaviors/exports/atoms/std-theme.orb +5 -4
  212. package/dist/behaviors/exports/atoms/std-timer.orb +5 -4
  213. package/dist/behaviors/exports/atoms/std-undo.orb +5 -4
  214. package/dist/behaviors/exports/atoms/std-upload.orb +5 -4
  215. package/dist/behaviors/exports/atoms/std-validate-on-save.orb +5 -32
  216. package/dist/behaviors/exports/atoms/std-wizard.orb +5 -4
  217. package/dist/behaviors/exports/molecules/std-agent-fix-loop.orb +1141 -1709
  218. package/dist/behaviors/exports/molecules/std-agent-learner.orb +608 -938
  219. package/dist/behaviors/exports/molecules/std-agent-planner.orb +613 -961
  220. package/dist/behaviors/exports/molecules/std-agent-rag.orb +586 -915
  221. package/dist/behaviors/exports/molecules/std-agent-tool-loop.orb +915 -2846
  222. package/dist/behaviors/exports/molecules/std-builder-game.orb +5 -4
  223. package/dist/behaviors/exports/molecules/std-cart.orb +196 -307
  224. package/dist/behaviors/exports/molecules/std-classifier-game.orb +5 -4
  225. package/dist/behaviors/exports/molecules/std-debugger-game.orb +5 -4
  226. package/dist/behaviors/exports/molecules/std-detail.orb +309 -467
  227. package/dist/behaviors/exports/molecules/std-event-handler-game.orb +5 -4
  228. package/dist/behaviors/exports/molecules/std-form-advanced.orb +5 -8
  229. package/dist/behaviors/exports/molecules/std-geospatial.orb +363 -539
  230. package/dist/behaviors/exports/molecules/std-inventory.orb +390 -720
  231. package/dist/behaviors/exports/molecules/std-list.orb +526 -1156
  232. package/dist/behaviors/exports/molecules/std-messaging.orb +295 -452
  233. package/dist/behaviors/exports/molecules/std-negotiator-game.orb +5 -4
  234. package/dist/behaviors/exports/molecules/std-platformer-game.orb +5 -4
  235. package/dist/behaviors/exports/molecules/std-puzzle-game.orb +5 -4
  236. package/dist/behaviors/exports/molecules/std-quiz.orb +5 -4
  237. package/dist/behaviors/exports/molecules/std-sequencer-game.orb +5 -4
  238. package/dist/behaviors/exports/molecules/std-service-content-pipeline.orb +5 -4
  239. package/dist/behaviors/exports/molecules/std-service-custom-api-tester.orb +5 -42
  240. package/dist/behaviors/exports/molecules/std-service-devops-toolkit.orb +5 -4
  241. package/dist/behaviors/exports/molecules/std-service-notification-hub.orb +5 -4
  242. package/dist/behaviors/exports/molecules/std-service-payment-flow.orb +5 -4
  243. package/dist/behaviors/exports/molecules/std-simulator-game.orb +5 -4
  244. package/dist/behaviors/exports/molecules/std-turn-based-battle.orb +5 -4
  245. package/dist/behaviors/exports/organisms/std-agent-assistant.orb +15 -143
  246. package/dist/behaviors/exports/organisms/std-agent-builder.orb +814 -1476
  247. package/dist/behaviors/exports/organisms/std-agent-pipeline.orb +785 -1567
  248. package/dist/behaviors/exports/organisms/std-agent-reviewer.orb +299 -502
  249. package/dist/behaviors/exports/organisms/std-agent-tutor.orb +306 -493
  250. package/dist/behaviors/exports/organisms/std-api-gateway.orb +284 -626
  251. package/dist/behaviors/exports/organisms/std-arcade-game.orb +4 -4
  252. package/dist/behaviors/exports/organisms/std-booking-system.orb +1422 -2160
  253. package/dist/behaviors/exports/organisms/std-cicd-pipeline.orb +274 -617
  254. package/dist/behaviors/exports/organisms/std-cms.orb +1274 -1972
  255. package/dist/behaviors/exports/organisms/std-coding-academy.orb +4 -4
  256. package/dist/behaviors/exports/organisms/std-crm.orb +999 -1775
  257. package/dist/behaviors/exports/organisms/std-devops-dashboard.orb +284 -638
  258. package/dist/behaviors/exports/organisms/std-ecommerce.orb +1653 -2398
  259. package/dist/behaviors/exports/organisms/std-finance-tracker.orb +340 -684
  260. package/dist/behaviors/exports/organisms/std-healthcare.orb +984 -1838
  261. package/dist/behaviors/exports/organisms/std-helpdesk.orb +340 -744
  262. package/dist/behaviors/exports/organisms/std-hr-portal.orb +1401 -2151
  263. package/dist/behaviors/exports/organisms/std-iot-dashboard.orb +284 -626
  264. package/dist/behaviors/exports/organisms/std-lms.orb +284 -632
  265. package/dist/behaviors/exports/organisms/std-logic-training.orb +4 -4
  266. package/dist/behaviors/exports/organisms/std-platformer-app.orb +15 -98
  267. package/dist/behaviors/exports/organisms/std-project-manager.orb +970 -1774
  268. package/dist/behaviors/exports/organisms/std-puzzle-app.orb +4 -4
  269. package/dist/behaviors/exports/organisms/std-realtime-chat.orb +364 -714
  270. package/dist/behaviors/exports/organisms/std-rpg-game.orb +15 -102
  271. package/dist/behaviors/exports/organisms/std-service-marketplace.orb +1589 -2361
  272. package/dist/behaviors/exports/organisms/std-service-research-assistant.orb +4 -15
  273. package/dist/behaviors/exports/organisms/std-social-feed.orb +62 -66
  274. package/dist/behaviors/exports/organisms/std-stem-lab.orb +4 -4
  275. package/dist/behaviors/exports/organisms/std-strategy-game.orb +4 -4
  276. package/dist/behaviors/exports/organisms/std-trading-dashboard.orb +274 -620
  277. package/dist/behaviors/exports-reader.js.map +1 -1
  278. package/dist/behaviors/functions/index.d.ts +2192 -0
  279. package/dist/behaviors/functions/index.js.map +1 -1
  280. package/dist/behaviors/index.js.map +1 -1
  281. package/dist/behaviors/query.js.map +1 -1
  282. package/dist/exports/atoms/std-agent-activity-log.orb +5 -45
  283. package/dist/exports/atoms/std-agent-chat-thread.orb +5 -55
  284. package/dist/exports/atoms/std-agent-classifier.orb +8 -8
  285. package/dist/exports/atoms/std-agent-completion.orb +8 -8
  286. package/dist/exports/atoms/std-agent-context-window.orb +5 -4
  287. package/dist/exports/atoms/std-agent-conversation.orb +5 -71
  288. package/dist/exports/atoms/std-agent-memory.orb +13 -127
  289. package/dist/exports/atoms/std-agent-provider.orb +8 -8
  290. package/dist/exports/atoms/std-agent-search.orb +6 -27
  291. package/dist/exports/atoms/std-agent-session.orb +11 -85
  292. package/dist/exports/atoms/std-agent-step-progress.orb +5 -4
  293. package/dist/exports/atoms/std-agent-token-gauge.orb +5 -4
  294. package/dist/exports/atoms/std-agent-tool-call.orb +8 -8
  295. package/dist/exports/atoms/std-async.orb +5 -8
  296. package/dist/exports/atoms/std-autoregressive.orb +4 -2
  297. package/dist/exports/atoms/std-browse.orb +5 -4
  298. package/dist/exports/atoms/std-cache-aside.orb +5 -8
  299. package/dist/exports/atoms/std-calendar.orb +5 -4
  300. package/dist/exports/atoms/std-circuit-breaker.orb +5 -4
  301. package/dist/exports/atoms/std-collision.orb +5 -4
  302. package/dist/exports/atoms/std-combat-log.orb +5 -4
  303. package/dist/exports/atoms/std-combat.orb +5 -4
  304. package/dist/exports/atoms/std-confirmation.orb +10 -4
  305. package/dist/exports/atoms/std-dialogue-box.orb +5 -4
  306. package/dist/exports/atoms/std-display.orb +5 -4
  307. package/dist/exports/atoms/std-drawer.orb +5 -4
  308. package/dist/exports/atoms/std-filter.orb +5 -4
  309. package/dist/exports/atoms/std-flip-card.orb +5 -4
  310. package/dist/exports/atoms/std-gallery.orb +5 -4
  311. package/dist/exports/atoms/std-game-audio.orb +5 -4
  312. package/dist/exports/atoms/std-game-canvas2d.orb +4 -2
  313. package/dist/exports/atoms/std-game-canvas3d.orb +4 -2
  314. package/dist/exports/atoms/std-game-hud.orb +5 -4
  315. package/dist/exports/atoms/std-game-menu.orb +5 -4
  316. package/dist/exports/atoms/std-game-over-screen.orb +5 -4
  317. package/dist/exports/atoms/std-gameflow.orb +5 -4
  318. package/dist/exports/atoms/std-input.orb +5 -4
  319. package/dist/exports/atoms/std-inventory-panel.orb +5 -8
  320. package/dist/exports/atoms/std-isometric-canvas.orb +5 -4
  321. package/dist/exports/atoms/std-loading.orb +5 -4
  322. package/dist/exports/atoms/std-modal.orb +89 -4
  323. package/dist/exports/atoms/std-movement.orb +5 -4
  324. package/dist/exports/atoms/std-notification.orb +5 -4
  325. package/dist/exports/atoms/std-overworld.orb +5 -4
  326. package/dist/exports/atoms/std-pagination.orb +5 -4
  327. package/dist/exports/atoms/std-physics2d.orb +5 -4
  328. package/dist/exports/atoms/std-platformer-canvas.orb +5 -4
  329. package/dist/exports/atoms/std-quest.orb +5 -8
  330. package/dist/exports/atoms/std-rate-limiter.orb +5 -4
  331. package/dist/exports/atoms/std-rating.orb +5 -4
  332. package/dist/exports/atoms/std-score-board.orb +5 -4
  333. package/dist/exports/atoms/std-score.orb +5 -4
  334. package/dist/exports/atoms/std-search.orb +5 -4
  335. package/dist/exports/atoms/std-selection.orb +5 -4
  336. package/dist/exports/atoms/std-service-custom-bearer.orb +5 -15
  337. package/dist/exports/atoms/std-service-custom-header.orb +5 -17
  338. package/dist/exports/atoms/std-service-custom-noauth.orb +5 -11
  339. package/dist/exports/atoms/std-service-custom-query.orb +5 -17
  340. package/dist/exports/atoms/std-service-email.orb +5 -4
  341. package/dist/exports/atoms/std-service-github.orb +5 -4
  342. package/dist/exports/atoms/std-service-llm.orb +5 -4
  343. package/dist/exports/atoms/std-service-oauth.orb +5 -4
  344. package/dist/exports/atoms/std-service-redis.orb +5 -4
  345. package/dist/exports/atoms/std-service-storage.orb +5 -4
  346. package/dist/exports/atoms/std-service-stripe.orb +5 -4
  347. package/dist/exports/atoms/std-service-twilio.orb +5 -4
  348. package/dist/exports/atoms/std-service-youtube.orb +5 -4
  349. package/dist/exports/atoms/std-simulation-canvas.orb +5 -4
  350. package/dist/exports/atoms/std-sort.orb +5 -4
  351. package/dist/exports/atoms/std-sprite.orb +5 -4
  352. package/dist/exports/atoms/std-tabs.orb +5 -4
  353. package/dist/exports/atoms/std-text-effects.orb +5 -4
  354. package/dist/exports/atoms/std-theme.orb +5 -4
  355. package/dist/exports/atoms/std-timer.orb +5 -4
  356. package/dist/exports/atoms/std-undo.orb +5 -4
  357. package/dist/exports/atoms/std-upload.orb +5 -4
  358. package/dist/exports/atoms/std-validate-on-save.orb +5 -32
  359. package/dist/exports/atoms/std-wizard.orb +5 -4
  360. package/dist/exports/molecules/std-agent-fix-loop.orb +1141 -1709
  361. package/dist/exports/molecules/std-agent-learner.orb +608 -938
  362. package/dist/exports/molecules/std-agent-planner.orb +613 -961
  363. package/dist/exports/molecules/std-agent-rag.orb +586 -915
  364. package/dist/exports/molecules/std-agent-tool-loop.orb +915 -2846
  365. package/dist/exports/molecules/std-builder-game.orb +5 -4
  366. package/dist/exports/molecules/std-cart.orb +196 -307
  367. package/dist/exports/molecules/std-classifier-game.orb +5 -4
  368. package/dist/exports/molecules/std-debugger-game.orb +5 -4
  369. package/dist/exports/molecules/std-detail.orb +309 -467
  370. package/dist/exports/molecules/std-event-handler-game.orb +5 -4
  371. package/dist/exports/molecules/std-form-advanced.orb +5 -8
  372. package/dist/exports/molecules/std-geospatial.orb +363 -539
  373. package/dist/exports/molecules/std-inventory.orb +390 -720
  374. package/dist/exports/molecules/std-list.orb +526 -1156
  375. package/dist/exports/molecules/std-messaging.orb +295 -452
  376. package/dist/exports/molecules/std-negotiator-game.orb +5 -4
  377. package/dist/exports/molecules/std-platformer-game.orb +5 -4
  378. package/dist/exports/molecules/std-puzzle-game.orb +5 -4
  379. package/dist/exports/molecules/std-quiz.orb +5 -4
  380. package/dist/exports/molecules/std-sequencer-game.orb +5 -4
  381. package/dist/exports/molecules/std-service-content-pipeline.orb +5 -4
  382. package/dist/exports/molecules/std-service-custom-api-tester.orb +5 -42
  383. package/dist/exports/molecules/std-service-devops-toolkit.orb +5 -4
  384. package/dist/exports/molecules/std-service-notification-hub.orb +5 -4
  385. package/dist/exports/molecules/std-service-payment-flow.orb +5 -4
  386. package/dist/exports/molecules/std-simulator-game.orb +5 -4
  387. package/dist/exports/molecules/std-turn-based-battle.orb +5 -4
  388. package/dist/exports/organisms/std-agent-assistant.orb +15 -143
  389. package/dist/exports/organisms/std-agent-builder.orb +814 -1476
  390. package/dist/exports/organisms/std-agent-pipeline.orb +785 -1567
  391. package/dist/exports/organisms/std-agent-reviewer.orb +299 -502
  392. package/dist/exports/organisms/std-agent-tutor.orb +306 -493
  393. package/dist/exports/organisms/std-api-gateway.orb +284 -626
  394. package/dist/exports/organisms/std-arcade-game.orb +4 -4
  395. package/dist/exports/organisms/std-booking-system.orb +1422 -2160
  396. package/dist/exports/organisms/std-cicd-pipeline.orb +274 -617
  397. package/dist/exports/organisms/std-cms.orb +1274 -1972
  398. package/dist/exports/organisms/std-coding-academy.orb +4 -4
  399. package/dist/exports/organisms/std-crm.orb +999 -1775
  400. package/dist/exports/organisms/std-devops-dashboard.orb +284 -638
  401. package/dist/exports/organisms/std-ecommerce.orb +1653 -2398
  402. package/dist/exports/organisms/std-finance-tracker.orb +340 -684
  403. package/dist/exports/organisms/std-healthcare.orb +984 -1838
  404. package/dist/exports/organisms/std-helpdesk.orb +340 -744
  405. package/dist/exports/organisms/std-hr-portal.orb +1401 -2151
  406. package/dist/exports/organisms/std-iot-dashboard.orb +284 -626
  407. package/dist/exports/organisms/std-lms.orb +284 -632
  408. package/dist/exports/organisms/std-logic-training.orb +4 -4
  409. package/dist/exports/organisms/std-platformer-app.orb +15 -98
  410. package/dist/exports/organisms/std-project-manager.orb +970 -1774
  411. package/dist/exports/organisms/std-puzzle-app.orb +4 -4
  412. package/dist/exports/organisms/std-realtime-chat.orb +364 -714
  413. package/dist/exports/organisms/std-rpg-game.orb +15 -102
  414. package/dist/exports/organisms/std-service-marketplace.orb +1589 -2361
  415. package/dist/exports/organisms/std-service-research-assistant.orb +4 -15
  416. package/dist/exports/organisms/std-social-feed.orb +62 -66
  417. package/dist/exports/organisms/std-stem-lab.orb +4 -4
  418. package/dist/exports/organisms/std-strategy-game.orb +4 -4
  419. package/dist/exports/organisms/std-trading-dashboard.orb +274 -620
  420. package/dist/index.js.map +1 -1
  421. package/package.json +2 -2
@@ -1,6 +1,7 @@
1
1
  {
2
- "name": "HealthcareApp",
2
+ "name": "std-healthcare",
3
3
  "version": "1.0.0",
4
+ "description": "Healthcare organism. Composes molecules via compose: - stdList(Patient): patient registry with CRUD - stdList(Appointment): appointment management - stdWizard(IntakeForm): patient intake wizard - stdDetail(Prescription): prescription browse + view - stdDisplay(Dashboard): clinic dashboard KPIs",
4
5
  "orbitals": [
5
6
  {
6
7
  "name": "PatientOrbital",
@@ -57,11 +58,15 @@
57
58
  "listens": [
58
59
  {
59
60
  "event": "PATIENT_CREATED",
60
- "triggers": "PATIENT_CREATED"
61
+ "triggers": "INIT"
61
62
  },
62
63
  {
63
64
  "event": "PATIENT_UPDATED",
64
- "triggers": "PATIENT_UPDATED"
65
+ "triggers": "INIT"
66
+ },
67
+ {
68
+ "event": "PATIENT_DELETED",
69
+ "triggers": "INIT"
65
70
  },
66
71
  {
67
72
  "event": "INTAKE_COMPLETE",
@@ -74,9 +79,6 @@
74
79
  {
75
80
  "name": "browsing",
76
81
  "isInitial": true
77
- },
78
- {
79
- "name": "deleting"
80
82
  }
81
83
  ],
82
84
  "events": [
@@ -132,40 +134,6 @@
132
134
  "type": "object"
133
135
  }
134
136
  ]
135
- },
136
- {
137
- "key": "PATIENT_CREATED",
138
- "name": "PATIENT_CREATED",
139
- "payload": [
140
- {
141
- "name": "data",
142
- "type": "object",
143
- "required": true
144
- }
145
- ]
146
- },
147
- {
148
- "key": "PATIENT_UPDATED",
149
- "name": "PATIENT_UPDATED",
150
- "payload": [
151
- {
152
- "name": "data",
153
- "type": "object",
154
- "required": true
155
- }
156
- ]
157
- },
158
- {
159
- "key": "CONFIRM_DELETE",
160
- "name": "Confirm Delete"
161
- },
162
- {
163
- "key": "CANCEL",
164
- "name": "Cancel"
165
- },
166
- {
167
- "key": "CLOSE",
168
- "name": "Close"
169
137
  }
170
138
  ],
171
139
  "transitions": [
@@ -345,22 +313,62 @@
345
313
  }
346
314
  ]
347
315
  ]
316
+ }
317
+ ]
318
+ }
319
+ },
320
+ {
321
+ "name": "PatientCreate",
322
+ "linkedEntity": "Patient",
323
+ "category": "interaction",
324
+ "emits": [
325
+ {
326
+ "event": "SAVE"
327
+ },
328
+ {
329
+ "event": "PATIENT_CREATED"
330
+ }
331
+ ],
332
+ "stateMachine": {
333
+ "states": [
334
+ {
335
+ "name": "closed",
336
+ "isInitial": true
348
337
  },
349
338
  {
350
- "from": "browsing",
351
- "to": "browsing",
352
- "event": "PATIENT_CREATED",
353
- "effects": [
354
- [
355
- "ref",
356
- "Patient"
357
- ]
358
- ]
339
+ "name": "open"
340
+ }
341
+ ],
342
+ "events": [
343
+ {
344
+ "key": "INIT",
345
+ "name": "Initialize"
359
346
  },
360
347
  {
361
- "from": "browsing",
362
- "to": "browsing",
363
- "event": "PATIENT_UPDATED",
348
+ "key": "CREATE",
349
+ "name": "Open"
350
+ },
351
+ {
352
+ "key": "CLOSE",
353
+ "name": "Close"
354
+ },
355
+ {
356
+ "key": "SAVE",
357
+ "name": "Save",
358
+ "payload": [
359
+ {
360
+ "name": "data",
361
+ "type": "object",
362
+ "required": true
363
+ }
364
+ ]
365
+ }
366
+ ],
367
+ "transitions": [
368
+ {
369
+ "from": "closed",
370
+ "to": "closed",
371
+ "event": "INIT",
364
372
  "effects": [
365
373
  [
366
374
  "ref",
@@ -369,16 +377,13 @@
369
377
  ]
370
378
  },
371
379
  {
372
- "from": "browsing",
373
- "to": "deleting",
374
- "event": "DELETE",
380
+ "from": "closed",
381
+ "to": "open",
382
+ "event": "CREATE",
375
383
  "effects": [
376
384
  [
377
385
  "fetch",
378
- "Patient",
379
- {
380
- "id": "@payload.id"
381
- }
386
+ "Patient"
382
387
  ],
383
388
  [
384
389
  "render-ui",
@@ -395,12 +400,12 @@
395
400
  "children": [
396
401
  {
397
402
  "type": "icon",
398
- "name": "trash-2",
403
+ "name": "plus-circle",
399
404
  "size": "md"
400
405
  },
401
406
  {
402
407
  "type": "typography",
403
- "content": "Delete Patient",
408
+ "content": "Create Patient",
404
409
  "variant": "h3"
405
410
  }
406
411
  ]
@@ -409,34 +414,18 @@
409
414
  "type": "divider"
410
415
  },
411
416
  {
412
- "type": "typography",
413
- "content": "@entity.firstName",
414
- "variant": "h4"
415
- },
416
- {
417
- "type": "typography",
418
- "content": "This action cannot be undone.",
419
- "variant": "body"
420
- },
421
- {
422
- "type": "stack",
423
- "direction": "horizontal",
424
- "gap": "sm",
425
- "justify": "end",
426
- "children": [
427
- {
428
- "type": "button",
429
- "label": "Cancel",
430
- "event": "CANCEL",
431
- "variant": "ghost"
432
- },
433
- {
434
- "type": "button",
435
- "label": "Delete",
436
- "event": "CONFIRM_DELETE",
437
- "variant": "danger",
438
- "icon": "trash"
439
- }
417
+ "type": "form-section",
418
+ "entity": "Patient",
419
+ "mode": "create",
420
+ "submitEvent": "SAVE",
421
+ "cancelEvent": "CLOSE",
422
+ "fields": [
423
+ "firstName",
424
+ "lastName",
425
+ "dateOfBirth",
426
+ "phone",
427
+ "insuranceId",
428
+ "status"
440
429
  ]
441
430
  }
442
431
  ]
@@ -445,951 +434,128 @@
445
434
  ]
446
435
  },
447
436
  {
448
- "from": "deleting",
449
- "to": "browsing",
450
- "event": "CONFIRM_DELETE",
437
+ "from": "open",
438
+ "to": "closed",
439
+ "event": "CLOSE",
440
+ "effects": [
441
+ [
442
+ "render-ui",
443
+ "modal",
444
+ null
445
+ ],
446
+ [
447
+ "notify",
448
+ "Cancelled",
449
+ "info"
450
+ ]
451
+ ]
452
+ },
453
+ {
454
+ "from": "open",
455
+ "to": "closed",
456
+ "event": "SAVE",
451
457
  "effects": [
452
458
  [
453
459
  "persist",
454
- "delete",
460
+ "create",
455
461
  "Patient",
456
- "@entity.id"
462
+ "@payload.data"
457
463
  ],
458
464
  [
459
465
  "render-ui",
460
466
  "modal",
461
467
  null
462
468
  ],
469
+ [
470
+ "emit",
471
+ "PATIENT_CREATED"
472
+ ]
473
+ ]
474
+ }
475
+ ]
476
+ }
477
+ },
478
+ {
479
+ "name": "PatientEdit",
480
+ "linkedEntity": "Patient",
481
+ "category": "interaction",
482
+ "emits": [
483
+ {
484
+ "event": "SAVE"
485
+ },
486
+ {
487
+ "event": "PATIENT_UPDATED"
488
+ }
489
+ ],
490
+ "stateMachine": {
491
+ "states": [
492
+ {
493
+ "name": "closed",
494
+ "isInitial": true
495
+ },
496
+ {
497
+ "name": "open"
498
+ }
499
+ ],
500
+ "events": [
501
+ {
502
+ "key": "INIT",
503
+ "name": "Initialize"
504
+ },
505
+ {
506
+ "key": "EDIT",
507
+ "name": "Open",
508
+ "payload": [
509
+ {
510
+ "name": "id",
511
+ "type": "string",
512
+ "required": true
513
+ }
514
+ ]
515
+ },
516
+ {
517
+ "key": "CLOSE",
518
+ "name": "Close"
519
+ },
520
+ {
521
+ "key": "SAVE",
522
+ "name": "Save",
523
+ "payload": [
524
+ {
525
+ "name": "data",
526
+ "type": "object",
527
+ "required": true
528
+ }
529
+ ]
530
+ }
531
+ ],
532
+ "transitions": [
533
+ {
534
+ "from": "closed",
535
+ "to": "closed",
536
+ "event": "INIT",
537
+ "effects": [
538
+ [
539
+ "ref",
540
+ "Patient"
541
+ ]
542
+ ]
543
+ },
544
+ {
545
+ "from": "closed",
546
+ "to": "open",
547
+ "event": "EDIT",
548
+ "effects": [
549
+ [
550
+ "fetch",
551
+ "Patient",
552
+ {
553
+ "id": "@payload.id"
554
+ }
555
+ ],
463
556
  [
464
557
  "render-ui",
465
- "main",
466
- {
467
- "type": "dashboard-layout",
468
- "appName": "HealthcareApp",
469
- "navItems": [
470
- {
471
- "label": "Patients",
472
- "href": "/patients",
473
- "icon": "heart"
474
- },
475
- {
476
- "label": "Appointments",
477
- "href": "/appointments",
478
- "icon": "calendar"
479
- },
480
- {
481
- "label": "Intake",
482
- "href": "/intake",
483
- "icon": "layout-list"
484
- },
485
- {
486
- "label": "Prescriptions",
487
- "href": "/prescriptions",
488
- "icon": "pill"
489
- },
490
- {
491
- "label": "Dashboard",
492
- "href": "/dashboard",
493
- "icon": "layout-dashboard"
494
- }
495
- ],
496
- "children": [
497
- {
498
- "type": "stack",
499
- "direction": "vertical",
500
- "gap": "lg",
501
- "className": "max-w-5xl mx-auto w-full",
502
- "children": [
503
- {
504
- "type": "stack",
505
- "direction": "horizontal",
506
- "gap": "md",
507
- "justify": "space-between",
508
- "align": "center",
509
- "children": [
510
- {
511
- "type": "stack",
512
- "direction": "horizontal",
513
- "gap": "sm",
514
- "align": "center",
515
- "children": [
516
- {
517
- "type": "icon",
518
- "name": "users",
519
- "size": "lg"
520
- },
521
- {
522
- "type": "typography",
523
- "content": "Patients",
524
- "variant": "h2"
525
- }
526
- ]
527
- },
528
- {
529
- "type": "stack",
530
- "direction": "horizontal",
531
- "gap": "sm",
532
- "children": [
533
- {
534
- "type": "button",
535
- "label": "Create Patient",
536
- "event": "CREATE",
537
- "variant": "primary",
538
- "icon": "plus"
539
- }
540
- ]
541
- }
542
- ]
543
- },
544
- {
545
- "type": "divider"
546
- },
547
- {
548
- "type": "simple-grid",
549
- "columns": 1,
550
- "children": [
551
- {
552
- "type": "stat-display",
553
- "label": "Total Patients",
554
- "value": [
555
- "array/len",
556
- "@entity"
557
- ],
558
- "icon": "users"
559
- }
560
- ]
561
- },
562
- {
563
- "type": "divider"
564
- },
565
- {
566
- "type": "data-list",
567
- "entity": "Patient",
568
- "emptyIcon": "inbox",
569
- "emptyTitle": "No patients registered",
570
- "emptyDescription": "Register a patient to get started.",
571
- "itemActions": [
572
- {
573
- "label": "View",
574
- "event": "VIEW",
575
- "variant": "ghost",
576
- "size": "sm"
577
- },
578
- {
579
- "label": "Edit",
580
- "event": "EDIT",
581
- "variant": "ghost",
582
- "size": "sm"
583
- },
584
- {
585
- "label": "Delete",
586
- "event": "DELETE",
587
- "variant": "danger",
588
- "size": "sm"
589
- }
590
- ],
591
- "columns": [
592
- {
593
- "name": "firstName",
594
- "variant": "h3",
595
- "icon": "user"
596
- },
597
- {
598
- "name": "lastName",
599
- "variant": "h3"
600
- },
601
- {
602
- "name": "status",
603
- "variant": "badge"
604
- },
605
- {
606
- "name": "dateOfBirth",
607
- "label": "Date of Birth",
608
- "variant": "body",
609
- "format": "date"
610
- },
611
- {
612
- "name": "phone",
613
- "variant": "caption"
614
- },
615
- {
616
- "name": "insuranceId",
617
- "label": "Insurance ID",
618
- "variant": "caption"
619
- }
620
- ],
621
- "variant": "card",
622
- "gap": "sm"
623
- }
624
- ]
625
- }
626
- ]
627
- }
628
- ],
629
- [
630
- "notify",
631
- "Patient deleted successfully"
632
- ]
633
- ]
634
- },
635
- {
636
- "from": "deleting",
637
- "to": "browsing",
638
- "event": "CANCEL",
639
- "effects": [
640
- [
641
- "render-ui",
642
- "modal",
643
- null
644
- ],
645
- [
646
- "fetch",
647
- "Patient"
648
- ],
649
- [
650
- "render-ui",
651
- "main",
652
- {
653
- "type": "dashboard-layout",
654
- "appName": "HealthcareApp",
655
- "navItems": [
656
- {
657
- "label": "Patients",
658
- "href": "/patients",
659
- "icon": "heart"
660
- },
661
- {
662
- "label": "Appointments",
663
- "href": "/appointments",
664
- "icon": "calendar"
665
- },
666
- {
667
- "label": "Intake",
668
- "href": "/intake",
669
- "icon": "layout-list"
670
- },
671
- {
672
- "label": "Prescriptions",
673
- "href": "/prescriptions",
674
- "icon": "pill"
675
- },
676
- {
677
- "label": "Dashboard",
678
- "href": "/dashboard",
679
- "icon": "layout-dashboard"
680
- }
681
- ],
682
- "children": [
683
- {
684
- "type": "stack",
685
- "direction": "vertical",
686
- "gap": "lg",
687
- "className": "max-w-5xl mx-auto w-full",
688
- "children": [
689
- {
690
- "type": "stack",
691
- "direction": "horizontal",
692
- "gap": "md",
693
- "justify": "space-between",
694
- "align": "center",
695
- "children": [
696
- {
697
- "type": "stack",
698
- "direction": "horizontal",
699
- "gap": "sm",
700
- "align": "center",
701
- "children": [
702
- {
703
- "type": "icon",
704
- "name": "users",
705
- "size": "lg"
706
- },
707
- {
708
- "type": "typography",
709
- "content": "Patients",
710
- "variant": "h2"
711
- }
712
- ]
713
- },
714
- {
715
- "type": "stack",
716
- "direction": "horizontal",
717
- "gap": "sm",
718
- "children": [
719
- {
720
- "type": "button",
721
- "label": "Create Patient",
722
- "event": "CREATE",
723
- "variant": "primary",
724
- "icon": "plus"
725
- }
726
- ]
727
- }
728
- ]
729
- },
730
- {
731
- "type": "divider"
732
- },
733
- {
734
- "type": "simple-grid",
735
- "columns": 1,
736
- "children": [
737
- {
738
- "type": "stat-display",
739
- "label": "Total Patients",
740
- "value": [
741
- "array/len",
742
- "@entity"
743
- ],
744
- "icon": "users"
745
- }
746
- ]
747
- },
748
- {
749
- "type": "divider"
750
- },
751
- {
752
- "type": "data-list",
753
- "entity": "Patient",
754
- "emptyIcon": "inbox",
755
- "emptyTitle": "No patients registered",
756
- "emptyDescription": "Register a patient to get started.",
757
- "itemActions": [
758
- {
759
- "label": "View",
760
- "event": "VIEW",
761
- "variant": "ghost",
762
- "size": "sm"
763
- },
764
- {
765
- "label": "Edit",
766
- "event": "EDIT",
767
- "variant": "ghost",
768
- "size": "sm"
769
- },
770
- {
771
- "label": "Delete",
772
- "event": "DELETE",
773
- "variant": "danger",
774
- "size": "sm"
775
- }
776
- ],
777
- "columns": [
778
- {
779
- "name": "firstName",
780
- "variant": "h3",
781
- "icon": "user"
782
- },
783
- {
784
- "name": "lastName",
785
- "variant": "h3"
786
- },
787
- {
788
- "name": "status",
789
- "variant": "badge"
790
- },
791
- {
792
- "name": "dateOfBirth",
793
- "label": "Date of Birth",
794
- "variant": "body",
795
- "format": "date"
796
- },
797
- {
798
- "name": "phone",
799
- "variant": "caption"
800
- },
801
- {
802
- "name": "insuranceId",
803
- "label": "Insurance ID",
804
- "variant": "caption"
805
- }
806
- ],
807
- "variant": "card",
808
- "gap": "sm"
809
- }
810
- ]
811
- }
812
- ]
813
- }
814
- ]
815
- ]
816
- },
817
- {
818
- "from": "deleting",
819
- "to": "browsing",
820
- "event": "CLOSE",
821
- "effects": [
822
- [
823
- "render-ui",
824
- "modal",
825
- null
826
- ],
827
- [
828
- "fetch",
829
- "Patient"
830
- ],
831
- [
832
- "render-ui",
833
- "main",
834
- {
835
- "type": "dashboard-layout",
836
- "appName": "HealthcareApp",
837
- "navItems": [
838
- {
839
- "label": "Patients",
840
- "href": "/patients",
841
- "icon": "heart"
842
- },
843
- {
844
- "label": "Appointments",
845
- "href": "/appointments",
846
- "icon": "calendar"
847
- },
848
- {
849
- "label": "Intake",
850
- "href": "/intake",
851
- "icon": "layout-list"
852
- },
853
- {
854
- "label": "Prescriptions",
855
- "href": "/prescriptions",
856
- "icon": "pill"
857
- },
858
- {
859
- "label": "Dashboard",
860
- "href": "/dashboard",
861
- "icon": "layout-dashboard"
862
- }
863
- ],
864
- "children": [
865
- {
866
- "type": "stack",
867
- "direction": "vertical",
868
- "gap": "lg",
869
- "className": "max-w-5xl mx-auto w-full",
870
- "children": [
871
- {
872
- "type": "stack",
873
- "direction": "horizontal",
874
- "gap": "md",
875
- "justify": "space-between",
876
- "align": "center",
877
- "children": [
878
- {
879
- "type": "stack",
880
- "direction": "horizontal",
881
- "gap": "sm",
882
- "align": "center",
883
- "children": [
884
- {
885
- "type": "icon",
886
- "name": "users",
887
- "size": "lg"
888
- },
889
- {
890
- "type": "typography",
891
- "content": "Patients",
892
- "variant": "h2"
893
- }
894
- ]
895
- },
896
- {
897
- "type": "stack",
898
- "direction": "horizontal",
899
- "gap": "sm",
900
- "children": [
901
- {
902
- "type": "button",
903
- "label": "Create Patient",
904
- "event": "CREATE",
905
- "variant": "primary",
906
- "icon": "plus"
907
- }
908
- ]
909
- }
910
- ]
911
- },
912
- {
913
- "type": "divider"
914
- },
915
- {
916
- "type": "simple-grid",
917
- "columns": 1,
918
- "children": [
919
- {
920
- "type": "stat-display",
921
- "label": "Total Patients",
922
- "value": [
923
- "array/len",
924
- "@entity"
925
- ],
926
- "icon": "users"
927
- }
928
- ]
929
- },
930
- {
931
- "type": "divider"
932
- },
933
- {
934
- "type": "data-list",
935
- "entity": "Patient",
936
- "emptyIcon": "inbox",
937
- "emptyTitle": "No patients registered",
938
- "emptyDescription": "Register a patient to get started.",
939
- "itemActions": [
940
- {
941
- "label": "View",
942
- "event": "VIEW",
943
- "variant": "ghost",
944
- "size": "sm"
945
- },
946
- {
947
- "label": "Edit",
948
- "event": "EDIT",
949
- "variant": "ghost",
950
- "size": "sm"
951
- },
952
- {
953
- "label": "Delete",
954
- "event": "DELETE",
955
- "variant": "danger",
956
- "size": "sm"
957
- }
958
- ],
959
- "columns": [
960
- {
961
- "name": "firstName",
962
- "variant": "h3",
963
- "icon": "user"
964
- },
965
- {
966
- "name": "lastName",
967
- "variant": "h3"
968
- },
969
- {
970
- "name": "status",
971
- "variant": "badge"
972
- },
973
- {
974
- "name": "dateOfBirth",
975
- "label": "Date of Birth",
976
- "variant": "body",
977
- "format": "date"
978
- },
979
- {
980
- "name": "phone",
981
- "variant": "caption"
982
- },
983
- {
984
- "name": "insuranceId",
985
- "label": "Insurance ID",
986
- "variant": "caption"
987
- }
988
- ],
989
- "variant": "card",
990
- "gap": "sm"
991
- }
992
- ]
993
- }
994
- ]
995
- }
996
- ]
997
- ]
998
- }
999
- ]
1000
- }
1001
- },
1002
- {
1003
- "name": "PatientCreate",
1004
- "linkedEntity": "Patient",
1005
- "category": "interaction",
1006
- "emits": [
1007
- {
1008
- "event": "PATIENT_CREATED"
1009
- }
1010
- ],
1011
- "stateMachine": {
1012
- "states": [
1013
- {
1014
- "name": "closed",
1015
- "isInitial": true
1016
- },
1017
- {
1018
- "name": "open"
1019
- }
1020
- ],
1021
- "events": [
1022
- {
1023
- "key": "INIT",
1024
- "name": "Initialize"
1025
- },
1026
- {
1027
- "key": "CREATE",
1028
- "name": "Open"
1029
- },
1030
- {
1031
- "key": "CLOSE",
1032
- "name": "Close"
1033
- },
1034
- {
1035
- "key": "SAVE",
1036
- "name": "Save",
1037
- "payload": [
1038
- {
1039
- "name": "data",
1040
- "type": "object",
1041
- "required": true
1042
- }
1043
- ]
1044
- }
1045
- ],
1046
- "transitions": [
1047
- {
1048
- "from": "closed",
1049
- "to": "closed",
1050
- "event": "INIT",
1051
- "effects": [
1052
- [
1053
- "ref",
1054
- "Patient"
1055
- ]
1056
- ]
1057
- },
1058
- {
1059
- "from": "closed",
1060
- "to": "open",
1061
- "event": "CREATE",
1062
- "effects": [
1063
- [
1064
- "fetch",
1065
- "Patient"
1066
- ],
1067
- [
1068
- "render-ui",
1069
- "modal",
1070
- {
1071
- "type": "stack",
1072
- "direction": "vertical",
1073
- "gap": "md",
1074
- "children": [
1075
- {
1076
- "type": "stack",
1077
- "direction": "horizontal",
1078
- "gap": "sm",
1079
- "children": [
1080
- {
1081
- "type": "icon",
1082
- "name": "plus-circle",
1083
- "size": "md"
1084
- },
1085
- {
1086
- "type": "typography",
1087
- "content": "Create Patient",
1088
- "variant": "h3"
1089
- }
1090
- ]
1091
- },
1092
- {
1093
- "type": "divider"
1094
- },
1095
- {
1096
- "type": "form-section",
1097
- "entity": "Patient",
1098
- "mode": "create",
1099
- "submitEvent": "SAVE",
1100
- "cancelEvent": "CLOSE",
1101
- "fields": [
1102
- "firstName",
1103
- "lastName",
1104
- "dateOfBirth",
1105
- "phone",
1106
- "insuranceId",
1107
- "status"
1108
- ]
1109
- }
1110
- ]
1111
- }
1112
- ]
1113
- ]
1114
- },
1115
- {
1116
- "from": "open",
1117
- "to": "closed",
1118
- "event": "CLOSE",
1119
- "effects": [
1120
- [
1121
- "render-ui",
1122
- "modal",
1123
- null
1124
- ],
1125
- [
1126
- "notify",
1127
- "Cancelled",
1128
- "info"
1129
- ]
1130
- ]
1131
- },
1132
- {
1133
- "from": "open",
1134
- "to": "closed",
1135
- "event": "SAVE",
1136
- "effects": [
1137
- [
1138
- "persist",
1139
- "create",
1140
- "Patient",
1141
- "@payload.data"
1142
- ],
1143
- [
1144
- "render-ui",
1145
- "modal",
1146
- null
1147
- ],
1148
- [
1149
- "emit",
1150
- "PATIENT_CREATED"
1151
- ],
1152
- [
1153
- "notify",
1154
- "Patient created successfully"
1155
- ]
1156
- ]
1157
- }
1158
- ]
1159
- }
1160
- },
1161
- {
1162
- "name": "PatientEdit",
1163
- "linkedEntity": "Patient",
1164
- "category": "interaction",
1165
- "emits": [
1166
- {
1167
- "event": "PATIENT_UPDATED"
1168
- }
1169
- ],
1170
- "stateMachine": {
1171
- "states": [
1172
- {
1173
- "name": "closed",
1174
- "isInitial": true
1175
- },
1176
- {
1177
- "name": "open"
1178
- }
1179
- ],
1180
- "events": [
1181
- {
1182
- "key": "INIT",
1183
- "name": "Initialize"
1184
- },
1185
- {
1186
- "key": "EDIT",
1187
- "name": "Open",
1188
- "payload": [
1189
- {
1190
- "name": "id",
1191
- "type": "string",
1192
- "required": true
1193
- }
1194
- ]
1195
- },
1196
- {
1197
- "key": "CLOSE",
1198
- "name": "Close"
1199
- },
1200
- {
1201
- "key": "SAVE",
1202
- "name": "Save",
1203
- "payload": [
1204
- {
1205
- "name": "data",
1206
- "type": "object",
1207
- "required": true
1208
- }
1209
- ]
1210
- }
1211
- ],
1212
- "transitions": [
1213
- {
1214
- "from": "closed",
1215
- "to": "closed",
1216
- "event": "INIT",
1217
- "effects": [
1218
- [
1219
- "ref",
1220
- "Patient"
1221
- ]
1222
- ]
1223
- },
1224
- {
1225
- "from": "closed",
1226
- "to": "open",
1227
- "event": "EDIT",
1228
- "effects": [
1229
- [
1230
- "fetch",
1231
- "Patient",
1232
- {
1233
- "id": "@payload.id"
1234
- }
1235
- ],
1236
- [
1237
- "render-ui",
1238
- "modal",
1239
- {
1240
- "type": "stack",
1241
- "direction": "vertical",
1242
- "gap": "md",
1243
- "children": [
1244
- {
1245
- "type": "stack",
1246
- "direction": "horizontal",
1247
- "gap": "sm",
1248
- "children": [
1249
- {
1250
- "type": "icon",
1251
- "name": "edit",
1252
- "size": "md"
1253
- },
1254
- {
1255
- "type": "typography",
1256
- "content": "Edit Patient",
1257
- "variant": "h3"
1258
- }
1259
- ]
1260
- },
1261
- {
1262
- "type": "divider"
1263
- },
1264
- {
1265
- "type": "form-section",
1266
- "entity": "Patient",
1267
- "mode": "edit",
1268
- "submitEvent": "SAVE",
1269
- "cancelEvent": "CLOSE",
1270
- "fields": [
1271
- "firstName",
1272
- "lastName",
1273
- "dateOfBirth",
1274
- "phone",
1275
- "insuranceId",
1276
- "status"
1277
- ],
1278
- "entityId": "@entity.id"
1279
- }
1280
- ]
1281
- }
1282
- ]
1283
- ]
1284
- },
1285
- {
1286
- "from": "open",
1287
- "to": "closed",
1288
- "event": "CLOSE",
1289
- "effects": [
1290
- [
1291
- "render-ui",
1292
- "modal",
1293
- null
1294
- ],
1295
- [
1296
- "notify",
1297
- "Cancelled",
1298
- "info"
1299
- ]
1300
- ]
1301
- },
1302
- {
1303
- "from": "open",
1304
- "to": "closed",
1305
- "event": "SAVE",
1306
- "effects": [
1307
- [
1308
- "persist",
1309
- "update",
1310
- "Patient",
1311
- "@payload.data"
1312
- ],
1313
- [
1314
- "render-ui",
1315
- "modal",
1316
- null
1317
- ],
1318
- [
1319
- "emit",
1320
- "PATIENT_UPDATED"
1321
- ],
1322
- [
1323
- "notify",
1324
- "Patient updated successfully"
1325
- ]
1326
- ]
1327
- }
1328
- ]
1329
- }
1330
- },
1331
- {
1332
- "name": "PatientView",
1333
- "linkedEntity": "Patient",
1334
- "category": "interaction",
1335
- "stateMachine": {
1336
- "states": [
1337
- {
1338
- "name": "closed",
1339
- "isInitial": true
1340
- },
1341
- {
1342
- "name": "open"
1343
- }
1344
- ],
1345
- "events": [
1346
- {
1347
- "key": "INIT",
1348
- "name": "Initialize"
1349
- },
1350
- {
1351
- "key": "VIEW",
1352
- "name": "Open",
1353
- "payload": [
1354
- {
1355
- "name": "id",
1356
- "type": "string",
1357
- "required": true
1358
- }
1359
- ]
1360
- },
1361
- {
1362
- "key": "CLOSE",
1363
- "name": "Close"
1364
- }
1365
- ],
1366
- "transitions": [
1367
- {
1368
- "from": "closed",
1369
- "to": "closed",
1370
- "event": "INIT",
1371
- "effects": [
1372
- [
1373
- "ref",
1374
- "Patient"
1375
- ]
1376
- ]
1377
- },
1378
- {
1379
- "from": "closed",
1380
- "to": "open",
1381
- "event": "VIEW",
1382
- "effects": [
1383
- [
1384
- "fetch",
1385
- "Patient",
1386
- {
1387
- "id": "@payload.id"
1388
- }
1389
- ],
1390
- [
1391
- "render-ui",
1392
- "modal",
558
+ "modal",
1393
559
  {
1394
560
  "type": "stack",
1395
561
  "direction": "vertical",
@@ -1399,122 +565,16 @@
1399
565
  "type": "stack",
1400
566
  "direction": "horizontal",
1401
567
  "gap": "sm",
1402
- "align": "center",
1403
568
  "children": [
1404
569
  {
1405
570
  "type": "icon",
1406
- "name": "eye",
571
+ "name": "edit",
1407
572
  "size": "md"
1408
573
  },
1409
574
  {
1410
575
  "type": "typography",
1411
- "variant": "h3",
1412
- "content": "@entity.firstName"
1413
- }
1414
- ]
1415
- },
1416
- {
1417
- "type": "divider"
1418
- },
1419
- {
1420
- "type": "stack",
1421
- "direction": "horizontal",
1422
- "gap": "md",
1423
- "children": [
1424
- {
1425
- "type": "typography",
1426
- "variant": "caption",
1427
- "content": "First Name"
1428
- },
1429
- {
1430
- "type": "typography",
1431
- "variant": "body",
1432
- "content": "@entity.firstName"
1433
- }
1434
- ]
1435
- },
1436
- {
1437
- "type": "stack",
1438
- "direction": "horizontal",
1439
- "gap": "md",
1440
- "children": [
1441
- {
1442
- "type": "typography",
1443
- "variant": "caption",
1444
- "content": "Last Name"
1445
- },
1446
- {
1447
- "type": "typography",
1448
- "variant": "body",
1449
- "content": "@entity.lastName"
1450
- }
1451
- ]
1452
- },
1453
- {
1454
- "type": "stack",
1455
- "direction": "horizontal",
1456
- "gap": "md",
1457
- "children": [
1458
- {
1459
- "type": "typography",
1460
- "variant": "caption",
1461
- "content": "Date Of Birth"
1462
- },
1463
- {
1464
- "type": "typography",
1465
- "variant": "body",
1466
- "content": "@entity.dateOfBirth"
1467
- }
1468
- ]
1469
- },
1470
- {
1471
- "type": "stack",
1472
- "direction": "horizontal",
1473
- "gap": "md",
1474
- "children": [
1475
- {
1476
- "type": "typography",
1477
- "variant": "caption",
1478
- "content": "Phone"
1479
- },
1480
- {
1481
- "type": "typography",
1482
- "variant": "body",
1483
- "content": "@entity.phone"
1484
- }
1485
- ]
1486
- },
1487
- {
1488
- "type": "stack",
1489
- "direction": "horizontal",
1490
- "gap": "md",
1491
- "children": [
1492
- {
1493
- "type": "typography",
1494
- "variant": "caption",
1495
- "content": "Insurance ID"
1496
- },
1497
- {
1498
- "type": "typography",
1499
- "variant": "body",
1500
- "content": "@entity.insuranceId"
1501
- }
1502
- ]
1503
- },
1504
- {
1505
- "type": "stack",
1506
- "direction": "horizontal",
1507
- "gap": "md",
1508
- "children": [
1509
- {
1510
- "type": "typography",
1511
- "variant": "caption",
1512
- "content": "Status"
1513
- },
1514
- {
1515
- "type": "typography",
1516
- "variant": "body",
1517
- "content": "@entity.status"
576
+ "content": "Edit Patient",
577
+ "variant": "h3"
1518
578
  }
1519
579
  ]
1520
580
  },
@@ -1522,25 +582,20 @@
1522
582
  "type": "divider"
1523
583
  },
1524
584
  {
1525
- "type": "stack",
1526
- "direction": "horizontal",
1527
- "gap": "sm",
1528
- "justify": "end",
1529
- "children": [
1530
- {
1531
- "type": "button",
1532
- "label": "Edit",
1533
- "event": "EDIT",
1534
- "variant": "primary",
1535
- "icon": "edit"
1536
- },
1537
- {
1538
- "type": "button",
1539
- "label": "Close",
1540
- "event": "CLOSE",
1541
- "variant": "ghost"
1542
- }
1543
- ]
585
+ "type": "form-section",
586
+ "entity": "Patient",
587
+ "mode": "edit",
588
+ "submitEvent": "SAVE",
589
+ "cancelEvent": "CLOSE",
590
+ "fields": [
591
+ "firstName",
592
+ "lastName",
593
+ "dateOfBirth",
594
+ "phone",
595
+ "insuranceId",
596
+ "status"
597
+ ],
598
+ "entityId": "@entity.id"
1544
599
  }
1545
600
  ]
1546
601
  }
@@ -1563,105 +618,49 @@
1563
618
  "info"
1564
619
  ]
1565
620
  ]
1566
- }
1567
- ]
1568
- }
1569
- }
1570
- ],
1571
- "pages": [
1572
- {
1573
- "name": "PatientsPage",
1574
- "path": "/patients",
1575
- "isInitial": true,
1576
- "traits": [
1577
- {
1578
- "ref": "PatientBrowse"
1579
- },
1580
- {
1581
- "ref": "PatientCreate"
1582
- },
1583
- {
1584
- "ref": "PatientEdit"
1585
- },
1586
- {
1587
- "ref": "PatientView"
1588
- }
1589
- ]
1590
- }
1591
- ]
1592
- },
1593
- {
1594
- "name": "AppointmentOrbital",
1595
- "entity": {
1596
- "name": "Appointment",
1597
- "persistence": "persistent",
1598
- "collection": "appointments",
1599
- "fields": [
1600
- {
1601
- "name": "id",
1602
- "type": "string",
1603
- "required": true
1604
- },
1605
- {
1606
- "name": "patientName",
1607
- "type": "string",
1608
- "required": true
1609
- },
1610
- {
1611
- "name": "doctorName",
1612
- "type": "string",
1613
- "required": true
1614
- },
1615
- {
1616
- "name": "date",
1617
- "type": "date",
1618
- "required": true
1619
- },
1620
- {
1621
- "name": "time",
1622
- "type": "string",
1623
- "required": true
1624
- },
1625
- {
1626
- "name": "reason",
1627
- "type": "string"
1628
- },
1629
- {
1630
- "name": "status",
1631
- "type": "string",
1632
- "default": "scheduled",
1633
- "values": [
1634
- "scheduled",
1635
- "confirmed",
1636
- "completed",
1637
- "cancelled"
621
+ },
622
+ {
623
+ "from": "open",
624
+ "to": "closed",
625
+ "event": "SAVE",
626
+ "effects": [
627
+ [
628
+ "persist",
629
+ "update",
630
+ "Patient",
631
+ "@payload.data"
632
+ ],
633
+ [
634
+ "render-ui",
635
+ "modal",
636
+ null
637
+ ],
638
+ [
639
+ "emit",
640
+ "PATIENT_UPDATED"
641
+ ]
642
+ ]
643
+ }
1638
644
  ]
1639
645
  }
1640
- ]
1641
- },
1642
- "traits": [
646
+ },
1643
647
  {
1644
- "name": "AppointmentBrowse",
1645
- "linkedEntity": "Appointment",
648
+ "name": "PatientView",
649
+ "linkedEntity": "Patient",
1646
650
  "category": "interaction",
1647
- "listens": [
1648
- {
1649
- "event": "APPOINTMENT_CREATED",
1650
- "triggers": "APPOINTMENT_CREATED"
1651
- },
651
+ "emits": [
1652
652
  {
1653
- "event": "APPOINTMENT_UPDATED",
1654
- "triggers": "APPOINTMENT_UPDATED"
653
+ "event": "SAVE"
1655
654
  }
1656
655
  ],
1657
656
  "stateMachine": {
1658
657
  "states": [
1659
658
  {
1660
- "name": "browsing",
659
+ "name": "closed",
1661
660
  "isInitial": true
1662
661
  },
1663
662
  {
1664
- "name": "deleting"
663
+ "name": "open"
1665
664
  }
1666
665
  ],
1667
666
  "events": [
@@ -1669,69 +668,24 @@
1669
668
  "key": "INIT",
1670
669
  "name": "Initialize"
1671
670
  },
1672
- {
1673
- "key": "CREATE",
1674
- "name": "CREATE"
1675
- },
1676
671
  {
1677
672
  "key": "VIEW",
1678
- "name": "VIEW",
1679
- "payload": [
1680
- {
1681
- "name": "id",
1682
- "type": "string",
1683
- "required": true
1684
- },
1685
- {
1686
- "name": "row",
1687
- "type": "object"
1688
- }
1689
- ]
1690
- },
1691
- {
1692
- "key": "EDIT",
1693
- "name": "EDIT",
1694
- "payload": [
1695
- {
1696
- "name": "id",
1697
- "type": "string",
1698
- "required": true
1699
- },
1700
- {
1701
- "name": "row",
1702
- "type": "object"
1703
- }
1704
- ]
1705
- },
1706
- {
1707
- "key": "DELETE",
1708
- "name": "DELETE",
673
+ "name": "Open",
1709
674
  "payload": [
1710
675
  {
1711
676
  "name": "id",
1712
677
  "type": "string",
1713
678
  "required": true
1714
- },
1715
- {
1716
- "name": "row",
1717
- "type": "object"
1718
679
  }
1719
680
  ]
1720
681
  },
1721
682
  {
1722
- "key": "APPOINTMENT_CREATED",
1723
- "name": "APPOINTMENT_CREATED",
1724
- "payload": [
1725
- {
1726
- "name": "data",
1727
- "type": "object",
1728
- "required": true
1729
- }
1730
- ]
683
+ "key": "CLOSE",
684
+ "name": "Close"
1731
685
  },
1732
686
  {
1733
- "key": "APPOINTMENT_UPDATED",
1734
- "name": "APPOINTMENT_UPDATED",
687
+ "key": "SAVE",
688
+ "name": "Save",
1735
689
  "payload": [
1736
690
  {
1737
691
  "name": "data",
@@ -1739,210 +693,28 @@
1739
693
  "required": true
1740
694
  }
1741
695
  ]
1742
- },
1743
- {
1744
- "key": "CONFIRM_DELETE",
1745
- "name": "Confirm Delete"
1746
- },
1747
- {
1748
- "key": "CANCEL",
1749
- "name": "Cancel"
1750
- },
1751
- {
1752
- "key": "CLOSE",
1753
- "name": "Close"
1754
- }
1755
- ],
1756
- "transitions": [
1757
- {
1758
- "from": "browsing",
1759
- "to": "browsing",
1760
- "event": "INIT",
1761
- "effects": [
1762
- [
1763
- "ref",
1764
- "Appointment"
1765
- ],
1766
- [
1767
- "render-ui",
1768
- "main",
1769
- {
1770
- "type": "dashboard-layout",
1771
- "appName": "HealthcareApp",
1772
- "navItems": [
1773
- {
1774
- "label": "Patients",
1775
- "href": "/patients",
1776
- "icon": "heart"
1777
- },
1778
- {
1779
- "label": "Appointments",
1780
- "href": "/appointments",
1781
- "icon": "calendar"
1782
- },
1783
- {
1784
- "label": "Intake",
1785
- "href": "/intake",
1786
- "icon": "layout-list"
1787
- },
1788
- {
1789
- "label": "Prescriptions",
1790
- "href": "/prescriptions",
1791
- "icon": "pill"
1792
- },
1793
- {
1794
- "label": "Dashboard",
1795
- "href": "/dashboard",
1796
- "icon": "layout-dashboard"
1797
- }
1798
- ],
1799
- "children": [
1800
- {
1801
- "type": "stack",
1802
- "direction": "vertical",
1803
- "gap": "lg",
1804
- "className": "max-w-5xl mx-auto w-full",
1805
- "children": [
1806
- {
1807
- "type": "stack",
1808
- "direction": "horizontal",
1809
- "gap": "md",
1810
- "justify": "space-between",
1811
- "align": "center",
1812
- "children": [
1813
- {
1814
- "type": "stack",
1815
- "direction": "horizontal",
1816
- "gap": "sm",
1817
- "align": "center",
1818
- "children": [
1819
- {
1820
- "type": "icon",
1821
- "name": "calendar",
1822
- "size": "lg"
1823
- },
1824
- {
1825
- "type": "typography",
1826
- "content": "Appointments",
1827
- "variant": "h2"
1828
- }
1829
- ]
1830
- },
1831
- {
1832
- "type": "stack",
1833
- "direction": "horizontal",
1834
- "gap": "sm",
1835
- "children": [
1836
- {
1837
- "type": "button",
1838
- "label": "Create Appointment",
1839
- "event": "CREATE",
1840
- "variant": "primary",
1841
- "icon": "plus"
1842
- }
1843
- ]
1844
- }
1845
- ]
1846
- },
1847
- {
1848
- "type": "divider"
1849
- },
1850
- {
1851
- "type": "data-list",
1852
- "entity": "Appointment",
1853
- "emptyIcon": "inbox",
1854
- "emptyTitle": "No appointments scheduled",
1855
- "emptyDescription": "Schedule an appointment to get started.",
1856
- "itemActions": [
1857
- {
1858
- "label": "View",
1859
- "event": "VIEW",
1860
- "variant": "ghost",
1861
- "size": "sm"
1862
- },
1863
- {
1864
- "label": "Edit",
1865
- "event": "EDIT",
1866
- "variant": "ghost",
1867
- "size": "sm"
1868
- },
1869
- {
1870
- "label": "Delete",
1871
- "event": "DELETE",
1872
- "variant": "danger",
1873
- "size": "sm"
1874
- }
1875
- ],
1876
- "columns": [
1877
- {
1878
- "name": "patientName",
1879
- "label": "Patient",
1880
- "variant": "h3",
1881
- "icon": "calendar"
1882
- },
1883
- {
1884
- "name": "status",
1885
- "variant": "badge"
1886
- },
1887
- {
1888
- "name": "doctorName",
1889
- "label": "Doctor",
1890
- "variant": "body"
1891
- },
1892
- {
1893
- "name": "date",
1894
- "variant": "body",
1895
- "format": "date"
1896
- },
1897
- {
1898
- "name": "time",
1899
- "variant": "caption"
1900
- },
1901
- {
1902
- "name": "reason",
1903
- "variant": "caption"
1904
- }
1905
- ],
1906
- "variant": "card",
1907
- "gap": "sm"
1908
- }
1909
- ]
1910
- }
1911
- ]
1912
- }
1913
- ]
1914
- ]
1915
- },
1916
- {
1917
- "from": "browsing",
1918
- "to": "browsing",
1919
- "event": "APPOINTMENT_CREATED",
1920
- "effects": [
1921
- [
1922
- "ref",
1923
- "Appointment"
1924
- ]
1925
- ]
1926
- },
696
+ }
697
+ ],
698
+ "transitions": [
1927
699
  {
1928
- "from": "browsing",
1929
- "to": "browsing",
1930
- "event": "APPOINTMENT_UPDATED",
700
+ "from": "closed",
701
+ "to": "closed",
702
+ "event": "INIT",
1931
703
  "effects": [
1932
704
  [
1933
705
  "ref",
1934
- "Appointment"
706
+ "Patient"
1935
707
  ]
1936
708
  ]
1937
709
  },
1938
710
  {
1939
- "from": "browsing",
1940
- "to": "deleting",
1941
- "event": "DELETE",
711
+ "from": "closed",
712
+ "to": "open",
713
+ "event": "VIEW",
1942
714
  "effects": [
1943
715
  [
1944
716
  "fetch",
1945
- "Appointment",
717
+ "Patient",
1946
718
  {
1947
719
  "id": "@payload.id"
1948
720
  }
@@ -1959,384 +731,318 @@
1959
731
  "type": "stack",
1960
732
  "direction": "horizontal",
1961
733
  "gap": "sm",
734
+ "align": "center",
1962
735
  "children": [
1963
736
  {
1964
737
  "type": "icon",
1965
- "name": "trash-2",
738
+ "name": "eye",
1966
739
  "size": "md"
1967
740
  },
1968
741
  {
1969
742
  "type": "typography",
1970
- "content": "Delete Appointment",
1971
- "variant": "h3"
743
+ "variant": "h3",
744
+ "content": "@entity.firstName"
1972
745
  }
1973
746
  ]
1974
747
  },
1975
748
  {
1976
749
  "type": "divider"
1977
750
  },
1978
- {
1979
- "type": "typography",
1980
- "content": "@entity.patientName",
1981
- "variant": "h4"
1982
- },
1983
- {
1984
- "type": "typography",
1985
- "content": "This action cannot be undone.",
1986
- "variant": "body"
1987
- },
1988
751
  {
1989
752
  "type": "stack",
1990
753
  "direction": "horizontal",
1991
- "gap": "sm",
1992
- "justify": "end",
754
+ "gap": "md",
1993
755
  "children": [
1994
756
  {
1995
- "type": "button",
1996
- "label": "Cancel",
1997
- "event": "CANCEL",
1998
- "variant": "ghost"
757
+ "type": "typography",
758
+ "variant": "caption",
759
+ "content": "First Name"
1999
760
  },
2000
761
  {
2001
- "type": "button",
2002
- "label": "Delete",
2003
- "event": "CONFIRM_DELETE",
2004
- "variant": "danger",
2005
- "icon": "trash"
762
+ "type": "typography",
763
+ "variant": "body",
764
+ "content": "@entity.firstName"
2006
765
  }
2007
766
  ]
2008
- }
2009
- ]
2010
- }
2011
- ]
2012
- ]
2013
- },
2014
- {
2015
- "from": "deleting",
2016
- "to": "browsing",
2017
- "event": "CONFIRM_DELETE",
2018
- "effects": [
2019
- [
2020
- "persist",
2021
- "delete",
2022
- "Appointment",
2023
- "@entity.id"
2024
- ],
2025
- [
2026
- "render-ui",
2027
- "modal",
2028
- null
2029
- ],
2030
- [
2031
- "render-ui",
2032
- "main",
2033
- {
2034
- "type": "dashboard-layout",
2035
- "appName": "HealthcareApp",
2036
- "navItems": [
2037
- {
2038
- "label": "Patients",
2039
- "href": "/patients",
2040
- "icon": "heart"
2041
767
  },
2042
768
  {
2043
- "label": "Appointments",
2044
- "href": "/appointments",
2045
- "icon": "calendar"
769
+ "type": "stack",
770
+ "direction": "horizontal",
771
+ "gap": "md",
772
+ "children": [
773
+ {
774
+ "type": "typography",
775
+ "variant": "caption",
776
+ "content": "Last Name"
777
+ },
778
+ {
779
+ "type": "typography",
780
+ "variant": "body",
781
+ "content": "@entity.lastName"
782
+ }
783
+ ]
2046
784
  },
2047
785
  {
2048
- "label": "Intake",
2049
- "href": "/intake",
2050
- "icon": "layout-list"
786
+ "type": "stack",
787
+ "direction": "horizontal",
788
+ "gap": "md",
789
+ "children": [
790
+ {
791
+ "type": "typography",
792
+ "variant": "caption",
793
+ "content": "Date Of Birth"
794
+ },
795
+ {
796
+ "type": "typography",
797
+ "variant": "body",
798
+ "content": "@entity.dateOfBirth"
799
+ }
800
+ ]
2051
801
  },
2052
802
  {
2053
- "label": "Prescriptions",
2054
- "href": "/prescriptions",
2055
- "icon": "pill"
803
+ "type": "stack",
804
+ "direction": "horizontal",
805
+ "gap": "md",
806
+ "children": [
807
+ {
808
+ "type": "typography",
809
+ "variant": "caption",
810
+ "content": "Phone"
811
+ },
812
+ {
813
+ "type": "typography",
814
+ "variant": "body",
815
+ "content": "@entity.phone"
816
+ }
817
+ ]
2056
818
  },
2057
- {
2058
- "label": "Dashboard",
2059
- "href": "/dashboard",
2060
- "icon": "layout-dashboard"
2061
- }
2062
- ],
2063
- "children": [
2064
819
  {
2065
820
  "type": "stack",
2066
- "direction": "vertical",
2067
- "gap": "lg",
2068
- "className": "max-w-5xl mx-auto w-full",
821
+ "direction": "horizontal",
822
+ "gap": "md",
2069
823
  "children": [
2070
824
  {
2071
- "type": "stack",
2072
- "direction": "horizontal",
2073
- "gap": "md",
2074
- "justify": "space-between",
2075
- "align": "center",
2076
- "children": [
2077
- {
2078
- "type": "stack",
2079
- "direction": "horizontal",
2080
- "gap": "sm",
2081
- "align": "center",
2082
- "children": [
2083
- {
2084
- "type": "icon",
2085
- "name": "calendar",
2086
- "size": "lg"
2087
- },
2088
- {
2089
- "type": "typography",
2090
- "content": "Appointments",
2091
- "variant": "h2"
2092
- }
2093
- ]
2094
- },
2095
- {
2096
- "type": "stack",
2097
- "direction": "horizontal",
2098
- "gap": "sm",
2099
- "children": [
2100
- {
2101
- "type": "button",
2102
- "label": "Create Appointment",
2103
- "event": "CREATE",
2104
- "variant": "primary",
2105
- "icon": "plus"
2106
- }
2107
- ]
2108
- }
2109
- ]
825
+ "type": "typography",
826
+ "variant": "caption",
827
+ "content": "Insurance ID"
2110
828
  },
2111
829
  {
2112
- "type": "divider"
830
+ "type": "typography",
831
+ "variant": "body",
832
+ "content": "@entity.insuranceId"
833
+ }
834
+ ]
835
+ },
836
+ {
837
+ "type": "stack",
838
+ "direction": "horizontal",
839
+ "gap": "md",
840
+ "children": [
841
+ {
842
+ "type": "typography",
843
+ "variant": "caption",
844
+ "content": "Status"
2113
845
  },
2114
846
  {
2115
- "type": "data-list",
2116
- "entity": "Appointment",
2117
- "emptyIcon": "inbox",
2118
- "emptyTitle": "No appointments scheduled",
2119
- "emptyDescription": "Schedule an appointment to get started.",
2120
- "itemActions": [
2121
- {
2122
- "label": "View",
2123
- "event": "VIEW",
2124
- "variant": "ghost",
2125
- "size": "sm"
2126
- },
2127
- {
2128
- "label": "Edit",
2129
- "event": "EDIT",
2130
- "variant": "ghost",
2131
- "size": "sm"
2132
- },
2133
- {
2134
- "label": "Delete",
2135
- "event": "DELETE",
2136
- "variant": "danger",
2137
- "size": "sm"
2138
- }
2139
- ],
2140
- "columns": [
2141
- {
2142
- "name": "patientName",
2143
- "label": "Patient",
2144
- "variant": "h3",
2145
- "icon": "calendar"
2146
- },
2147
- {
2148
- "name": "status",
2149
- "variant": "badge"
2150
- },
2151
- {
2152
- "name": "doctorName",
2153
- "label": "Doctor",
2154
- "variant": "body"
2155
- },
2156
- {
2157
- "name": "date",
2158
- "variant": "body",
2159
- "format": "date"
2160
- },
2161
- {
2162
- "name": "time",
2163
- "variant": "caption"
2164
- },
2165
- {
2166
- "name": "reason",
2167
- "variant": "caption"
2168
- }
2169
- ],
2170
- "variant": "card",
2171
- "gap": "sm"
847
+ "type": "typography",
848
+ "variant": "body",
849
+ "content": "@entity.status"
850
+ }
851
+ ]
852
+ },
853
+ {
854
+ "type": "divider"
855
+ },
856
+ {
857
+ "type": "stack",
858
+ "direction": "horizontal",
859
+ "gap": "sm",
860
+ "justify": "end",
861
+ "children": [
862
+ {
863
+ "type": "button",
864
+ "label": "Edit",
865
+ "event": "EDIT",
866
+ "variant": "primary",
867
+ "icon": "edit"
868
+ },
869
+ {
870
+ "type": "button",
871
+ "label": "Close",
872
+ "event": "CLOSE",
873
+ "variant": "ghost"
2172
874
  }
2173
875
  ]
2174
876
  }
2175
877
  ]
2176
878
  }
879
+ ]
880
+ ]
881
+ },
882
+ {
883
+ "from": "open",
884
+ "to": "closed",
885
+ "event": "CLOSE",
886
+ "effects": [
887
+ [
888
+ "render-ui",
889
+ "modal",
890
+ null
2177
891
  ],
2178
892
  [
2179
893
  "notify",
2180
- "Appointment deleted successfully"
894
+ "Cancelled",
895
+ "info"
2181
896
  ]
2182
897
  ]
2183
898
  },
2184
899
  {
2185
- "from": "deleting",
2186
- "to": "browsing",
2187
- "event": "CANCEL",
900
+ "from": "open",
901
+ "to": "closed",
902
+ "event": "SAVE",
2188
903
  "effects": [
2189
904
  [
2190
905
  "render-ui",
2191
906
  "modal",
2192
907
  null
908
+ ]
909
+ ]
910
+ }
911
+ ]
912
+ }
913
+ },
914
+ {
915
+ "name": "PatientDelete",
916
+ "linkedEntity": "Patient",
917
+ "category": "interaction",
918
+ "emits": [
919
+ {
920
+ "event": "CONFIRM_DELETE"
921
+ },
922
+ {
923
+ "event": "PATIENT_DELETED"
924
+ }
925
+ ],
926
+ "stateMachine": {
927
+ "states": [
928
+ {
929
+ "name": "idle",
930
+ "isInitial": true
931
+ },
932
+ {
933
+ "name": "confirming"
934
+ }
935
+ ],
936
+ "events": [
937
+ {
938
+ "key": "INIT",
939
+ "name": "Initialize"
940
+ },
941
+ {
942
+ "key": "DELETE",
943
+ "name": "Request Confirmation",
944
+ "payload": [
945
+ {
946
+ "name": "id",
947
+ "type": "string",
948
+ "required": true
949
+ }
950
+ ]
951
+ },
952
+ {
953
+ "key": "CONFIRM_DELETE",
954
+ "name": "Confirm"
955
+ },
956
+ {
957
+ "key": "CANCEL",
958
+ "name": "Cancel"
959
+ },
960
+ {
961
+ "key": "CLOSE",
962
+ "name": "Close"
963
+ }
964
+ ],
965
+ "transitions": [
966
+ {
967
+ "from": "idle",
968
+ "to": "idle",
969
+ "event": "INIT",
970
+ "effects": [
971
+ [
972
+ "ref",
973
+ "Patient"
974
+ ]
975
+ ]
976
+ },
977
+ {
978
+ "from": "idle",
979
+ "to": "confirming",
980
+ "event": "DELETE",
981
+ "effects": [
982
+ [
983
+ "set",
984
+ "@entity.pendingId",
985
+ "@payload.id"
2193
986
  ],
2194
987
  [
2195
988
  "fetch",
2196
- "Appointment"
989
+ "Patient",
990
+ {
991
+ "id": "@payload.id"
992
+ }
2197
993
  ],
2198
994
  [
2199
995
  "render-ui",
2200
- "main",
996
+ "modal",
2201
997
  {
2202
- "type": "dashboard-layout",
2203
- "appName": "HealthcareApp",
2204
- "navItems": [
2205
- {
2206
- "label": "Patients",
2207
- "href": "/patients",
2208
- "icon": "heart"
2209
- },
2210
- {
2211
- "label": "Appointments",
2212
- "href": "/appointments",
2213
- "icon": "calendar"
2214
- },
2215
- {
2216
- "label": "Intake",
2217
- "href": "/intake",
2218
- "icon": "layout-list"
2219
- },
2220
- {
2221
- "label": "Prescriptions",
2222
- "href": "/prescriptions",
2223
- "icon": "pill"
2224
- },
2225
- {
2226
- "label": "Dashboard",
2227
- "href": "/dashboard",
2228
- "icon": "layout-dashboard"
2229
- }
2230
- ],
998
+ "type": "stack",
999
+ "direction": "vertical",
1000
+ "gap": "md",
2231
1001
  "children": [
2232
1002
  {
2233
1003
  "type": "stack",
2234
- "direction": "vertical",
2235
- "gap": "lg",
2236
- "className": "max-w-5xl mx-auto w-full",
2237
- "children": [
2238
- {
2239
- "type": "stack",
2240
- "direction": "horizontal",
2241
- "gap": "md",
2242
- "justify": "space-between",
2243
- "align": "center",
2244
- "children": [
2245
- {
2246
- "type": "stack",
2247
- "direction": "horizontal",
2248
- "gap": "sm",
2249
- "align": "center",
2250
- "children": [
2251
- {
2252
- "type": "icon",
2253
- "name": "calendar",
2254
- "size": "lg"
2255
- },
2256
- {
2257
- "type": "typography",
2258
- "content": "Appointments",
2259
- "variant": "h2"
2260
- }
2261
- ]
2262
- },
2263
- {
2264
- "type": "stack",
2265
- "direction": "horizontal",
2266
- "gap": "sm",
2267
- "children": [
2268
- {
2269
- "type": "button",
2270
- "label": "Create Appointment",
2271
- "event": "CREATE",
2272
- "variant": "primary",
2273
- "icon": "plus"
2274
- }
2275
- ]
2276
- }
2277
- ]
2278
- },
2279
- {
2280
- "type": "divider"
2281
- },
2282
- {
2283
- "type": "data-list",
2284
- "entity": "Appointment",
2285
- "emptyIcon": "inbox",
2286
- "emptyTitle": "No appointments scheduled",
2287
- "emptyDescription": "Schedule an appointment to get started.",
2288
- "itemActions": [
2289
- {
2290
- "label": "View",
2291
- "event": "VIEW",
2292
- "variant": "ghost",
2293
- "size": "sm"
2294
- },
2295
- {
2296
- "label": "Edit",
2297
- "event": "EDIT",
2298
- "variant": "ghost",
2299
- "size": "sm"
2300
- },
2301
- {
2302
- "label": "Delete",
2303
- "event": "DELETE",
2304
- "variant": "danger",
2305
- "size": "sm"
2306
- }
2307
- ],
2308
- "columns": [
2309
- {
2310
- "name": "patientName",
2311
- "label": "Patient",
2312
- "variant": "h3",
2313
- "icon": "calendar"
2314
- },
2315
- {
2316
- "name": "status",
2317
- "variant": "badge"
2318
- },
2319
- {
2320
- "name": "doctorName",
2321
- "label": "Doctor",
2322
- "variant": "body"
2323
- },
2324
- {
2325
- "name": "date",
2326
- "variant": "body",
2327
- "format": "date"
2328
- },
2329
- {
2330
- "name": "time",
2331
- "variant": "caption"
2332
- },
2333
- {
2334
- "name": "reason",
2335
- "variant": "caption"
2336
- }
2337
- ],
2338
- "variant": "card",
2339
- "gap": "sm"
1004
+ "direction": "horizontal",
1005
+ "gap": "sm",
1006
+ "align": "center",
1007
+ "children": [
1008
+ {
1009
+ "type": "icon",
1010
+ "name": "alert-triangle",
1011
+ "size": "md"
1012
+ },
1013
+ {
1014
+ "type": "typography",
1015
+ "content": "Delete Patient",
1016
+ "variant": "h3"
1017
+ }
1018
+ ]
1019
+ },
1020
+ {
1021
+ "type": "divider"
1022
+ },
1023
+ {
1024
+ "type": "alert",
1025
+ "variant": "danger",
1026
+ "message": "This action cannot be undone."
1027
+ },
1028
+ {
1029
+ "type": "stack",
1030
+ "direction": "horizontal",
1031
+ "gap": "sm",
1032
+ "justify": "end",
1033
+ "children": [
1034
+ {
1035
+ "type": "button",
1036
+ "label": "Cancel",
1037
+ "event": "CANCEL",
1038
+ "variant": "ghost"
1039
+ },
1040
+ {
1041
+ "type": "button",
1042
+ "label": "Delete",
1043
+ "event": "CONFIRM_DELETE",
1044
+ "variant": "danger",
1045
+ "icon": "check"
2340
1046
  }
2341
1047
  ]
2342
1048
  }
@@ -2346,8 +1052,50 @@
2346
1052
  ]
2347
1053
  },
2348
1054
  {
2349
- "from": "deleting",
2350
- "to": "browsing",
1055
+ "from": "confirming",
1056
+ "to": "idle",
1057
+ "event": "CONFIRM_DELETE",
1058
+ "effects": [
1059
+ [
1060
+ "persist",
1061
+ "delete",
1062
+ "Patient",
1063
+ "@entity.pendingId"
1064
+ ],
1065
+ [
1066
+ "render-ui",
1067
+ "modal",
1068
+ null
1069
+ ],
1070
+ [
1071
+ "ref",
1072
+ "Patient"
1073
+ ],
1074
+ [
1075
+ "emit",
1076
+ "PATIENT_DELETED"
1077
+ ]
1078
+ ]
1079
+ },
1080
+ {
1081
+ "from": "confirming",
1082
+ "to": "idle",
1083
+ "event": "CANCEL",
1084
+ "effects": [
1085
+ [
1086
+ "render-ui",
1087
+ "modal",
1088
+ null
1089
+ ],
1090
+ [
1091
+ "ref",
1092
+ "Patient"
1093
+ ]
1094
+ ]
1095
+ },
1096
+ {
1097
+ "from": "confirming",
1098
+ "to": "idle",
2351
1099
  "event": "CLOSE",
2352
1100
  "effects": [
2353
1101
  [
@@ -2356,7 +1104,178 @@
2356
1104
  null
2357
1105
  ],
2358
1106
  [
2359
- "fetch",
1107
+ "ref",
1108
+ "Patient"
1109
+ ]
1110
+ ]
1111
+ }
1112
+ ]
1113
+ }
1114
+ }
1115
+ ],
1116
+ "pages": [
1117
+ {
1118
+ "name": "PatientsPage",
1119
+ "path": "/patients",
1120
+ "isInitial": true,
1121
+ "traits": [
1122
+ {
1123
+ "ref": "PatientBrowse"
1124
+ },
1125
+ {
1126
+ "ref": "PatientCreate"
1127
+ },
1128
+ {
1129
+ "ref": "PatientEdit"
1130
+ },
1131
+ {
1132
+ "ref": "PatientView"
1133
+ },
1134
+ {
1135
+ "ref": "PatientDelete"
1136
+ }
1137
+ ]
1138
+ }
1139
+ ]
1140
+ },
1141
+ {
1142
+ "name": "AppointmentOrbital",
1143
+ "entity": {
1144
+ "name": "Appointment",
1145
+ "persistence": "persistent",
1146
+ "collection": "appointments",
1147
+ "fields": [
1148
+ {
1149
+ "name": "id",
1150
+ "type": "string",
1151
+ "required": true
1152
+ },
1153
+ {
1154
+ "name": "patientName",
1155
+ "type": "string",
1156
+ "required": true
1157
+ },
1158
+ {
1159
+ "name": "doctorName",
1160
+ "type": "string",
1161
+ "required": true
1162
+ },
1163
+ {
1164
+ "name": "date",
1165
+ "type": "date",
1166
+ "required": true
1167
+ },
1168
+ {
1169
+ "name": "time",
1170
+ "type": "string",
1171
+ "required": true
1172
+ },
1173
+ {
1174
+ "name": "reason",
1175
+ "type": "string"
1176
+ },
1177
+ {
1178
+ "name": "status",
1179
+ "type": "string",
1180
+ "default": "scheduled",
1181
+ "values": [
1182
+ "scheduled",
1183
+ "confirmed",
1184
+ "completed",
1185
+ "cancelled"
1186
+ ]
1187
+ }
1188
+ ]
1189
+ },
1190
+ "traits": [
1191
+ {
1192
+ "name": "AppointmentBrowse",
1193
+ "linkedEntity": "Appointment",
1194
+ "category": "interaction",
1195
+ "listens": [
1196
+ {
1197
+ "event": "APPOINTMENT_CREATED",
1198
+ "triggers": "INIT"
1199
+ },
1200
+ {
1201
+ "event": "APPOINTMENT_UPDATED",
1202
+ "triggers": "INIT"
1203
+ },
1204
+ {
1205
+ "event": "APPOINTMENT_DELETED",
1206
+ "triggers": "INIT"
1207
+ }
1208
+ ],
1209
+ "stateMachine": {
1210
+ "states": [
1211
+ {
1212
+ "name": "browsing",
1213
+ "isInitial": true
1214
+ }
1215
+ ],
1216
+ "events": [
1217
+ {
1218
+ "key": "INIT",
1219
+ "name": "Initialize"
1220
+ },
1221
+ {
1222
+ "key": "CREATE",
1223
+ "name": "CREATE"
1224
+ },
1225
+ {
1226
+ "key": "VIEW",
1227
+ "name": "VIEW",
1228
+ "payload": [
1229
+ {
1230
+ "name": "id",
1231
+ "type": "string",
1232
+ "required": true
1233
+ },
1234
+ {
1235
+ "name": "row",
1236
+ "type": "object"
1237
+ }
1238
+ ]
1239
+ },
1240
+ {
1241
+ "key": "EDIT",
1242
+ "name": "EDIT",
1243
+ "payload": [
1244
+ {
1245
+ "name": "id",
1246
+ "type": "string",
1247
+ "required": true
1248
+ },
1249
+ {
1250
+ "name": "row",
1251
+ "type": "object"
1252
+ }
1253
+ ]
1254
+ },
1255
+ {
1256
+ "key": "DELETE",
1257
+ "name": "DELETE",
1258
+ "payload": [
1259
+ {
1260
+ "name": "id",
1261
+ "type": "string",
1262
+ "required": true
1263
+ },
1264
+ {
1265
+ "name": "row",
1266
+ "type": "object"
1267
+ }
1268
+ ]
1269
+ }
1270
+ ],
1271
+ "transitions": [
1272
+ {
1273
+ "from": "browsing",
1274
+ "to": "browsing",
1275
+ "event": "INIT",
1276
+ "effects": [
1277
+ [
1278
+ "ref",
2360
1279
  "Appointment"
2361
1280
  ],
2362
1281
  [
@@ -2530,6 +1449,9 @@
2530
1449
  "linkedEntity": "Appointment",
2531
1450
  "category": "interaction",
2532
1451
  "emits": [
1452
+ {
1453
+ "event": "SAVE"
1454
+ },
2533
1455
  {
2534
1456
  "event": "APPOINTMENT_CREATED"
2535
1457
  }
@@ -2674,10 +1596,6 @@
2674
1596
  [
2675
1597
  "emit",
2676
1598
  "APPOINTMENT_CREATED"
2677
- ],
2678
- [
2679
- "notify",
2680
- "Appointment created successfully"
2681
1599
  ]
2682
1600
  ]
2683
1601
  }
@@ -2689,6 +1607,9 @@
2689
1607
  "linkedEntity": "Appointment",
2690
1608
  "category": "interaction",
2691
1609
  "emits": [
1610
+ {
1611
+ "event": "SAVE"
1612
+ },
2692
1613
  {
2693
1614
  "event": "APPOINTMENT_UPDATED"
2694
1615
  }
@@ -2844,10 +1765,6 @@
2844
1765
  [
2845
1766
  "emit",
2846
1767
  "APPOINTMENT_UPDATED"
2847
- ],
2848
- [
2849
- "notify",
2850
- "Appointment updated successfully"
2851
1768
  ]
2852
1769
  ]
2853
1770
  }
@@ -2858,6 +1775,11 @@
2858
1775
  "name": "AppointmentView",
2859
1776
  "linkedEntity": "Appointment",
2860
1777
  "category": "interaction",
1778
+ "emits": [
1779
+ {
1780
+ "event": "SAVE"
1781
+ }
1782
+ ],
2861
1783
  "stateMachine": {
2862
1784
  "states": [
2863
1785
  {
@@ -2887,6 +1809,17 @@
2887
1809
  {
2888
1810
  "key": "CLOSE",
2889
1811
  "name": "Close"
1812
+ },
1813
+ {
1814
+ "key": "SAVE",
1815
+ "name": "Save",
1816
+ "payload": [
1817
+ {
1818
+ "name": "data",
1819
+ "type": "object",
1820
+ "required": true
1821
+ }
1822
+ ]
2890
1823
  }
2891
1824
  ],
2892
1825
  "transitions": [
@@ -3089,6 +2022,219 @@
3089
2022
  "info"
3090
2023
  ]
3091
2024
  ]
2025
+ },
2026
+ {
2027
+ "from": "open",
2028
+ "to": "closed",
2029
+ "event": "SAVE",
2030
+ "effects": [
2031
+ [
2032
+ "render-ui",
2033
+ "modal",
2034
+ null
2035
+ ]
2036
+ ]
2037
+ }
2038
+ ]
2039
+ }
2040
+ },
2041
+ {
2042
+ "name": "AppointmentDelete",
2043
+ "linkedEntity": "Appointment",
2044
+ "category": "interaction",
2045
+ "emits": [
2046
+ {
2047
+ "event": "CONFIRM_DELETE"
2048
+ },
2049
+ {
2050
+ "event": "APPOINTMENT_DELETED"
2051
+ }
2052
+ ],
2053
+ "stateMachine": {
2054
+ "states": [
2055
+ {
2056
+ "name": "idle",
2057
+ "isInitial": true
2058
+ },
2059
+ {
2060
+ "name": "confirming"
2061
+ }
2062
+ ],
2063
+ "events": [
2064
+ {
2065
+ "key": "INIT",
2066
+ "name": "Initialize"
2067
+ },
2068
+ {
2069
+ "key": "DELETE",
2070
+ "name": "Request Confirmation",
2071
+ "payload": [
2072
+ {
2073
+ "name": "id",
2074
+ "type": "string",
2075
+ "required": true
2076
+ }
2077
+ ]
2078
+ },
2079
+ {
2080
+ "key": "CONFIRM_DELETE",
2081
+ "name": "Confirm"
2082
+ },
2083
+ {
2084
+ "key": "CANCEL",
2085
+ "name": "Cancel"
2086
+ },
2087
+ {
2088
+ "key": "CLOSE",
2089
+ "name": "Close"
2090
+ }
2091
+ ],
2092
+ "transitions": [
2093
+ {
2094
+ "from": "idle",
2095
+ "to": "idle",
2096
+ "event": "INIT",
2097
+ "effects": [
2098
+ [
2099
+ "ref",
2100
+ "Appointment"
2101
+ ]
2102
+ ]
2103
+ },
2104
+ {
2105
+ "from": "idle",
2106
+ "to": "confirming",
2107
+ "event": "DELETE",
2108
+ "effects": [
2109
+ [
2110
+ "set",
2111
+ "@entity.pendingId",
2112
+ "@payload.id"
2113
+ ],
2114
+ [
2115
+ "fetch",
2116
+ "Appointment",
2117
+ {
2118
+ "id": "@payload.id"
2119
+ }
2120
+ ],
2121
+ [
2122
+ "render-ui",
2123
+ "modal",
2124
+ {
2125
+ "type": "stack",
2126
+ "direction": "vertical",
2127
+ "gap": "md",
2128
+ "children": [
2129
+ {
2130
+ "type": "stack",
2131
+ "direction": "horizontal",
2132
+ "gap": "sm",
2133
+ "align": "center",
2134
+ "children": [
2135
+ {
2136
+ "type": "icon",
2137
+ "name": "alert-triangle",
2138
+ "size": "md"
2139
+ },
2140
+ {
2141
+ "type": "typography",
2142
+ "content": "Delete Appointment",
2143
+ "variant": "h3"
2144
+ }
2145
+ ]
2146
+ },
2147
+ {
2148
+ "type": "divider"
2149
+ },
2150
+ {
2151
+ "type": "alert",
2152
+ "variant": "danger",
2153
+ "message": "This action cannot be undone."
2154
+ },
2155
+ {
2156
+ "type": "stack",
2157
+ "direction": "horizontal",
2158
+ "gap": "sm",
2159
+ "justify": "end",
2160
+ "children": [
2161
+ {
2162
+ "type": "button",
2163
+ "label": "Cancel",
2164
+ "event": "CANCEL",
2165
+ "variant": "ghost"
2166
+ },
2167
+ {
2168
+ "type": "button",
2169
+ "label": "Delete",
2170
+ "event": "CONFIRM_DELETE",
2171
+ "variant": "danger",
2172
+ "icon": "check"
2173
+ }
2174
+ ]
2175
+ }
2176
+ ]
2177
+ }
2178
+ ]
2179
+ ]
2180
+ },
2181
+ {
2182
+ "from": "confirming",
2183
+ "to": "idle",
2184
+ "event": "CONFIRM_DELETE",
2185
+ "effects": [
2186
+ [
2187
+ "persist",
2188
+ "delete",
2189
+ "Appointment",
2190
+ "@entity.pendingId"
2191
+ ],
2192
+ [
2193
+ "render-ui",
2194
+ "modal",
2195
+ null
2196
+ ],
2197
+ [
2198
+ "ref",
2199
+ "Appointment"
2200
+ ],
2201
+ [
2202
+ "emit",
2203
+ "APPOINTMENT_DELETED"
2204
+ ]
2205
+ ]
2206
+ },
2207
+ {
2208
+ "from": "confirming",
2209
+ "to": "idle",
2210
+ "event": "CANCEL",
2211
+ "effects": [
2212
+ [
2213
+ "render-ui",
2214
+ "modal",
2215
+ null
2216
+ ],
2217
+ [
2218
+ "ref",
2219
+ "Appointment"
2220
+ ]
2221
+ ]
2222
+ },
2223
+ {
2224
+ "from": "confirming",
2225
+ "to": "idle",
2226
+ "event": "CLOSE",
2227
+ "effects": [
2228
+ [
2229
+ "render-ui",
2230
+ "modal",
2231
+ null
2232
+ ],
2233
+ [
2234
+ "ref",
2235
+ "Appointment"
2236
+ ]
2237
+ ]
3092
2238
  }
3093
2239
  ]
3094
2240
  }
@@ -3110,6 +2256,9 @@
3110
2256
  },
3111
2257
  {
3112
2258
  "ref": "AppointmentView"
2259
+ },
2260
+ {
2261
+ "ref": "AppointmentDelete"
3113
2262
  }
3114
2263
  ]
3115
2264
  }
@@ -4699,7 +3848,7 @@
4699
3848
  "listens": [
4700
3849
  {
4701
3850
  "event": "SAVE",
4702
- "triggers": "SAVE"
3851
+ "triggers": "INIT"
4703
3852
  },
4704
3853
  {
4705
3854
  "event": "PRESCRIBE",
@@ -4737,17 +3886,6 @@
4737
3886
  "type": "object"
4738
3887
  }
4739
3888
  ]
4740
- },
4741
- {
4742
- "key": "SAVE",
4743
- "name": "SAVE",
4744
- "payload": [
4745
- {
4746
- "name": "data",
4747
- "type": "object",
4748
- "required": true
4749
- }
4750
- ]
4751
3889
  }
4752
3890
  ],
4753
3891
  "transitions": [
@@ -4898,17 +4036,6 @@
4898
4036
  }
4899
4037
  ]
4900
4038
  ]
4901
- },
4902
- {
4903
- "from": "browsing",
4904
- "to": "browsing",
4905
- "event": "SAVE",
4906
- "effects": [
4907
- [
4908
- "ref",
4909
- "Prescription"
4910
- ]
4911
- ]
4912
4039
  }
4913
4040
  ]
4914
4041
  }
@@ -5059,14 +4186,6 @@
5059
4186
  "render-ui",
5060
4187
  "modal",
5061
4188
  null
5062
- ],
5063
- [
5064
- "emit",
5065
- "SAVE"
5066
- ],
5067
- [
5068
- "notify",
5069
- "Prescription created successfully"
5070
4189
  ]
5071
4190
  ]
5072
4191
  }
@@ -5077,6 +4196,11 @@
5077
4196
  "name": "PrescriptionView",
5078
4197
  "linkedEntity": "Prescription",
5079
4198
  "category": "interaction",
4199
+ "emits": [
4200
+ {
4201
+ "event": "SAVE"
4202
+ }
4203
+ ],
5080
4204
  "stateMachine": {
5081
4205
  "states": [
5082
4206
  {
@@ -5106,6 +4230,17 @@
5106
4230
  {
5107
4231
  "key": "CLOSE",
5108
4232
  "name": "Close"
4233
+ },
4234
+ {
4235
+ "key": "SAVE",
4236
+ "name": "Save",
4237
+ "payload": [
4238
+ {
4239
+ "name": "data",
4240
+ "type": "object",
4241
+ "required": true
4242
+ }
4243
+ ]
5109
4244
  }
5110
4245
  ],
5111
4246
  "transitions": [
@@ -5318,6 +4453,18 @@
5318
4453
  "info"
5319
4454
  ]
5320
4455
  ]
4456
+ },
4457
+ {
4458
+ "from": "open",
4459
+ "to": "closed",
4460
+ "event": "SAVE",
4461
+ "effects": [
4462
+ [
4463
+ "render-ui",
4464
+ "modal",
4465
+ null
4466
+ ]
4467
+ ]
5321
4468
  }
5322
4469
  ]
5323
4470
  }
@@ -6812,6 +5959,5 @@
6812
5959
  }
6813
5960
  ]
6814
5961
  }
6815
- ],
6816
- "description": "Healthcare organism. Composes molecules via compose: - stdList(Patient): patient registry with CRUD - stdList(Appointment): appointment management - stdWizard(IntakeForm): patient intake wizard - stdDetail(Prescription): prescription browse + view - stdDisplay(Dashboard): clinic dashboard KPIs Cross-orbital connections: - INTAKE_COMPLETE: IntakeFormWizard -> PatientBrowse - PRESCRIBE: AppointmentBrowse -> PrescriptionBrowse"
6817
- }
5962
+ ]
5963
+ }