@almadar/std 3.2.1 → 3.2.2

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 (262) hide show
  1. package/behaviors/exports/atoms/std-async.orb +41 -24
  2. package/behaviors/exports/atoms/std-browse.orb +12 -5
  3. package/behaviors/exports/atoms/std-cache-aside.orb +256 -42
  4. package/behaviors/exports/atoms/std-circuit-breaker.orb +577 -97
  5. package/behaviors/exports/atoms/std-collision.orb +278 -206
  6. package/behaviors/exports/atoms/std-combat-log.orb +6 -1
  7. package/behaviors/exports/atoms/std-combat.orb +6 -1
  8. package/behaviors/exports/atoms/std-confirmation.orb +212 -7
  9. package/behaviors/exports/atoms/std-dialogue-box.orb +6 -1
  10. package/behaviors/exports/atoms/std-display.orb +166 -21
  11. package/behaviors/exports/atoms/std-drawer.orb +208 -104
  12. package/behaviors/exports/atoms/std-filter.orb +211 -18
  13. package/behaviors/exports/atoms/std-game-audio.orb +6 -1
  14. package/behaviors/exports/atoms/std-game-canvas2d.orb +6 -1
  15. package/behaviors/exports/atoms/std-game-canvas3d.orb +6 -1
  16. package/behaviors/exports/atoms/std-game-hud.orb +6 -1
  17. package/behaviors/exports/atoms/std-game-menu.orb +6 -1
  18. package/behaviors/exports/atoms/std-game-over-screen.orb +6 -1
  19. package/behaviors/exports/atoms/std-gameflow.orb +100 -5
  20. package/behaviors/exports/atoms/std-input.orb +142 -137
  21. package/behaviors/exports/atoms/std-inventory-panel.orb +6 -1
  22. package/behaviors/exports/atoms/std-isometric-canvas.orb +6 -1
  23. package/behaviors/exports/atoms/std-loading.orb +27 -76
  24. package/behaviors/exports/atoms/std-modal.orb +177 -93
  25. package/behaviors/exports/atoms/std-movement.orb +401 -31
  26. package/behaviors/exports/atoms/std-notification.orb +46 -95
  27. package/behaviors/exports/atoms/std-overworld.orb +44 -16
  28. package/behaviors/exports/atoms/std-pagination.orb +26 -89
  29. package/behaviors/exports/atoms/std-physics2d.orb +6 -1
  30. package/behaviors/exports/atoms/std-platformer-canvas.orb +6 -1
  31. package/behaviors/exports/atoms/std-quest.orb +309 -34
  32. package/behaviors/exports/atoms/std-rate-limiter.orb +410 -157
  33. package/behaviors/exports/atoms/std-score-board.orb +6 -1
  34. package/behaviors/exports/atoms/std-score.orb +211 -11
  35. package/behaviors/exports/atoms/std-search.orb +28 -27
  36. package/behaviors/exports/atoms/std-selection.orb +160 -121
  37. package/behaviors/exports/atoms/std-simulation-canvas.orb +6 -1
  38. package/behaviors/exports/atoms/std-sort.orb +134 -24
  39. package/behaviors/exports/atoms/std-sprite.orb +6 -1
  40. package/behaviors/exports/atoms/std-tabs.orb +25 -15
  41. package/behaviors/exports/atoms/std-timer.orb +483 -91
  42. package/behaviors/exports/atoms/std-undo.orb +211 -81
  43. package/behaviors/exports/atoms/std-wizard.orb +31 -34
  44. package/behaviors/exports/molecules/std-builder-game.orb +6 -1
  45. package/behaviors/exports/molecules/std-cart.orb +6 -1
  46. package/behaviors/exports/molecules/std-classifier-game.orb +6 -1
  47. package/behaviors/exports/molecules/std-debugger-game.orb +6 -1
  48. package/behaviors/exports/molecules/std-detail.orb +12 -5
  49. package/behaviors/exports/molecules/std-event-handler-game.orb +6 -1
  50. package/behaviors/exports/molecules/std-geospatial.orb +28 -9
  51. package/behaviors/exports/molecules/std-inventory.orb +28 -9
  52. package/behaviors/exports/molecules/std-list.orb +392 -5
  53. package/behaviors/exports/molecules/std-messaging.orb +12 -5
  54. package/behaviors/exports/molecules/std-negotiator-game.orb +6 -1
  55. package/behaviors/exports/molecules/std-platformer-game.orb +40 -1
  56. package/behaviors/exports/molecules/std-puzzle-game.orb +26 -1
  57. package/behaviors/exports/molecules/std-sequencer-game.orb +6 -1
  58. package/behaviors/exports/molecules/std-simulator-game.orb +6 -1
  59. package/behaviors/exports/molecules/std-turn-based-battle.orb +40 -1
  60. package/behaviors/exports/organisms/std-api-gateway.orb +1145 -403
  61. package/behaviors/exports/organisms/std-arcade-game.orb +94 -4
  62. package/behaviors/exports/organisms/std-booking-system.orb +2165 -1605
  63. package/behaviors/exports/organisms/std-cicd-pipeline.orb +581 -47
  64. package/behaviors/exports/organisms/std-cms.orb +1713 -947
  65. package/behaviors/exports/organisms/std-coding-academy.orb +180 -380
  66. package/behaviors/exports/organisms/std-crm.orb +1669 -1153
  67. package/behaviors/exports/organisms/std-devops-dashboard.orb +1430 -378
  68. package/behaviors/exports/organisms/std-ecommerce.orb +2361 -1601
  69. package/behaviors/exports/organisms/std-finance-tracker.orb +622 -438
  70. package/behaviors/exports/organisms/std-healthcare.orb +1687 -1125
  71. package/behaviors/exports/organisms/std-helpdesk.orb +626 -407
  72. package/behaviors/exports/organisms/std-hr-portal.orb +1309 -714
  73. package/behaviors/exports/organisms/std-iot-dashboard.orb +1247 -335
  74. package/behaviors/exports/organisms/std-lms.orb +658 -362
  75. package/behaviors/exports/organisms/std-platformer-app.orb +56 -8
  76. package/behaviors/exports/organisms/std-project-manager.orb +1697 -1183
  77. package/behaviors/exports/organisms/std-puzzle-app.orb +20 -0
  78. package/behaviors/exports/organisms/std-realtime-chat.orb +552 -28
  79. package/behaviors/exports/organisms/std-rpg-game.orb +397 -56
  80. package/behaviors/exports/organisms/std-social-feed.orb +12 -8
  81. package/behaviors/exports/organisms/std-stem-lab.orb +175 -290
  82. package/behaviors/exports/organisms/std-strategy-game.orb +252 -395
  83. package/behaviors/exports/organisms/std-trading-dashboard.orb +718 -524
  84. package/behaviors/exports/validation-report.json +252 -252
  85. package/behaviors/exports/verify-results.json +13 -0
  86. package/dist/behaviors/exports/atoms/std-async.orb +41 -24
  87. package/dist/behaviors/exports/atoms/std-browse.orb +12 -5
  88. package/dist/behaviors/exports/atoms/std-cache-aside.orb +256 -42
  89. package/dist/behaviors/exports/atoms/std-circuit-breaker.orb +577 -97
  90. package/dist/behaviors/exports/atoms/std-collision.orb +278 -206
  91. package/dist/behaviors/exports/atoms/std-combat-log.orb +6 -1
  92. package/dist/behaviors/exports/atoms/std-combat.orb +6 -1
  93. package/dist/behaviors/exports/atoms/std-confirmation.orb +212 -7
  94. package/dist/behaviors/exports/atoms/std-dialogue-box.orb +6 -1
  95. package/dist/behaviors/exports/atoms/std-display.orb +166 -21
  96. package/dist/behaviors/exports/atoms/std-drawer.orb +208 -104
  97. package/dist/behaviors/exports/atoms/std-filter.orb +211 -18
  98. package/dist/behaviors/exports/atoms/std-game-audio.orb +6 -1
  99. package/dist/behaviors/exports/atoms/std-game-canvas2d.orb +6 -1
  100. package/dist/behaviors/exports/atoms/std-game-canvas3d.orb +6 -1
  101. package/dist/behaviors/exports/atoms/std-game-hud.orb +6 -1
  102. package/dist/behaviors/exports/atoms/std-game-menu.orb +6 -1
  103. package/dist/behaviors/exports/atoms/std-game-over-screen.orb +6 -1
  104. package/dist/behaviors/exports/atoms/std-gameflow.orb +100 -5
  105. package/dist/behaviors/exports/atoms/std-input.orb +142 -137
  106. package/dist/behaviors/exports/atoms/std-inventory-panel.orb +6 -1
  107. package/dist/behaviors/exports/atoms/std-isometric-canvas.orb +6 -1
  108. package/dist/behaviors/exports/atoms/std-loading.orb +27 -76
  109. package/dist/behaviors/exports/atoms/std-modal.orb +177 -93
  110. package/dist/behaviors/exports/atoms/std-movement.orb +401 -31
  111. package/dist/behaviors/exports/atoms/std-notification.orb +46 -95
  112. package/dist/behaviors/exports/atoms/std-overworld.orb +44 -16
  113. package/dist/behaviors/exports/atoms/std-pagination.orb +26 -89
  114. package/dist/behaviors/exports/atoms/std-physics2d.orb +6 -1
  115. package/dist/behaviors/exports/atoms/std-platformer-canvas.orb +6 -1
  116. package/dist/behaviors/exports/atoms/std-quest.orb +309 -34
  117. package/dist/behaviors/exports/atoms/std-rate-limiter.orb +410 -157
  118. package/dist/behaviors/exports/atoms/std-score-board.orb +6 -1
  119. package/dist/behaviors/exports/atoms/std-score.orb +211 -11
  120. package/dist/behaviors/exports/atoms/std-search.orb +28 -27
  121. package/dist/behaviors/exports/atoms/std-selection.orb +160 -121
  122. package/dist/behaviors/exports/atoms/std-simulation-canvas.orb +6 -1
  123. package/dist/behaviors/exports/atoms/std-sort.orb +134 -24
  124. package/dist/behaviors/exports/atoms/std-sprite.orb +6 -1
  125. package/dist/behaviors/exports/atoms/std-tabs.orb +25 -15
  126. package/dist/behaviors/exports/atoms/std-timer.orb +483 -91
  127. package/dist/behaviors/exports/atoms/std-undo.orb +211 -81
  128. package/dist/behaviors/exports/atoms/std-wizard.orb +31 -34
  129. package/dist/behaviors/exports/molecules/std-builder-game.orb +6 -1
  130. package/dist/behaviors/exports/molecules/std-cart.orb +6 -1
  131. package/dist/behaviors/exports/molecules/std-classifier-game.orb +6 -1
  132. package/dist/behaviors/exports/molecules/std-debugger-game.orb +6 -1
  133. package/dist/behaviors/exports/molecules/std-detail.orb +12 -5
  134. package/dist/behaviors/exports/molecules/std-event-handler-game.orb +6 -1
  135. package/dist/behaviors/exports/molecules/std-geospatial.orb +28 -9
  136. package/dist/behaviors/exports/molecules/std-inventory.orb +28 -9
  137. package/dist/behaviors/exports/molecules/std-list.orb +392 -5
  138. package/dist/behaviors/exports/molecules/std-messaging.orb +12 -5
  139. package/dist/behaviors/exports/molecules/std-negotiator-game.orb +6 -1
  140. package/dist/behaviors/exports/molecules/std-platformer-game.orb +40 -1
  141. package/dist/behaviors/exports/molecules/std-puzzle-game.orb +26 -1
  142. package/dist/behaviors/exports/molecules/std-sequencer-game.orb +6 -1
  143. package/dist/behaviors/exports/molecules/std-simulator-game.orb +6 -1
  144. package/dist/behaviors/exports/molecules/std-turn-based-battle.orb +40 -1
  145. package/dist/behaviors/exports/organisms/std-api-gateway.orb +1145 -403
  146. package/dist/behaviors/exports/organisms/std-arcade-game.orb +94 -4
  147. package/dist/behaviors/exports/organisms/std-booking-system.orb +2165 -1605
  148. package/dist/behaviors/exports/organisms/std-cicd-pipeline.orb +581 -47
  149. package/dist/behaviors/exports/organisms/std-cms.orb +1713 -947
  150. package/dist/behaviors/exports/organisms/std-coding-academy.orb +180 -380
  151. package/dist/behaviors/exports/organisms/std-crm.orb +1669 -1153
  152. package/dist/behaviors/exports/organisms/std-devops-dashboard.orb +1430 -378
  153. package/dist/behaviors/exports/organisms/std-ecommerce.orb +2361 -1601
  154. package/dist/behaviors/exports/organisms/std-finance-tracker.orb +622 -438
  155. package/dist/behaviors/exports/organisms/std-healthcare.orb +1687 -1125
  156. package/dist/behaviors/exports/organisms/std-helpdesk.orb +626 -407
  157. package/dist/behaviors/exports/organisms/std-hr-portal.orb +1309 -714
  158. package/dist/behaviors/exports/organisms/std-iot-dashboard.orb +1247 -335
  159. package/dist/behaviors/exports/organisms/std-lms.orb +658 -362
  160. package/dist/behaviors/exports/organisms/std-platformer-app.orb +56 -8
  161. package/dist/behaviors/exports/organisms/std-project-manager.orb +1697 -1183
  162. package/dist/behaviors/exports/organisms/std-puzzle-app.orb +20 -0
  163. package/dist/behaviors/exports/organisms/std-realtime-chat.orb +552 -28
  164. package/dist/behaviors/exports/organisms/std-rpg-game.orb +397 -56
  165. package/dist/behaviors/exports/organisms/std-social-feed.orb +12 -8
  166. package/dist/behaviors/exports/organisms/std-stem-lab.orb +175 -290
  167. package/dist/behaviors/exports/organisms/std-strategy-game.orb +252 -395
  168. package/dist/behaviors/exports/organisms/std-trading-dashboard.orb +718 -524
  169. package/dist/behaviors/exports/validation-report.json +252 -252
  170. package/dist/behaviors/exports/verify-results.json +13 -0
  171. package/dist/behaviors/functions/index.js +715 -593
  172. package/dist/behaviors/functions/index.js.map +1 -1
  173. package/dist/behaviors/index.js +715 -593
  174. package/dist/behaviors/index.js.map +1 -1
  175. package/dist/exports/atoms/std-async.orb +41 -24
  176. package/dist/exports/atoms/std-browse.orb +12 -5
  177. package/dist/exports/atoms/std-cache-aside.orb +256 -42
  178. package/dist/exports/atoms/std-circuit-breaker.orb +577 -97
  179. package/dist/exports/atoms/std-collision.orb +278 -206
  180. package/dist/exports/atoms/std-combat-log.orb +6 -1
  181. package/dist/exports/atoms/std-combat.orb +6 -1
  182. package/dist/exports/atoms/std-confirmation.orb +212 -7
  183. package/dist/exports/atoms/std-dialogue-box.orb +6 -1
  184. package/dist/exports/atoms/std-display.orb +166 -21
  185. package/dist/exports/atoms/std-drawer.orb +208 -104
  186. package/dist/exports/atoms/std-filter.orb +211 -18
  187. package/dist/exports/atoms/std-game-audio.orb +6 -1
  188. package/dist/exports/atoms/std-game-canvas2d.orb +6 -1
  189. package/dist/exports/atoms/std-game-canvas3d.orb +6 -1
  190. package/dist/exports/atoms/std-game-hud.orb +6 -1
  191. package/dist/exports/atoms/std-game-menu.orb +6 -1
  192. package/dist/exports/atoms/std-game-over-screen.orb +6 -1
  193. package/dist/exports/atoms/std-gameflow.orb +100 -5
  194. package/dist/exports/atoms/std-input.orb +142 -137
  195. package/dist/exports/atoms/std-inventory-panel.orb +6 -1
  196. package/dist/exports/atoms/std-isometric-canvas.orb +6 -1
  197. package/dist/exports/atoms/std-loading.orb +27 -76
  198. package/dist/exports/atoms/std-modal.orb +177 -93
  199. package/dist/exports/atoms/std-movement.orb +401 -31
  200. package/dist/exports/atoms/std-notification.orb +46 -95
  201. package/dist/exports/atoms/std-overworld.orb +44 -16
  202. package/dist/exports/atoms/std-pagination.orb +26 -89
  203. package/dist/exports/atoms/std-physics2d.orb +6 -1
  204. package/dist/exports/atoms/std-platformer-canvas.orb +6 -1
  205. package/dist/exports/atoms/std-quest.orb +309 -34
  206. package/dist/exports/atoms/std-rate-limiter.orb +410 -157
  207. package/dist/exports/atoms/std-score-board.orb +6 -1
  208. package/dist/exports/atoms/std-score.orb +211 -11
  209. package/dist/exports/atoms/std-search.orb +28 -27
  210. package/dist/exports/atoms/std-selection.orb +160 -121
  211. package/dist/exports/atoms/std-simulation-canvas.orb +6 -1
  212. package/dist/exports/atoms/std-sort.orb +134 -24
  213. package/dist/exports/atoms/std-sprite.orb +6 -1
  214. package/dist/exports/atoms/std-tabs.orb +25 -15
  215. package/dist/exports/atoms/std-timer.orb +483 -91
  216. package/dist/exports/atoms/std-undo.orb +211 -81
  217. package/dist/exports/atoms/std-wizard.orb +31 -34
  218. package/dist/exports/molecules/std-builder-game.orb +6 -1
  219. package/dist/exports/molecules/std-cart.orb +6 -1
  220. package/dist/exports/molecules/std-classifier-game.orb +6 -1
  221. package/dist/exports/molecules/std-debugger-game.orb +6 -1
  222. package/dist/exports/molecules/std-detail.orb +12 -5
  223. package/dist/exports/molecules/std-event-handler-game.orb +6 -1
  224. package/dist/exports/molecules/std-geospatial.orb +28 -9
  225. package/dist/exports/molecules/std-inventory.orb +28 -9
  226. package/dist/exports/molecules/std-list.orb +392 -5
  227. package/dist/exports/molecules/std-messaging.orb +12 -5
  228. package/dist/exports/molecules/std-negotiator-game.orb +6 -1
  229. package/dist/exports/molecules/std-platformer-game.orb +40 -1
  230. package/dist/exports/molecules/std-puzzle-game.orb +26 -1
  231. package/dist/exports/molecules/std-sequencer-game.orb +6 -1
  232. package/dist/exports/molecules/std-simulator-game.orb +6 -1
  233. package/dist/exports/molecules/std-turn-based-battle.orb +40 -1
  234. package/dist/exports/organisms/std-api-gateway.orb +1145 -403
  235. package/dist/exports/organisms/std-arcade-game.orb +94 -4
  236. package/dist/exports/organisms/std-booking-system.orb +2165 -1605
  237. package/dist/exports/organisms/std-cicd-pipeline.orb +581 -47
  238. package/dist/exports/organisms/std-cms.orb +1713 -947
  239. package/dist/exports/organisms/std-coding-academy.orb +180 -380
  240. package/dist/exports/organisms/std-crm.orb +1669 -1153
  241. package/dist/exports/organisms/std-devops-dashboard.orb +1430 -378
  242. package/dist/exports/organisms/std-ecommerce.orb +2361 -1601
  243. package/dist/exports/organisms/std-finance-tracker.orb +622 -438
  244. package/dist/exports/organisms/std-healthcare.orb +1687 -1125
  245. package/dist/exports/organisms/std-helpdesk.orb +626 -407
  246. package/dist/exports/organisms/std-hr-portal.orb +1309 -714
  247. package/dist/exports/organisms/std-iot-dashboard.orb +1247 -335
  248. package/dist/exports/organisms/std-lms.orb +658 -362
  249. package/dist/exports/organisms/std-platformer-app.orb +56 -8
  250. package/dist/exports/organisms/std-project-manager.orb +1697 -1183
  251. package/dist/exports/organisms/std-puzzle-app.orb +20 -0
  252. package/dist/exports/organisms/std-realtime-chat.orb +552 -28
  253. package/dist/exports/organisms/std-rpg-game.orb +397 -56
  254. package/dist/exports/organisms/std-social-feed.orb +12 -8
  255. package/dist/exports/organisms/std-stem-lab.orb +175 -290
  256. package/dist/exports/organisms/std-strategy-game.orb +252 -395
  257. package/dist/exports/organisms/std-trading-dashboard.orb +718 -524
  258. package/dist/exports/validation-report.json +252 -252
  259. package/dist/exports/verify-results.json +13 -0
  260. package/dist/index.js +715 -593
  261. package/dist/index.js.map +1 -1
  262. package/package.json +1 -1
@@ -234,7 +234,9 @@
234
234
  }
235
235
  ],
236
236
  "className": "transition-shadow hover:shadow-md cursor-pointer",
237
- "children": [
237
+ "renderItem": [
238
+ "fn",
239
+ "item",
238
240
  {
239
241
  "type": "stack",
240
242
  "direction": "vertical",
@@ -260,13 +262,13 @@
260
262
  {
261
263
  "type": "typography",
262
264
  "variant": "h4",
263
- "content": "@entity.firstName"
265
+ "content": "@item.firstName"
264
266
  }
265
267
  ]
266
268
  },
267
269
  {
268
270
  "type": "badge",
269
- "label": "@entity.lastName"
271
+ "label": "@item.lastName"
270
272
  }
271
273
  ]
272
274
  },
@@ -274,7 +276,7 @@
274
276
  "type": "typography",
275
277
  "variant": "caption",
276
278
  "color": "muted",
277
- "content": "@entity.dateOfBirth"
279
+ "content": "@item.dateOfBirth"
278
280
  }
279
281
  ]
280
282
  }
@@ -392,130 +394,55 @@
392
394
  "modal",
393
395
  null
394
396
  ],
395
- [
396
- "fetch",
397
- "Patient"
398
- ],
399
- [
400
- "notify",
401
- "Patient deleted successfully"
402
- ]
403
- ]
404
- },
405
- {
406
- "from": "deleting",
407
- "to": "browsing",
408
- "event": "CANCEL",
409
- "effects": [
410
- [
411
- "render-ui",
412
- "modal",
413
- null
414
- ]
415
- ]
416
- },
417
- {
418
- "from": "deleting",
419
- "to": "browsing",
420
- "event": "CLOSE",
421
- "effects": [
422
- [
423
- "render-ui",
424
- "modal",
425
- null
426
- ]
427
- ]
428
- }
429
- ]
430
- }
431
- },
432
- {
433
- "name": "PatientCreate",
434
- "linkedEntity": "Patient",
435
- "category": "interaction",
436
- "emits": [
437
- {
438
- "event": "PATIENT_CREATED"
439
- }
440
- ],
441
- "stateMachine": {
442
- "states": [
443
- {
444
- "name": "closed",
445
- "isInitial": true
446
- },
447
- {
448
- "name": "open"
449
- }
450
- ],
451
- "events": [
452
- {
453
- "key": "INIT",
454
- "name": "Initialize"
455
- },
456
- {
457
- "key": "CREATE",
458
- "name": "Open"
459
- },
460
- {
461
- "key": "CLOSE",
462
- "name": "Close"
463
- },
464
- {
465
- "key": "SAVE",
466
- "name": "Save",
467
- "payload": [
468
- {
469
- "name": "data",
470
- "type": "object",
471
- "required": true
472
- }
473
- ]
474
- }
475
- ],
476
- "transitions": [
477
- {
478
- "from": "closed",
479
- "to": "closed",
480
- "event": "INIT",
481
- "effects": [
482
- [
483
- "fetch",
484
- "Patient"
485
- ]
486
- ]
487
- },
488
- {
489
- "from": "closed",
490
- "to": "open",
491
- "event": "CREATE",
492
- "effects": [
493
397
  [
494
398
  "fetch",
495
399
  "Patient"
496
400
  ],
497
401
  [
498
402
  "render-ui",
499
- "modal",
403
+ "main",
500
404
  {
501
405
  "type": "stack",
502
406
  "direction": "vertical",
503
- "gap": "md",
407
+ "gap": "lg",
504
408
  "children": [
505
409
  {
506
410
  "type": "stack",
507
411
  "direction": "horizontal",
508
- "gap": "sm",
412
+ "gap": "md",
413
+ "justify": "space-between",
509
414
  "children": [
510
415
  {
511
- "type": "icon",
512
- "name": "plus-circle",
513
- "size": "md"
416
+ "type": "stack",
417
+ "direction": "horizontal",
418
+ "gap": "sm",
419
+ "align": "center",
420
+ "children": [
421
+ {
422
+ "type": "icon",
423
+ "name": "users",
424
+ "size": "lg"
425
+ },
426
+ {
427
+ "type": "typography",
428
+ "content": "Patients",
429
+ "variant": "h2"
430
+ }
431
+ ]
514
432
  },
515
433
  {
516
- "type": "typography",
517
- "content": "Create Patient",
518
- "variant": "h3"
434
+ "type": "stack",
435
+ "direction": "horizontal",
436
+ "gap": "sm",
437
+ "children": [
438
+ {
439
+ "type": "button",
440
+ "label": "Create Patient",
441
+ "event": "CREATE",
442
+ "variant": "primary",
443
+ "icon": "plus"
444
+ }
445
+ ]
519
446
  }
520
447
  ]
521
448
  },
@@ -523,47 +450,93 @@
523
450
  "type": "divider"
524
451
  },
525
452
  {
526
- "type": "form-section",
453
+ "type": "data-grid",
527
454
  "entity": "Patient",
528
- "mode": "create",
529
- "submitEvent": "SAVE",
530
- "cancelEvent": "CLOSE",
531
- "fields": [
532
- "firstName",
533
- "lastName",
534
- "dateOfBirth",
535
- "phone",
536
- "insuranceId",
537
- "status"
455
+ "emptyIcon": "inbox",
456
+ "emptyTitle": "No patients yet",
457
+ "emptyDescription": "Create your first patient to get started.",
458
+ "itemActions": [
459
+ {
460
+ "label": "View",
461
+ "event": "VIEW"
462
+ },
463
+ {
464
+ "label": "Edit",
465
+ "event": "EDIT"
466
+ },
467
+ {
468
+ "label": "Delete",
469
+ "event": "DELETE",
470
+ "variant": "danger"
471
+ }
472
+ ],
473
+ "className": "transition-shadow hover:shadow-md cursor-pointer",
474
+ "renderItem": [
475
+ "fn",
476
+ "item",
477
+ {
478
+ "type": "stack",
479
+ "direction": "vertical",
480
+ "gap": "sm",
481
+ "children": [
482
+ {
483
+ "type": "stack",
484
+ "direction": "horizontal",
485
+ "justify": "space-between",
486
+ "align": "center",
487
+ "children": [
488
+ {
489
+ "type": "stack",
490
+ "direction": "horizontal",
491
+ "gap": "sm",
492
+ "align": "center",
493
+ "children": [
494
+ {
495
+ "type": "icon",
496
+ "name": "users",
497
+ "size": "sm"
498
+ },
499
+ {
500
+ "type": "typography",
501
+ "variant": "h4",
502
+ "content": "@item.firstName"
503
+ }
504
+ ]
505
+ },
506
+ {
507
+ "type": "badge",
508
+ "label": "@item.lastName"
509
+ }
510
+ ]
511
+ },
512
+ {
513
+ "type": "typography",
514
+ "variant": "caption",
515
+ "color": "muted",
516
+ "content": "@item.dateOfBirth"
517
+ }
518
+ ]
519
+ }
538
520
  ]
539
521
  }
540
522
  ]
541
523
  }
524
+ ],
525
+ [
526
+ "notify",
527
+ "Patient deleted successfully"
542
528
  ]
543
529
  ]
544
530
  },
545
531
  {
546
- "from": "open",
547
- "to": "closed",
548
- "event": "CLOSE",
532
+ "from": "deleting",
533
+ "to": "browsing",
534
+ "event": "CANCEL",
549
535
  "effects": [
550
536
  [
551
537
  "render-ui",
552
538
  "modal",
553
539
  null
554
- ]
555
- ]
556
- },
557
- {
558
- "from": "open",
559
- "to": "closed",
560
- "event": "SAVE",
561
- "effects": [
562
- [
563
- "persist",
564
- "create",
565
- "Patient",
566
- "@payload.data"
567
540
  ],
568
541
  [
569
542
  "fetch",
@@ -571,117 +544,49 @@
571
544
  ],
572
545
  [
573
546
  "render-ui",
574
- "modal",
575
- null
576
- ],
577
- [
578
- "emit",
579
- "PATIENT_CREATED"
580
- ],
581
- [
582
- "notify",
583
- "Patient created successfully"
584
- ]
585
- ]
586
- }
587
- ]
588
- }
589
- },
590
- {
591
- "name": "PatientEdit",
592
- "linkedEntity": "Patient",
593
- "category": "interaction",
594
- "emits": [
595
- {
596
- "event": "PATIENT_UPDATED"
597
- }
598
- ],
599
- "stateMachine": {
600
- "states": [
601
- {
602
- "name": "closed",
603
- "isInitial": true
604
- },
605
- {
606
- "name": "open"
607
- }
608
- ],
609
- "events": [
610
- {
611
- "key": "INIT",
612
- "name": "Initialize"
613
- },
614
- {
615
- "key": "EDIT",
616
- "name": "Open",
617
- "payload": [
618
- {
619
- "name": "id",
620
- "type": "string",
621
- "required": true
622
- }
623
- ]
624
- },
625
- {
626
- "key": "CLOSE",
627
- "name": "Close"
628
- },
629
- {
630
- "key": "SAVE",
631
- "name": "Save",
632
- "payload": [
633
- {
634
- "name": "data",
635
- "type": "object",
636
- "required": true
637
- }
638
- ]
639
- }
640
- ],
641
- "transitions": [
642
- {
643
- "from": "closed",
644
- "to": "closed",
645
- "event": "INIT",
646
- "effects": [
647
- [
648
- "fetch",
649
- "Patient"
650
- ]
651
- ]
652
- },
653
- {
654
- "from": "closed",
655
- "to": "open",
656
- "event": "EDIT",
657
- "effects": [
658
- [
659
- "fetch",
660
- "Patient",
661
- "@payload.id"
662
- ],
663
- [
664
- "render-ui",
665
- "modal",
547
+ "main",
666
548
  {
667
549
  "type": "stack",
668
550
  "direction": "vertical",
669
- "gap": "md",
551
+ "gap": "lg",
670
552
  "children": [
671
553
  {
672
554
  "type": "stack",
673
555
  "direction": "horizontal",
674
- "gap": "sm",
556
+ "gap": "md",
557
+ "justify": "space-between",
675
558
  "children": [
676
559
  {
677
- "type": "icon",
678
- "name": "edit",
679
- "size": "md"
560
+ "type": "stack",
561
+ "direction": "horizontal",
562
+ "gap": "sm",
563
+ "align": "center",
564
+ "children": [
565
+ {
566
+ "type": "icon",
567
+ "name": "users",
568
+ "size": "lg"
569
+ },
570
+ {
571
+ "type": "typography",
572
+ "content": "Patients",
573
+ "variant": "h2"
574
+ }
575
+ ]
680
576
  },
681
577
  {
682
- "type": "typography",
683
- "content": "Edit Patient",
684
- "variant": "h3"
578
+ "type": "stack",
579
+ "direction": "horizontal",
580
+ "gap": "sm",
581
+ "children": [
582
+ {
583
+ "type": "button",
584
+ "label": "Create Patient",
585
+ "event": "CREATE",
586
+ "variant": "primary",
587
+ "icon": "plus"
588
+ }
589
+ ]
685
590
  }
686
591
  ]
687
592
  },
@@ -689,20 +594,74 @@
689
594
  "type": "divider"
690
595
  },
691
596
  {
692
- "type": "form-section",
597
+ "type": "data-grid",
693
598
  "entity": "Patient",
694
- "mode": "edit",
695
- "submitEvent": "SAVE",
696
- "cancelEvent": "CLOSE",
697
- "fields": [
698
- "firstName",
699
- "lastName",
700
- "dateOfBirth",
701
- "phone",
702
- "insuranceId",
703
- "status"
599
+ "emptyIcon": "inbox",
600
+ "emptyTitle": "No patients yet",
601
+ "emptyDescription": "Create your first patient to get started.",
602
+ "itemActions": [
603
+ {
604
+ "label": "View",
605
+ "event": "VIEW"
606
+ },
607
+ {
608
+ "label": "Edit",
609
+ "event": "EDIT"
610
+ },
611
+ {
612
+ "label": "Delete",
613
+ "event": "DELETE",
614
+ "variant": "danger"
615
+ }
704
616
  ],
705
- "entityId": "@entity.id"
617
+ "className": "transition-shadow hover:shadow-md cursor-pointer",
618
+ "renderItem": [
619
+ "fn",
620
+ "item",
621
+ {
622
+ "type": "stack",
623
+ "direction": "vertical",
624
+ "gap": "sm",
625
+ "children": [
626
+ {
627
+ "type": "stack",
628
+ "direction": "horizontal",
629
+ "justify": "space-between",
630
+ "align": "center",
631
+ "children": [
632
+ {
633
+ "type": "stack",
634
+ "direction": "horizontal",
635
+ "gap": "sm",
636
+ "align": "center",
637
+ "children": [
638
+ {
639
+ "type": "icon",
640
+ "name": "users",
641
+ "size": "sm"
642
+ },
643
+ {
644
+ "type": "typography",
645
+ "variant": "h4",
646
+ "content": "@item.firstName"
647
+ }
648
+ ]
649
+ },
650
+ {
651
+ "type": "badge",
652
+ "label": "@item.lastName"
653
+ }
654
+ ]
655
+ },
656
+ {
657
+ "type": "typography",
658
+ "variant": "caption",
659
+ "color": "muted",
660
+ "content": "@item.dateOfBirth"
661
+ }
662
+ ]
663
+ }
664
+ ]
706
665
  }
707
666
  ]
708
667
  }
@@ -710,27 +669,14 @@
710
669
  ]
711
670
  },
712
671
  {
713
- "from": "open",
714
- "to": "closed",
672
+ "from": "deleting",
673
+ "to": "browsing",
715
674
  "event": "CLOSE",
716
675
  "effects": [
717
676
  [
718
677
  "render-ui",
719
678
  "modal",
720
679
  null
721
- ]
722
- ]
723
- },
724
- {
725
- "from": "open",
726
- "to": "closed",
727
- "event": "SAVE",
728
- "effects": [
729
- [
730
- "persist",
731
- "update",
732
- "Patient",
733
- "@payload.data"
734
680
  ],
735
681
  [
736
682
  "fetch",
@@ -738,63 +684,183 @@
738
684
  ],
739
685
  [
740
686
  "render-ui",
741
- "modal",
742
- null
743
- ],
744
- [
745
- "emit",
746
- "PATIENT_UPDATED"
747
- ],
748
- [
749
- "notify",
750
- "Patient updated successfully"
751
- ]
752
- ]
753
- }
754
- ]
755
- }
756
- },
757
- {
758
- "name": "PatientView",
759
- "linkedEntity": "Patient",
760
- "category": "interaction",
761
- "stateMachine": {
762
- "states": [
763
- {
764
- "name": "closed",
765
- "isInitial": true
766
- },
767
- {
768
- "name": "open"
769
- }
770
- ],
771
- "events": [
772
- {
773
- "key": "INIT",
774
- "name": "Initialize"
775
- },
776
- {
777
- "key": "VIEW",
778
- "name": "Open",
779
- "payload": [
780
- {
781
- "name": "id",
782
- "type": "string",
783
- "required": true
784
- }
785
- ]
786
- },
787
- {
788
- "key": "CLOSE",
789
- "name": "Close"
790
- }
791
- ],
792
- "transitions": [
793
- {
794
- "from": "closed",
795
- "to": "closed",
796
- "event": "INIT",
797
- "effects": [
687
+ "main",
688
+ {
689
+ "type": "stack",
690
+ "direction": "vertical",
691
+ "gap": "lg",
692
+ "children": [
693
+ {
694
+ "type": "stack",
695
+ "direction": "horizontal",
696
+ "gap": "md",
697
+ "justify": "space-between",
698
+ "children": [
699
+ {
700
+ "type": "stack",
701
+ "direction": "horizontal",
702
+ "gap": "sm",
703
+ "align": "center",
704
+ "children": [
705
+ {
706
+ "type": "icon",
707
+ "name": "users",
708
+ "size": "lg"
709
+ },
710
+ {
711
+ "type": "typography",
712
+ "content": "Patients",
713
+ "variant": "h2"
714
+ }
715
+ ]
716
+ },
717
+ {
718
+ "type": "stack",
719
+ "direction": "horizontal",
720
+ "gap": "sm",
721
+ "children": [
722
+ {
723
+ "type": "button",
724
+ "label": "Create Patient",
725
+ "event": "CREATE",
726
+ "variant": "primary",
727
+ "icon": "plus"
728
+ }
729
+ ]
730
+ }
731
+ ]
732
+ },
733
+ {
734
+ "type": "divider"
735
+ },
736
+ {
737
+ "type": "data-grid",
738
+ "entity": "Patient",
739
+ "emptyIcon": "inbox",
740
+ "emptyTitle": "No patients yet",
741
+ "emptyDescription": "Create your first patient to get started.",
742
+ "itemActions": [
743
+ {
744
+ "label": "View",
745
+ "event": "VIEW"
746
+ },
747
+ {
748
+ "label": "Edit",
749
+ "event": "EDIT"
750
+ },
751
+ {
752
+ "label": "Delete",
753
+ "event": "DELETE",
754
+ "variant": "danger"
755
+ }
756
+ ],
757
+ "className": "transition-shadow hover:shadow-md cursor-pointer",
758
+ "renderItem": [
759
+ "fn",
760
+ "item",
761
+ {
762
+ "type": "stack",
763
+ "direction": "vertical",
764
+ "gap": "sm",
765
+ "children": [
766
+ {
767
+ "type": "stack",
768
+ "direction": "horizontal",
769
+ "justify": "space-between",
770
+ "align": "center",
771
+ "children": [
772
+ {
773
+ "type": "stack",
774
+ "direction": "horizontal",
775
+ "gap": "sm",
776
+ "align": "center",
777
+ "children": [
778
+ {
779
+ "type": "icon",
780
+ "name": "users",
781
+ "size": "sm"
782
+ },
783
+ {
784
+ "type": "typography",
785
+ "variant": "h4",
786
+ "content": "@item.firstName"
787
+ }
788
+ ]
789
+ },
790
+ {
791
+ "type": "badge",
792
+ "label": "@item.lastName"
793
+ }
794
+ ]
795
+ },
796
+ {
797
+ "type": "typography",
798
+ "variant": "caption",
799
+ "color": "muted",
800
+ "content": "@item.dateOfBirth"
801
+ }
802
+ ]
803
+ }
804
+ ]
805
+ }
806
+ ]
807
+ }
808
+ ]
809
+ ]
810
+ }
811
+ ]
812
+ }
813
+ },
814
+ {
815
+ "name": "PatientCreate",
816
+ "linkedEntity": "Patient",
817
+ "category": "interaction",
818
+ "emits": [
819
+ {
820
+ "event": "PATIENT_CREATED"
821
+ }
822
+ ],
823
+ "stateMachine": {
824
+ "states": [
825
+ {
826
+ "name": "closed",
827
+ "isInitial": true
828
+ },
829
+ {
830
+ "name": "open"
831
+ }
832
+ ],
833
+ "events": [
834
+ {
835
+ "key": "INIT",
836
+ "name": "Initialize"
837
+ },
838
+ {
839
+ "key": "CREATE",
840
+ "name": "Open"
841
+ },
842
+ {
843
+ "key": "CLOSE",
844
+ "name": "Close"
845
+ },
846
+ {
847
+ "key": "SAVE",
848
+ "name": "Save",
849
+ "payload": [
850
+ {
851
+ "name": "data",
852
+ "type": "object",
853
+ "required": true
854
+ }
855
+ ]
856
+ }
857
+ ],
858
+ "transitions": [
859
+ {
860
+ "from": "closed",
861
+ "to": "closed",
862
+ "event": "INIT",
863
+ "effects": [
798
864
  [
799
865
  "fetch",
800
866
  "Patient"
@@ -804,12 +870,11 @@
804
870
  {
805
871
  "from": "closed",
806
872
  "to": "open",
807
- "event": "VIEW",
873
+ "event": "CREATE",
808
874
  "effects": [
809
875
  [
810
876
  "fetch",
811
- "Patient",
812
- "@payload.id"
877
+ "Patient"
813
878
  ],
814
879
  [
815
880
  "render-ui",
@@ -823,17 +888,16 @@
823
888
  "type": "stack",
824
889
  "direction": "horizontal",
825
890
  "gap": "sm",
826
- "align": "center",
827
891
  "children": [
828
892
  {
829
893
  "type": "icon",
830
- "name": "eye",
894
+ "name": "plus-circle",
831
895
  "size": "md"
832
896
  },
833
897
  {
834
898
  "type": "typography",
835
- "variant": "h3",
836
- "content": "@entity.firstName"
899
+ "content": "Create Patient",
900
+ "variant": "h3"
837
901
  }
838
902
  ]
839
903
  },
@@ -841,129 +905,18 @@
841
905
  "type": "divider"
842
906
  },
843
907
  {
844
- "type": "stack",
845
- "direction": "horizontal",
846
- "gap": "md",
847
- "children": [
848
- {
849
- "type": "typography",
850
- "variant": "caption",
851
- "content": "FirstName"
852
- },
853
- {
854
- "type": "typography",
855
- "variant": "body",
856
- "content": "@entity.firstName"
857
- }
858
- ]
859
- },
860
- {
861
- "type": "stack",
862
- "direction": "horizontal",
863
- "gap": "md",
864
- "children": [
865
- {
866
- "type": "typography",
867
- "variant": "caption",
868
- "content": "LastName"
869
- },
870
- {
871
- "type": "typography",
872
- "variant": "body",
873
- "content": "@entity.lastName"
874
- }
875
- ]
876
- },
877
- {
878
- "type": "stack",
879
- "direction": "horizontal",
880
- "gap": "md",
881
- "children": [
882
- {
883
- "type": "typography",
884
- "variant": "caption",
885
- "content": "DateOfBirth"
886
- },
887
- {
888
- "type": "typography",
889
- "variant": "body",
890
- "content": "@entity.dateOfBirth"
891
- }
892
- ]
893
- },
894
- {
895
- "type": "stack",
896
- "direction": "horizontal",
897
- "gap": "md",
898
- "children": [
899
- {
900
- "type": "typography",
901
- "variant": "caption",
902
- "content": "Phone"
903
- },
904
- {
905
- "type": "typography",
906
- "variant": "body",
907
- "content": "@entity.phone"
908
- }
909
- ]
910
- },
911
- {
912
- "type": "stack",
913
- "direction": "horizontal",
914
- "gap": "md",
915
- "children": [
916
- {
917
- "type": "typography",
918
- "variant": "caption",
919
- "content": "InsuranceId"
920
- },
921
- {
922
- "type": "typography",
923
- "variant": "body",
924
- "content": "@entity.insuranceId"
925
- }
926
- ]
927
- },
928
- {
929
- "type": "stack",
930
- "direction": "horizontal",
931
- "gap": "md",
932
- "children": [
933
- {
934
- "type": "typography",
935
- "variant": "caption",
936
- "content": "Status"
937
- },
938
- {
939
- "type": "typography",
940
- "variant": "body",
941
- "content": "@entity.status"
942
- }
943
- ]
944
- },
945
- {
946
- "type": "divider"
947
- },
948
- {
949
- "type": "stack",
950
- "direction": "horizontal",
951
- "gap": "sm",
952
- "justify": "end",
953
- "children": [
954
- {
955
- "type": "button",
956
- "label": "Edit",
957
- "event": "EDIT",
958
- "variant": "primary",
959
- "icon": "edit"
960
- },
961
- {
962
- "type": "button",
963
- "label": "Close",
964
- "event": "CLOSE",
965
- "variant": "ghost"
966
- }
908
+ "type": "form-section",
909
+ "entity": "Patient",
910
+ "mode": "create",
911
+ "submitEvent": "SAVE",
912
+ "cancelEvent": "CLOSE",
913
+ "fields": [
914
+ "firstName",
915
+ "lastName",
916
+ "dateOfBirth",
917
+ "phone",
918
+ "insuranceId",
919
+ "status"
967
920
  ]
968
921
  }
969
922
  ]
@@ -982,99 +935,57 @@
982
935
  null
983
936
  ]
984
937
  ]
938
+ },
939
+ {
940
+ "from": "open",
941
+ "to": "closed",
942
+ "event": "SAVE",
943
+ "effects": [
944
+ [
945
+ "persist",
946
+ "create",
947
+ "Patient",
948
+ "@payload.data"
949
+ ],
950
+ [
951
+ "fetch",
952
+ "Patient"
953
+ ],
954
+ [
955
+ "render-ui",
956
+ "modal",
957
+ null
958
+ ],
959
+ [
960
+ "emit",
961
+ "PATIENT_CREATED"
962
+ ],
963
+ [
964
+ "notify",
965
+ "Patient created successfully"
966
+ ]
967
+ ]
985
968
  }
986
969
  ]
987
970
  }
988
- }
989
- ],
990
- "pages": [
991
- {
992
- "name": "PatientsPage",
993
- "path": "/patients",
994
- "isInitial": true,
995
- "traits": [
996
- {
997
- "ref": "PatientBrowse"
998
- },
999
- {
1000
- "ref": "PatientCreate"
1001
- },
1002
- {
1003
- "ref": "PatientEdit"
1004
- },
1005
- {
1006
- "ref": "PatientView"
1007
- }
1008
- ]
1009
- }
1010
- ]
1011
- },
1012
- {
1013
- "name": "AppointmentOrbital",
1014
- "entity": {
1015
- "name": "Appointment",
1016
- "persistence": "persistent",
1017
- "collection": "appointments",
1018
- "fields": [
1019
- {
1020
- "name": "id",
1021
- "type": "string",
1022
- "required": true
1023
- },
1024
- {
1025
- "name": "patientName",
1026
- "type": "string",
1027
- "required": true
1028
- },
1029
- {
1030
- "name": "doctorName",
1031
- "type": "string",
1032
- "required": true
1033
- },
1034
- {
1035
- "name": "date",
1036
- "type": "string",
1037
- "required": true
1038
- },
1039
- {
1040
- "name": "time",
1041
- "type": "string",
1042
- "required": true
1043
- },
1044
- {
1045
- "name": "reason",
1046
- "type": "string"
1047
- },
1048
- {
1049
- "name": "status",
1050
- "type": "string",
1051
- "default": "scheduled"
1052
- }
1053
- ]
1054
- },
1055
- "traits": [
971
+ },
1056
972
  {
1057
- "name": "AppointmentBrowse",
1058
- "linkedEntity": "Appointment",
973
+ "name": "PatientEdit",
974
+ "linkedEntity": "Patient",
1059
975
  "category": "interaction",
1060
- "listens": [
1061
- {
1062
- "event": "APPOINTMENT_CREATED",
1063
- "triggers": "APPOINTMENT_CREATED"
1064
- },
976
+ "emits": [
1065
977
  {
1066
- "event": "APPOINTMENT_UPDATED",
1067
- "triggers": "APPOINTMENT_UPDATED"
978
+ "event": "PATIENT_UPDATED"
1068
979
  }
1069
980
  ],
1070
981
  "stateMachine": {
1071
982
  "states": [
1072
983
  {
1073
- "name": "browsing",
984
+ "name": "closed",
1074
985
  "isInitial": true
1075
986
  },
1076
987
  {
1077
- "name": "deleting"
988
+ "name": "open"
1078
989
  }
1079
990
  ],
1080
991
  "events": [
@@ -1082,24 +993,9 @@
1082
993
  "key": "INIT",
1083
994
  "name": "Initialize"
1084
995
  },
1085
- {
1086
- "key": "CREATE",
1087
- "name": "CREATE"
1088
- },
1089
- {
1090
- "key": "VIEW",
1091
- "name": "VIEW",
1092
- "payload": [
1093
- {
1094
- "name": "id",
1095
- "type": "string",
1096
- "required": true
1097
- }
1098
- ]
1099
- },
1100
996
  {
1101
997
  "key": "EDIT",
1102
- "name": "EDIT",
998
+ "name": "Open",
1103
999
  "payload": [
1104
1000
  {
1105
1001
  "name": "id",
@@ -1109,19 +1005,12 @@
1109
1005
  ]
1110
1006
  },
1111
1007
  {
1112
- "key": "DELETE",
1113
- "name": "DELETE",
1114
- "payload": [
1115
- {
1116
- "name": "id",
1117
- "type": "string",
1118
- "required": true
1119
- }
1120
- ]
1008
+ "key": "CLOSE",
1009
+ "name": "Close"
1121
1010
  },
1122
1011
  {
1123
- "key": "APPOINTMENT_CREATED",
1124
- "name": "APPOINTMENT_CREATED",
1012
+ "key": "SAVE",
1013
+ "name": "Save",
1125
1014
  "payload": [
1126
1015
  {
1127
1016
  "name": "data",
@@ -1129,37 +1018,911 @@
1129
1018
  "required": true
1130
1019
  }
1131
1020
  ]
1132
- },
1021
+ }
1022
+ ],
1023
+ "transitions": [
1133
1024
  {
1134
- "key": "APPOINTMENT_UPDATED",
1135
- "name": "APPOINTMENT_UPDATED",
1136
- "payload": [
1137
- {
1138
- "name": "data",
1139
- "type": "object",
1140
- "required": true
1141
- }
1025
+ "from": "closed",
1026
+ "to": "closed",
1027
+ "event": "INIT",
1028
+ "effects": [
1029
+ [
1030
+ "fetch",
1031
+ "Patient"
1032
+ ]
1142
1033
  ]
1143
1034
  },
1144
1035
  {
1145
- "key": "CONFIRM_DELETE",
1146
- "name": "Confirm Delete"
1147
- },
1148
- {
1149
- "key": "CANCEL",
1150
- "name": "Cancel"
1151
- },
1152
- {
1153
- "key": "CLOSE",
1154
- "name": "Close"
1155
- }
1156
- ],
1157
- "transitions": [
1036
+ "from": "closed",
1037
+ "to": "open",
1038
+ "event": "EDIT",
1039
+ "effects": [
1040
+ [
1041
+ "fetch",
1042
+ "Patient",
1043
+ "@payload.id"
1044
+ ],
1045
+ [
1046
+ "render-ui",
1047
+ "modal",
1048
+ {
1049
+ "type": "stack",
1050
+ "direction": "vertical",
1051
+ "gap": "md",
1052
+ "children": [
1053
+ {
1054
+ "type": "stack",
1055
+ "direction": "horizontal",
1056
+ "gap": "sm",
1057
+ "children": [
1058
+ {
1059
+ "type": "icon",
1060
+ "name": "edit",
1061
+ "size": "md"
1062
+ },
1063
+ {
1064
+ "type": "typography",
1065
+ "content": "Edit Patient",
1066
+ "variant": "h3"
1067
+ }
1068
+ ]
1069
+ },
1070
+ {
1071
+ "type": "divider"
1072
+ },
1073
+ {
1074
+ "type": "form-section",
1075
+ "entity": "Patient",
1076
+ "mode": "edit",
1077
+ "submitEvent": "SAVE",
1078
+ "cancelEvent": "CLOSE",
1079
+ "fields": [
1080
+ "firstName",
1081
+ "lastName",
1082
+ "dateOfBirth",
1083
+ "phone",
1084
+ "insuranceId",
1085
+ "status"
1086
+ ],
1087
+ "entityId": "@entity.id"
1088
+ }
1089
+ ]
1090
+ }
1091
+ ]
1092
+ ]
1093
+ },
1094
+ {
1095
+ "from": "open",
1096
+ "to": "closed",
1097
+ "event": "CLOSE",
1098
+ "effects": [
1099
+ [
1100
+ "render-ui",
1101
+ "modal",
1102
+ null
1103
+ ]
1104
+ ]
1105
+ },
1106
+ {
1107
+ "from": "open",
1108
+ "to": "closed",
1109
+ "event": "SAVE",
1110
+ "effects": [
1111
+ [
1112
+ "persist",
1113
+ "update",
1114
+ "Patient",
1115
+ "@payload.data"
1116
+ ],
1117
+ [
1118
+ "fetch",
1119
+ "Patient"
1120
+ ],
1121
+ [
1122
+ "render-ui",
1123
+ "modal",
1124
+ null
1125
+ ],
1126
+ [
1127
+ "emit",
1128
+ "PATIENT_UPDATED"
1129
+ ],
1130
+ [
1131
+ "notify",
1132
+ "Patient updated successfully"
1133
+ ]
1134
+ ]
1135
+ }
1136
+ ]
1137
+ }
1138
+ },
1139
+ {
1140
+ "name": "PatientView",
1141
+ "linkedEntity": "Patient",
1142
+ "category": "interaction",
1143
+ "stateMachine": {
1144
+ "states": [
1145
+ {
1146
+ "name": "closed",
1147
+ "isInitial": true
1148
+ },
1149
+ {
1150
+ "name": "open"
1151
+ }
1152
+ ],
1153
+ "events": [
1154
+ {
1155
+ "key": "INIT",
1156
+ "name": "Initialize"
1157
+ },
1158
+ {
1159
+ "key": "VIEW",
1160
+ "name": "Open",
1161
+ "payload": [
1162
+ {
1163
+ "name": "id",
1164
+ "type": "string",
1165
+ "required": true
1166
+ }
1167
+ ]
1168
+ },
1169
+ {
1170
+ "key": "CLOSE",
1171
+ "name": "Close"
1172
+ }
1173
+ ],
1174
+ "transitions": [
1175
+ {
1176
+ "from": "closed",
1177
+ "to": "closed",
1178
+ "event": "INIT",
1179
+ "effects": [
1180
+ [
1181
+ "fetch",
1182
+ "Patient"
1183
+ ]
1184
+ ]
1185
+ },
1186
+ {
1187
+ "from": "closed",
1188
+ "to": "open",
1189
+ "event": "VIEW",
1190
+ "effects": [
1191
+ [
1192
+ "fetch",
1193
+ "Patient",
1194
+ "@payload.id"
1195
+ ],
1196
+ [
1197
+ "render-ui",
1198
+ "modal",
1199
+ {
1200
+ "type": "stack",
1201
+ "direction": "vertical",
1202
+ "gap": "md",
1203
+ "children": [
1204
+ {
1205
+ "type": "stack",
1206
+ "direction": "horizontal",
1207
+ "gap": "sm",
1208
+ "align": "center",
1209
+ "children": [
1210
+ {
1211
+ "type": "icon",
1212
+ "name": "eye",
1213
+ "size": "md"
1214
+ },
1215
+ {
1216
+ "type": "typography",
1217
+ "variant": "h3",
1218
+ "content": "@entity.firstName"
1219
+ }
1220
+ ]
1221
+ },
1222
+ {
1223
+ "type": "divider"
1224
+ },
1225
+ {
1226
+ "type": "stack",
1227
+ "direction": "horizontal",
1228
+ "gap": "md",
1229
+ "children": [
1230
+ {
1231
+ "type": "typography",
1232
+ "variant": "caption",
1233
+ "content": "FirstName"
1234
+ },
1235
+ {
1236
+ "type": "typography",
1237
+ "variant": "body",
1238
+ "content": "@entity.firstName"
1239
+ }
1240
+ ]
1241
+ },
1242
+ {
1243
+ "type": "stack",
1244
+ "direction": "horizontal",
1245
+ "gap": "md",
1246
+ "children": [
1247
+ {
1248
+ "type": "typography",
1249
+ "variant": "caption",
1250
+ "content": "LastName"
1251
+ },
1252
+ {
1253
+ "type": "typography",
1254
+ "variant": "body",
1255
+ "content": "@entity.lastName"
1256
+ }
1257
+ ]
1258
+ },
1259
+ {
1260
+ "type": "stack",
1261
+ "direction": "horizontal",
1262
+ "gap": "md",
1263
+ "children": [
1264
+ {
1265
+ "type": "typography",
1266
+ "variant": "caption",
1267
+ "content": "DateOfBirth"
1268
+ },
1269
+ {
1270
+ "type": "typography",
1271
+ "variant": "body",
1272
+ "content": "@entity.dateOfBirth"
1273
+ }
1274
+ ]
1275
+ },
1276
+ {
1277
+ "type": "stack",
1278
+ "direction": "horizontal",
1279
+ "gap": "md",
1280
+ "children": [
1281
+ {
1282
+ "type": "typography",
1283
+ "variant": "caption",
1284
+ "content": "Phone"
1285
+ },
1286
+ {
1287
+ "type": "typography",
1288
+ "variant": "body",
1289
+ "content": "@entity.phone"
1290
+ }
1291
+ ]
1292
+ },
1293
+ {
1294
+ "type": "stack",
1295
+ "direction": "horizontal",
1296
+ "gap": "md",
1297
+ "children": [
1298
+ {
1299
+ "type": "typography",
1300
+ "variant": "caption",
1301
+ "content": "InsuranceId"
1302
+ },
1303
+ {
1304
+ "type": "typography",
1305
+ "variant": "body",
1306
+ "content": "@entity.insuranceId"
1307
+ }
1308
+ ]
1309
+ },
1310
+ {
1311
+ "type": "stack",
1312
+ "direction": "horizontal",
1313
+ "gap": "md",
1314
+ "children": [
1315
+ {
1316
+ "type": "typography",
1317
+ "variant": "caption",
1318
+ "content": "Status"
1319
+ },
1320
+ {
1321
+ "type": "typography",
1322
+ "variant": "body",
1323
+ "content": "@entity.status"
1324
+ }
1325
+ ]
1326
+ },
1327
+ {
1328
+ "type": "divider"
1329
+ },
1330
+ {
1331
+ "type": "stack",
1332
+ "direction": "horizontal",
1333
+ "gap": "sm",
1334
+ "justify": "end",
1335
+ "children": [
1336
+ {
1337
+ "type": "button",
1338
+ "label": "Edit",
1339
+ "event": "EDIT",
1340
+ "variant": "primary",
1341
+ "icon": "edit"
1342
+ },
1343
+ {
1344
+ "type": "button",
1345
+ "label": "Close",
1346
+ "event": "CLOSE",
1347
+ "variant": "ghost"
1348
+ }
1349
+ ]
1350
+ }
1351
+ ]
1352
+ }
1353
+ ]
1354
+ ]
1355
+ },
1356
+ {
1357
+ "from": "open",
1358
+ "to": "closed",
1359
+ "event": "CLOSE",
1360
+ "effects": [
1361
+ [
1362
+ "render-ui",
1363
+ "modal",
1364
+ null
1365
+ ]
1366
+ ]
1367
+ }
1368
+ ]
1369
+ }
1370
+ }
1371
+ ],
1372
+ "pages": [
1373
+ {
1374
+ "name": "PatientsPage",
1375
+ "path": "/patients",
1376
+ "isInitial": true,
1377
+ "traits": [
1378
+ {
1379
+ "ref": "PatientBrowse"
1380
+ },
1381
+ {
1382
+ "ref": "PatientCreate"
1383
+ },
1384
+ {
1385
+ "ref": "PatientEdit"
1386
+ },
1387
+ {
1388
+ "ref": "PatientView"
1389
+ }
1390
+ ]
1391
+ }
1392
+ ]
1393
+ },
1394
+ {
1395
+ "name": "AppointmentOrbital",
1396
+ "entity": {
1397
+ "name": "Appointment",
1398
+ "persistence": "persistent",
1399
+ "collection": "appointments",
1400
+ "fields": [
1401
+ {
1402
+ "name": "id",
1403
+ "type": "string",
1404
+ "required": true
1405
+ },
1406
+ {
1407
+ "name": "patientName",
1408
+ "type": "string",
1409
+ "required": true
1410
+ },
1411
+ {
1412
+ "name": "doctorName",
1413
+ "type": "string",
1414
+ "required": true
1415
+ },
1416
+ {
1417
+ "name": "date",
1418
+ "type": "string",
1419
+ "required": true
1420
+ },
1421
+ {
1422
+ "name": "time",
1423
+ "type": "string",
1424
+ "required": true
1425
+ },
1426
+ {
1427
+ "name": "reason",
1428
+ "type": "string"
1429
+ },
1430
+ {
1431
+ "name": "status",
1432
+ "type": "string",
1433
+ "default": "scheduled"
1434
+ }
1435
+ ]
1436
+ },
1437
+ "traits": [
1438
+ {
1439
+ "name": "AppointmentBrowse",
1440
+ "linkedEntity": "Appointment",
1441
+ "category": "interaction",
1442
+ "listens": [
1443
+ {
1444
+ "event": "APPOINTMENT_CREATED",
1445
+ "triggers": "APPOINTMENT_CREATED"
1446
+ },
1447
+ {
1448
+ "event": "APPOINTMENT_UPDATED",
1449
+ "triggers": "APPOINTMENT_UPDATED"
1450
+ }
1451
+ ],
1452
+ "stateMachine": {
1453
+ "states": [
1454
+ {
1455
+ "name": "browsing",
1456
+ "isInitial": true
1457
+ },
1458
+ {
1459
+ "name": "deleting"
1460
+ }
1461
+ ],
1462
+ "events": [
1463
+ {
1464
+ "key": "INIT",
1465
+ "name": "Initialize"
1466
+ },
1467
+ {
1468
+ "key": "CREATE",
1469
+ "name": "CREATE"
1470
+ },
1471
+ {
1472
+ "key": "VIEW",
1473
+ "name": "VIEW",
1474
+ "payload": [
1475
+ {
1476
+ "name": "id",
1477
+ "type": "string",
1478
+ "required": true
1479
+ }
1480
+ ]
1481
+ },
1482
+ {
1483
+ "key": "EDIT",
1484
+ "name": "EDIT",
1485
+ "payload": [
1486
+ {
1487
+ "name": "id",
1488
+ "type": "string",
1489
+ "required": true
1490
+ }
1491
+ ]
1492
+ },
1493
+ {
1494
+ "key": "DELETE",
1495
+ "name": "DELETE",
1496
+ "payload": [
1497
+ {
1498
+ "name": "id",
1499
+ "type": "string",
1500
+ "required": true
1501
+ }
1502
+ ]
1503
+ },
1504
+ {
1505
+ "key": "APPOINTMENT_CREATED",
1506
+ "name": "APPOINTMENT_CREATED",
1507
+ "payload": [
1508
+ {
1509
+ "name": "data",
1510
+ "type": "object",
1511
+ "required": true
1512
+ }
1513
+ ]
1514
+ },
1515
+ {
1516
+ "key": "APPOINTMENT_UPDATED",
1517
+ "name": "APPOINTMENT_UPDATED",
1518
+ "payload": [
1519
+ {
1520
+ "name": "data",
1521
+ "type": "object",
1522
+ "required": true
1523
+ }
1524
+ ]
1525
+ },
1526
+ {
1527
+ "key": "CONFIRM_DELETE",
1528
+ "name": "Confirm Delete"
1529
+ },
1530
+ {
1531
+ "key": "CANCEL",
1532
+ "name": "Cancel"
1533
+ },
1534
+ {
1535
+ "key": "CLOSE",
1536
+ "name": "Close"
1537
+ }
1538
+ ],
1539
+ "transitions": [
1540
+ {
1541
+ "from": "browsing",
1542
+ "to": "browsing",
1543
+ "event": "INIT",
1544
+ "effects": [
1545
+ [
1546
+ "fetch",
1547
+ "Appointment"
1548
+ ],
1549
+ [
1550
+ "render-ui",
1551
+ "main",
1552
+ {
1553
+ "type": "stack",
1554
+ "direction": "vertical",
1555
+ "gap": "lg",
1556
+ "children": [
1557
+ {
1558
+ "type": "stack",
1559
+ "direction": "horizontal",
1560
+ "gap": "md",
1561
+ "justify": "space-between",
1562
+ "children": [
1563
+ {
1564
+ "type": "stack",
1565
+ "direction": "horizontal",
1566
+ "gap": "sm",
1567
+ "align": "center",
1568
+ "children": [
1569
+ {
1570
+ "type": "icon",
1571
+ "name": "calendar",
1572
+ "size": "lg"
1573
+ },
1574
+ {
1575
+ "type": "typography",
1576
+ "content": "Appointments",
1577
+ "variant": "h2"
1578
+ }
1579
+ ]
1580
+ },
1581
+ {
1582
+ "type": "stack",
1583
+ "direction": "horizontal",
1584
+ "gap": "sm",
1585
+ "children": [
1586
+ {
1587
+ "type": "button",
1588
+ "label": "Create Appointment",
1589
+ "event": "CREATE",
1590
+ "variant": "primary",
1591
+ "icon": "plus"
1592
+ }
1593
+ ]
1594
+ }
1595
+ ]
1596
+ },
1597
+ {
1598
+ "type": "divider"
1599
+ },
1600
+ {
1601
+ "type": "data-grid",
1602
+ "entity": "Appointment",
1603
+ "emptyIcon": "inbox",
1604
+ "emptyTitle": "No appointments yet",
1605
+ "emptyDescription": "Create your first appointment to get started.",
1606
+ "itemActions": [
1607
+ {
1608
+ "label": "View",
1609
+ "event": "VIEW"
1610
+ },
1611
+ {
1612
+ "label": "Edit",
1613
+ "event": "EDIT"
1614
+ },
1615
+ {
1616
+ "label": "Delete",
1617
+ "event": "DELETE",
1618
+ "variant": "danger"
1619
+ }
1620
+ ],
1621
+ "className": "transition-shadow hover:shadow-md cursor-pointer",
1622
+ "renderItem": [
1623
+ "fn",
1624
+ "item",
1625
+ {
1626
+ "type": "stack",
1627
+ "direction": "vertical",
1628
+ "gap": "sm",
1629
+ "children": [
1630
+ {
1631
+ "type": "stack",
1632
+ "direction": "horizontal",
1633
+ "justify": "space-between",
1634
+ "align": "center",
1635
+ "children": [
1636
+ {
1637
+ "type": "stack",
1638
+ "direction": "horizontal",
1639
+ "gap": "sm",
1640
+ "align": "center",
1641
+ "children": [
1642
+ {
1643
+ "type": "icon",
1644
+ "name": "calendar",
1645
+ "size": "sm"
1646
+ },
1647
+ {
1648
+ "type": "typography",
1649
+ "variant": "h4",
1650
+ "content": "@item.patientName"
1651
+ }
1652
+ ]
1653
+ },
1654
+ {
1655
+ "type": "badge",
1656
+ "label": "@item.doctorName"
1657
+ }
1658
+ ]
1659
+ },
1660
+ {
1661
+ "type": "typography",
1662
+ "variant": "caption",
1663
+ "color": "muted",
1664
+ "content": "@item.date"
1665
+ }
1666
+ ]
1667
+ }
1668
+ ]
1669
+ }
1670
+ ]
1671
+ }
1672
+ ]
1673
+ ]
1674
+ },
1675
+ {
1676
+ "from": "browsing",
1677
+ "to": "browsing",
1678
+ "event": "APPOINTMENT_CREATED",
1679
+ "effects": [
1680
+ [
1681
+ "fetch",
1682
+ "Appointment"
1683
+ ]
1684
+ ]
1685
+ },
1686
+ {
1687
+ "from": "browsing",
1688
+ "to": "browsing",
1689
+ "event": "APPOINTMENT_UPDATED",
1690
+ "effects": [
1691
+ [
1692
+ "fetch",
1693
+ "Appointment"
1694
+ ]
1695
+ ]
1696
+ },
1697
+ {
1698
+ "from": "browsing",
1699
+ "to": "deleting",
1700
+ "event": "DELETE",
1701
+ "effects": [
1702
+ [
1703
+ "fetch",
1704
+ "Appointment",
1705
+ "@payload.id"
1706
+ ],
1707
+ [
1708
+ "render-ui",
1709
+ "modal",
1710
+ {
1711
+ "type": "stack",
1712
+ "direction": "vertical",
1713
+ "gap": "md",
1714
+ "children": [
1715
+ {
1716
+ "type": "stack",
1717
+ "direction": "horizontal",
1718
+ "gap": "sm",
1719
+ "children": [
1720
+ {
1721
+ "type": "icon",
1722
+ "name": "trash-2",
1723
+ "size": "md"
1724
+ },
1725
+ {
1726
+ "type": "typography",
1727
+ "content": "Delete Appointment",
1728
+ "variant": "h3"
1729
+ }
1730
+ ]
1731
+ },
1732
+ {
1733
+ "type": "divider"
1734
+ },
1735
+ {
1736
+ "type": "typography",
1737
+ "content": "Are you sure you want to delete this appointment?",
1738
+ "variant": "body"
1739
+ },
1740
+ {
1741
+ "type": "stack",
1742
+ "direction": "horizontal",
1743
+ "gap": "sm",
1744
+ "justify": "end",
1745
+ "children": [
1746
+ {
1747
+ "type": "button",
1748
+ "label": "Cancel",
1749
+ "event": "CANCEL",
1750
+ "variant": "ghost"
1751
+ },
1752
+ {
1753
+ "type": "button",
1754
+ "label": "Delete",
1755
+ "event": "CONFIRM_DELETE",
1756
+ "variant": "danger",
1757
+ "icon": "trash"
1758
+ }
1759
+ ]
1760
+ }
1761
+ ]
1762
+ }
1763
+ ]
1764
+ ]
1765
+ },
1766
+ {
1767
+ "from": "deleting",
1768
+ "to": "browsing",
1769
+ "event": "CONFIRM_DELETE",
1770
+ "effects": [
1771
+ [
1772
+ "persist",
1773
+ "delete",
1774
+ "Appointment",
1775
+ "@entity.id"
1776
+ ],
1777
+ [
1778
+ "render-ui",
1779
+ "modal",
1780
+ null
1781
+ ],
1782
+ [
1783
+ "fetch",
1784
+ "Appointment"
1785
+ ],
1786
+ [
1787
+ "render-ui",
1788
+ "main",
1789
+ {
1790
+ "type": "stack",
1791
+ "direction": "vertical",
1792
+ "gap": "lg",
1793
+ "children": [
1794
+ {
1795
+ "type": "stack",
1796
+ "direction": "horizontal",
1797
+ "gap": "md",
1798
+ "justify": "space-between",
1799
+ "children": [
1800
+ {
1801
+ "type": "stack",
1802
+ "direction": "horizontal",
1803
+ "gap": "sm",
1804
+ "align": "center",
1805
+ "children": [
1806
+ {
1807
+ "type": "icon",
1808
+ "name": "calendar",
1809
+ "size": "lg"
1810
+ },
1811
+ {
1812
+ "type": "typography",
1813
+ "content": "Appointments",
1814
+ "variant": "h2"
1815
+ }
1816
+ ]
1817
+ },
1818
+ {
1819
+ "type": "stack",
1820
+ "direction": "horizontal",
1821
+ "gap": "sm",
1822
+ "children": [
1823
+ {
1824
+ "type": "button",
1825
+ "label": "Create Appointment",
1826
+ "event": "CREATE",
1827
+ "variant": "primary",
1828
+ "icon": "plus"
1829
+ }
1830
+ ]
1831
+ }
1832
+ ]
1833
+ },
1834
+ {
1835
+ "type": "divider"
1836
+ },
1837
+ {
1838
+ "type": "data-grid",
1839
+ "entity": "Appointment",
1840
+ "emptyIcon": "inbox",
1841
+ "emptyTitle": "No appointments yet",
1842
+ "emptyDescription": "Create your first appointment to get started.",
1843
+ "itemActions": [
1844
+ {
1845
+ "label": "View",
1846
+ "event": "VIEW"
1847
+ },
1848
+ {
1849
+ "label": "Edit",
1850
+ "event": "EDIT"
1851
+ },
1852
+ {
1853
+ "label": "Delete",
1854
+ "event": "DELETE",
1855
+ "variant": "danger"
1856
+ }
1857
+ ],
1858
+ "className": "transition-shadow hover:shadow-md cursor-pointer",
1859
+ "renderItem": [
1860
+ "fn",
1861
+ "item",
1862
+ {
1863
+ "type": "stack",
1864
+ "direction": "vertical",
1865
+ "gap": "sm",
1866
+ "children": [
1867
+ {
1868
+ "type": "stack",
1869
+ "direction": "horizontal",
1870
+ "justify": "space-between",
1871
+ "align": "center",
1872
+ "children": [
1873
+ {
1874
+ "type": "stack",
1875
+ "direction": "horizontal",
1876
+ "gap": "sm",
1877
+ "align": "center",
1878
+ "children": [
1879
+ {
1880
+ "type": "icon",
1881
+ "name": "calendar",
1882
+ "size": "sm"
1883
+ },
1884
+ {
1885
+ "type": "typography",
1886
+ "variant": "h4",
1887
+ "content": "@item.patientName"
1888
+ }
1889
+ ]
1890
+ },
1891
+ {
1892
+ "type": "badge",
1893
+ "label": "@item.doctorName"
1894
+ }
1895
+ ]
1896
+ },
1897
+ {
1898
+ "type": "typography",
1899
+ "variant": "caption",
1900
+ "color": "muted",
1901
+ "content": "@item.date"
1902
+ }
1903
+ ]
1904
+ }
1905
+ ]
1906
+ }
1907
+ ]
1908
+ }
1909
+ ],
1910
+ [
1911
+ "notify",
1912
+ "Appointment deleted successfully"
1913
+ ]
1914
+ ]
1915
+ },
1158
1916
  {
1159
- "from": "browsing",
1917
+ "from": "deleting",
1160
1918
  "to": "browsing",
1161
- "event": "INIT",
1919
+ "event": "CANCEL",
1162
1920
  "effects": [
1921
+ [
1922
+ "render-ui",
1923
+ "modal",
1924
+ null
1925
+ ],
1163
1926
  [
1164
1927
  "fetch",
1165
1928
  "Appointment"
@@ -1237,7 +2000,9 @@
1237
2000
  }
1238
2001
  ],
1239
2002
  "className": "transition-shadow hover:shadow-md cursor-pointer",
1240
- "children": [
2003
+ "renderItem": [
2004
+ "fn",
2005
+ "item",
1241
2006
  {
1242
2007
  "type": "stack",
1243
2008
  "direction": "vertical",
@@ -1263,13 +2028,13 @@
1263
2028
  {
1264
2029
  "type": "typography",
1265
2030
  "variant": "h4",
1266
- "content": "@entity.patientName"
2031
+ "content": "@item.patientName"
1267
2032
  }
1268
2033
  ]
1269
2034
  },
1270
2035
  {
1271
2036
  "type": "badge",
1272
- "label": "@entity.doctorName"
2037
+ "label": "@item.doctorName"
1273
2038
  }
1274
2039
  ]
1275
2040
  },
@@ -1277,7 +2042,7 @@
1277
2042
  "type": "typography",
1278
2043
  "variant": "caption",
1279
2044
  "color": "muted",
1280
- "content": "@entity.date"
2045
+ "content": "@item.date"
1281
2046
  }
1282
2047
  ]
1283
2048
  }
@@ -1289,59 +2054,64 @@
1289
2054
  ]
1290
2055
  },
1291
2056
  {
1292
- "from": "browsing",
2057
+ "from": "deleting",
1293
2058
  "to": "browsing",
1294
- "event": "APPOINTMENT_CREATED",
2059
+ "event": "CLOSE",
1295
2060
  "effects": [
1296
2061
  [
1297
- "fetch",
1298
- "Appointment"
1299
- ]
1300
- ]
1301
- },
1302
- {
1303
- "from": "browsing",
1304
- "to": "browsing",
1305
- "event": "APPOINTMENT_UPDATED",
1306
- "effects": [
2062
+ "render-ui",
2063
+ "modal",
2064
+ null
2065
+ ],
1307
2066
  [
1308
2067
  "fetch",
1309
2068
  "Appointment"
1310
- ]
1311
- ]
1312
- },
1313
- {
1314
- "from": "browsing",
1315
- "to": "deleting",
1316
- "event": "DELETE",
1317
- "effects": [
1318
- [
1319
- "fetch",
1320
- "Appointment",
1321
- "@payload.id"
1322
2069
  ],
1323
2070
  [
1324
2071
  "render-ui",
1325
- "modal",
2072
+ "main",
1326
2073
  {
1327
2074
  "type": "stack",
1328
2075
  "direction": "vertical",
1329
- "gap": "md",
2076
+ "gap": "lg",
1330
2077
  "children": [
1331
2078
  {
1332
2079
  "type": "stack",
1333
2080
  "direction": "horizontal",
1334
- "gap": "sm",
2081
+ "gap": "md",
2082
+ "justify": "space-between",
1335
2083
  "children": [
1336
2084
  {
1337
- "type": "icon",
1338
- "name": "trash-2",
1339
- "size": "md"
2085
+ "type": "stack",
2086
+ "direction": "horizontal",
2087
+ "gap": "sm",
2088
+ "align": "center",
2089
+ "children": [
2090
+ {
2091
+ "type": "icon",
2092
+ "name": "calendar",
2093
+ "size": "lg"
2094
+ },
2095
+ {
2096
+ "type": "typography",
2097
+ "content": "Appointments",
2098
+ "variant": "h2"
2099
+ }
2100
+ ]
1340
2101
  },
1341
2102
  {
1342
- "type": "typography",
1343
- "content": "Delete Appointment",
1344
- "variant": "h3"
2103
+ "type": "stack",
2104
+ "direction": "horizontal",
2105
+ "gap": "sm",
2106
+ "children": [
2107
+ {
2108
+ "type": "button",
2109
+ "label": "Create Appointment",
2110
+ "event": "CREATE",
2111
+ "variant": "primary",
2112
+ "icon": "plus"
2113
+ }
2114
+ ]
1345
2115
  }
1346
2116
  ]
1347
2117
  },
@@ -1349,28 +2119,72 @@
1349
2119
  "type": "divider"
1350
2120
  },
1351
2121
  {
1352
- "type": "typography",
1353
- "content": "Are you sure you want to delete this appointment?",
1354
- "variant": "body"
1355
- },
1356
- {
1357
- "type": "stack",
1358
- "direction": "horizontal",
1359
- "gap": "sm",
1360
- "justify": "end",
1361
- "children": [
2122
+ "type": "data-grid",
2123
+ "entity": "Appointment",
2124
+ "emptyIcon": "inbox",
2125
+ "emptyTitle": "No appointments yet",
2126
+ "emptyDescription": "Create your first appointment to get started.",
2127
+ "itemActions": [
1362
2128
  {
1363
- "type": "button",
1364
- "label": "Cancel",
1365
- "event": "CANCEL",
1366
- "variant": "ghost"
2129
+ "label": "View",
2130
+ "event": "VIEW"
2131
+ },
2132
+ {
2133
+ "label": "Edit",
2134
+ "event": "EDIT"
1367
2135
  },
1368
2136
  {
1369
- "type": "button",
1370
2137
  "label": "Delete",
1371
- "event": "CONFIRM_DELETE",
1372
- "variant": "danger",
1373
- "icon": "trash"
2138
+ "event": "DELETE",
2139
+ "variant": "danger"
2140
+ }
2141
+ ],
2142
+ "className": "transition-shadow hover:shadow-md cursor-pointer",
2143
+ "renderItem": [
2144
+ "fn",
2145
+ "item",
2146
+ {
2147
+ "type": "stack",
2148
+ "direction": "vertical",
2149
+ "gap": "sm",
2150
+ "children": [
2151
+ {
2152
+ "type": "stack",
2153
+ "direction": "horizontal",
2154
+ "justify": "space-between",
2155
+ "align": "center",
2156
+ "children": [
2157
+ {
2158
+ "type": "stack",
2159
+ "direction": "horizontal",
2160
+ "gap": "sm",
2161
+ "align": "center",
2162
+ "children": [
2163
+ {
2164
+ "type": "icon",
2165
+ "name": "calendar",
2166
+ "size": "sm"
2167
+ },
2168
+ {
2169
+ "type": "typography",
2170
+ "variant": "h4",
2171
+ "content": "@item.patientName"
2172
+ }
2173
+ ]
2174
+ },
2175
+ {
2176
+ "type": "badge",
2177
+ "label": "@item.doctorName"
2178
+ }
2179
+ ]
2180
+ },
2181
+ {
2182
+ "type": "typography",
2183
+ "variant": "caption",
2184
+ "color": "muted",
2185
+ "content": "@item.date"
2186
+ }
2187
+ ]
1374
2188
  }
1375
2189
  ]
1376
2190
  }
@@ -1378,56 +2192,6 @@
1378
2192
  }
1379
2193
  ]
1380
2194
  ]
1381
- },
1382
- {
1383
- "from": "deleting",
1384
- "to": "browsing",
1385
- "event": "CONFIRM_DELETE",
1386
- "effects": [
1387
- [
1388
- "persist",
1389
- "delete",
1390
- "Appointment",
1391
- "@entity.id"
1392
- ],
1393
- [
1394
- "render-ui",
1395
- "modal",
1396
- null
1397
- ],
1398
- [
1399
- "fetch",
1400
- "Appointment"
1401
- ],
1402
- [
1403
- "notify",
1404
- "Appointment deleted successfully"
1405
- ]
1406
- ]
1407
- },
1408
- {
1409
- "from": "deleting",
1410
- "to": "browsing",
1411
- "event": "CANCEL",
1412
- "effects": [
1413
- [
1414
- "render-ui",
1415
- "modal",
1416
- null
1417
- ]
1418
- ]
1419
- },
1420
- {
1421
- "from": "deleting",
1422
- "to": "browsing",
1423
- "event": "CLOSE",
1424
- "effects": [
1425
- [
1426
- "render-ui",
1427
- "modal",
1428
- null
1429
- ]
1430
- ]
1431
2195
  }
1432
2196
  ]
1433
2197
  },
@@ -2169,8 +2933,9 @@
2169
2933
  ]
2170
2934
  },
2171
2935
  {
2172
- "type": "badge",
2173
- "label": "Step 1 of 3"
2936
+ "type": "progress-dots",
2937
+ "count": 3,
2938
+ "currentIndex": 0
2174
2939
  },
2175
2940
  {
2176
2941
  "type": "wizard-progress",
@@ -2257,8 +3022,9 @@
2257
3022
  ]
2258
3023
  },
2259
3024
  {
2260
- "type": "badge",
2261
- "label": "Step 2 of 3"
3025
+ "type": "progress-dots",
3026
+ "count": 3,
3027
+ "currentIndex": 1
2262
3028
  },
2263
3029
  {
2264
3030
  "type": "wizard-progress",
@@ -2351,8 +3117,9 @@
2351
3117
  ]
2352
3118
  },
2353
3119
  {
2354
- "type": "badge",
2355
- "label": "Step 3 of 3"
3120
+ "type": "progress-dots",
3121
+ "count": 3,
3122
+ "currentIndex": 2
2356
3123
  },
2357
3124
  {
2358
3125
  "type": "wizard-progress",
@@ -2464,7 +3231,9 @@
2464
3231
  {
2465
3232
  "type": "data-list",
2466
3233
  "entity": "IntakeForm",
2467
- "children": [
3234
+ "renderItem": [
3235
+ "fn",
3236
+ "item",
2468
3237
  {
2469
3238
  "type": "stack",
2470
3239
  "direction": "vertical",
@@ -2484,7 +3253,7 @@
2484
3253
  {
2485
3254
  "type": "typography",
2486
3255
  "variant": "body",
2487
- "content": "@entity.firstName"
3256
+ "content": "@item.firstName"
2488
3257
  }
2489
3258
  ]
2490
3259
  },
@@ -2502,7 +3271,7 @@
2502
3271
  {
2503
3272
  "type": "typography",
2504
3273
  "variant": "body",
2505
- "content": "@entity.lastName"
3274
+ "content": "@item.lastName"
2506
3275
  }
2507
3276
  ]
2508
3277
  },
@@ -2520,7 +3289,7 @@
2520
3289
  {
2521
3290
  "type": "typography",
2522
3291
  "variant": "body",
2523
- "content": "@entity.dateOfBirth"
3292
+ "content": "@item.dateOfBirth"
2524
3293
  }
2525
3294
  ]
2526
3295
  },
@@ -2538,7 +3307,7 @@
2538
3307
  {
2539
3308
  "type": "typography",
2540
3309
  "variant": "body",
2541
- "content": "@entity.allergies"
3310
+ "content": "@item.allergies"
2542
3311
  }
2543
3312
  ]
2544
3313
  },
@@ -2556,7 +3325,7 @@
2556
3325
  {
2557
3326
  "type": "typography",
2558
3327
  "variant": "body",
2559
- "content": "@entity.medications"
3328
+ "content": "@item.medications"
2560
3329
  }
2561
3330
  ]
2562
3331
  },
@@ -2574,7 +3343,7 @@
2574
3343
  {
2575
3344
  "type": "typography",
2576
3345
  "variant": "body",
2577
- "content": "@entity.emergencyContact"
3346
+ "content": "@item.emergencyContact"
2578
3347
  }
2579
3348
  ]
2580
3349
  },
@@ -2592,7 +3361,7 @@
2592
3361
  {
2593
3362
  "type": "typography",
2594
3363
  "variant": "body",
2595
- "content": "@entity.insuranceProvider"
3364
+ "content": "@item.insuranceProvider"
2596
3365
  }
2597
3366
  ]
2598
3367
  },
@@ -2610,7 +3379,7 @@
2610
3379
  {
2611
3380
  "type": "typography",
2612
3381
  "variant": "body",
2613
- "content": "@entity.insuranceId"
3382
+ "content": "@item.insuranceId"
2614
3383
  }
2615
3384
  ]
2616
3385
  }
@@ -2619,26 +3388,12 @@
2619
3388
  ]
2620
3389
  },
2621
3390
  {
2622
- "type": "stack",
2623
- "direction": "horizontal",
2624
- "gap": "sm",
2625
- "justify": "end",
2626
- "children": [
2627
- {
2628
- "type": "button",
2629
- "label": "Back",
2630
- "event": "PREV",
2631
- "variant": "ghost",
2632
- "icon": "arrow-left"
2633
- },
2634
- {
2635
- "type": "button",
2636
- "label": "Submit Intake",
2637
- "event": "COMPLETE",
2638
- "variant": "primary",
2639
- "icon": "check"
2640
- }
2641
- ]
3391
+ "type": "wizard-navigation",
3392
+ "currentStep": 3,
3393
+ "totalSteps": 4,
3394
+ "showBack": true,
3395
+ "showComplete": true,
3396
+ "showNext": false
2642
3397
  }
2643
3398
  ]
2644
3399
  }
@@ -2681,8 +3436,9 @@
2681
3436
  ]
2682
3437
  },
2683
3438
  {
2684
- "type": "badge",
2685
- "label": "Step 1 of 3"
3439
+ "type": "progress-dots",
3440
+ "count": 3,
3441
+ "currentIndex": 0
2686
3442
  },
2687
3443
  {
2688
3444
  "type": "wizard-progress",
@@ -2769,8 +3525,9 @@
2769
3525
  ]
2770
3526
  },
2771
3527
  {
2772
- "type": "badge",
2773
- "label": "Step 2 of 3"
3528
+ "type": "progress-dots",
3529
+ "count": 3,
3530
+ "currentIndex": 1
2774
3531
  },
2775
3532
  {
2776
3533
  "type": "wizard-progress",
@@ -2863,8 +3620,9 @@
2863
3620
  ]
2864
3621
  },
2865
3622
  {
2866
- "type": "badge",
2867
- "label": "Step 3 of 3"
3623
+ "type": "progress-dots",
3624
+ "count": 3,
3625
+ "currentIndex": 2
2868
3626
  },
2869
3627
  {
2870
3628
  "type": "wizard-progress",
@@ -3010,8 +3768,9 @@
3010
3768
  ]
3011
3769
  },
3012
3770
  {
3013
- "type": "badge",
3014
- "label": "Step 1 of 3"
3771
+ "type": "progress-dots",
3772
+ "count": 3,
3773
+ "currentIndex": 0
3015
3774
  },
3016
3775
  {
3017
3776
  "type": "wizard-progress",
@@ -3098,8 +3857,9 @@
3098
3857
  ]
3099
3858
  },
3100
3859
  {
3101
- "type": "badge",
3102
- "label": "Step 1 of 3"
3860
+ "type": "progress-dots",
3861
+ "count": 3,
3862
+ "currentIndex": 0
3103
3863
  },
3104
3864
  {
3105
3865
  "type": "wizard-progress",
@@ -3354,7 +4114,9 @@
3354
4114
  }
3355
4115
  ],
3356
4116
  "className": "transition-shadow hover:shadow-md cursor-pointer",
3357
- "children": [
4117
+ "renderItem": [
4118
+ "fn",
4119
+ "item",
3358
4120
  {
3359
4121
  "type": "stack",
3360
4122
  "direction": "vertical",
@@ -3380,13 +4142,13 @@
3380
4142
  {
3381
4143
  "type": "typography",
3382
4144
  "variant": "h4",
3383
- "content": "@entity.medication"
4145
+ "content": "@item.medication"
3384
4146
  }
3385
4147
  ]
3386
4148
  },
3387
4149
  {
3388
4150
  "type": "badge",
3389
- "label": "@entity.dosage"
4151
+ "label": "@item.dosage"
3390
4152
  }
3391
4153
  ]
3392
4154
  },
@@ -3394,7 +4156,7 @@
3394
4156
  "type": "typography",
3395
4157
  "variant": "caption",
3396
4158
  "color": "muted",
3397
- "content": "@entity.frequency"
4159
+ "content": "@item.frequency"
3398
4160
  }
3399
4161
  ]
3400
4162
  }
@@ -3957,100 +4719,60 @@
3957
4719
  "icon": "refresh-cw"
3958
4720
  }
3959
4721
  ]
3960
- },
3961
- {
3962
- "type": "divider"
3963
- },
3964
- {
3965
- "type": "simple-grid",
3966
- "columns": 4,
3967
- "children": [
3968
- {
3969
- "type": "card",
3970
- "children": [
3971
- {
3972
- "type": "stack",
3973
- "direction": "vertical",
3974
- "gap": "sm",
3975
- "children": [
3976
- {
3977
- "type": "typography",
3978
- "variant": "caption",
3979
- "content": "TotalPatients"
3980
- },
3981
- {
3982
- "type": "typography",
3983
- "variant": "h3",
3984
- "content": "@entity.totalPatients"
3985
- }
3986
- ]
3987
- }
4722
+ },
4723
+ {
4724
+ "type": "divider"
4725
+ },
4726
+ {
4727
+ "type": "simple-grid",
4728
+ "columns": 4,
4729
+ "children": [
4730
+ {
4731
+ "type": "stat-display",
4732
+ "label": "TotalPatients",
4733
+ "value": [
4734
+ "object/get",
4735
+ [
4736
+ "array/first",
4737
+ "@entity"
4738
+ ],
4739
+ "totalPatients"
3988
4740
  ]
3989
4741
  },
3990
4742
  {
3991
- "type": "card",
3992
- "children": [
3993
- {
3994
- "type": "stack",
3995
- "direction": "vertical",
3996
- "gap": "sm",
3997
- "children": [
3998
- {
3999
- "type": "typography",
4000
- "variant": "caption",
4001
- "content": "AppointmentsToday"
4002
- },
4003
- {
4004
- "type": "typography",
4005
- "variant": "h3",
4006
- "content": "@entity.appointmentsToday"
4007
- }
4008
- ]
4009
- }
4743
+ "type": "stat-display",
4744
+ "label": "AppointmentsToday",
4745
+ "value": [
4746
+ "object/get",
4747
+ [
4748
+ "array/first",
4749
+ "@entity"
4750
+ ],
4751
+ "appointmentsToday"
4010
4752
  ]
4011
4753
  },
4012
4754
  {
4013
- "type": "card",
4014
- "children": [
4015
- {
4016
- "type": "stack",
4017
- "direction": "vertical",
4018
- "gap": "sm",
4019
- "children": [
4020
- {
4021
- "type": "typography",
4022
- "variant": "caption",
4023
- "content": "PendingIntakes"
4024
- },
4025
- {
4026
- "type": "typography",
4027
- "variant": "h3",
4028
- "content": "@entity.pendingIntakes"
4029
- }
4030
- ]
4031
- }
4755
+ "type": "stat-display",
4756
+ "label": "PendingIntakes",
4757
+ "value": [
4758
+ "object/get",
4759
+ [
4760
+ "array/first",
4761
+ "@entity"
4762
+ ],
4763
+ "pendingIntakes"
4032
4764
  ]
4033
4765
  },
4034
4766
  {
4035
- "type": "card",
4036
- "children": [
4037
- {
4038
- "type": "stack",
4039
- "direction": "vertical",
4040
- "gap": "sm",
4041
- "children": [
4042
- {
4043
- "type": "typography",
4044
- "variant": "caption",
4045
- "content": "ActivePrescriptions"
4046
- },
4047
- {
4048
- "type": "typography",
4049
- "variant": "h3",
4050
- "content": "@entity.activePrescriptions"
4051
- }
4052
- ]
4053
- }
4767
+ "type": "stat-display",
4768
+ "label": "ActivePrescriptions",
4769
+ "value": [
4770
+ "object/get",
4771
+ [
4772
+ "array/first",
4773
+ "@entity"
4774
+ ],
4775
+ "activePrescriptions"
4054
4776
  ]
4055
4777
  }
4056
4778
  ]
@@ -4117,91 +4839,51 @@
4117
4839
  "columns": 4,
4118
4840
  "children": [
4119
4841
  {
4120
- "type": "card",
4121
- "children": [
4122
- {
4123
- "type": "stack",
4124
- "direction": "vertical",
4125
- "gap": "sm",
4126
- "children": [
4127
- {
4128
- "type": "typography",
4129
- "variant": "caption",
4130
- "content": "TotalPatients"
4131
- },
4132
- {
4133
- "type": "typography",
4134
- "variant": "h3",
4135
- "content": "@entity.totalPatients"
4136
- }
4137
- ]
4138
- }
4842
+ "type": "stat-display",
4843
+ "label": "TotalPatients",
4844
+ "value": [
4845
+ "object/get",
4846
+ [
4847
+ "array/first",
4848
+ "@entity"
4849
+ ],
4850
+ "totalPatients"
4139
4851
  ]
4140
4852
  },
4141
4853
  {
4142
- "type": "card",
4143
- "children": [
4144
- {
4145
- "type": "stack",
4146
- "direction": "vertical",
4147
- "gap": "sm",
4148
- "children": [
4149
- {
4150
- "type": "typography",
4151
- "variant": "caption",
4152
- "content": "AppointmentsToday"
4153
- },
4154
- {
4155
- "type": "typography",
4156
- "variant": "h3",
4157
- "content": "@entity.appointmentsToday"
4158
- }
4159
- ]
4160
- }
4854
+ "type": "stat-display",
4855
+ "label": "AppointmentsToday",
4856
+ "value": [
4857
+ "object/get",
4858
+ [
4859
+ "array/first",
4860
+ "@entity"
4861
+ ],
4862
+ "appointmentsToday"
4161
4863
  ]
4162
4864
  },
4163
4865
  {
4164
- "type": "card",
4165
- "children": [
4166
- {
4167
- "type": "stack",
4168
- "direction": "vertical",
4169
- "gap": "sm",
4170
- "children": [
4171
- {
4172
- "type": "typography",
4173
- "variant": "caption",
4174
- "content": "PendingIntakes"
4175
- },
4176
- {
4177
- "type": "typography",
4178
- "variant": "h3",
4179
- "content": "@entity.pendingIntakes"
4180
- }
4181
- ]
4182
- }
4866
+ "type": "stat-display",
4867
+ "label": "PendingIntakes",
4868
+ "value": [
4869
+ "object/get",
4870
+ [
4871
+ "array/first",
4872
+ "@entity"
4873
+ ],
4874
+ "pendingIntakes"
4183
4875
  ]
4184
4876
  },
4185
4877
  {
4186
- "type": "card",
4187
- "children": [
4188
- {
4189
- "type": "stack",
4190
- "direction": "vertical",
4191
- "gap": "sm",
4192
- "children": [
4193
- {
4194
- "type": "typography",
4195
- "variant": "caption",
4196
- "content": "ActivePrescriptions"
4197
- },
4198
- {
4199
- "type": "typography",
4200
- "variant": "h3",
4201
- "content": "@entity.activePrescriptions"
4202
- }
4203
- ]
4204
- }
4878
+ "type": "stat-display",
4879
+ "label": "ActivePrescriptions",
4880
+ "value": [
4881
+ "object/get",
4882
+ [
4883
+ "array/first",
4884
+ "@entity"
4885
+ ],
4886
+ "activePrescriptions"
4205
4887
  ]
4206
4888
  }
4207
4889
  ]
@@ -4268,91 +4950,51 @@
4268
4950
  "columns": 4,
4269
4951
  "children": [
4270
4952
  {
4271
- "type": "card",
4272
- "children": [
4273
- {
4274
- "type": "stack",
4275
- "direction": "vertical",
4276
- "gap": "sm",
4277
- "children": [
4278
- {
4279
- "type": "typography",
4280
- "variant": "caption",
4281
- "content": "TotalPatients"
4282
- },
4283
- {
4284
- "type": "typography",
4285
- "variant": "h3",
4286
- "content": "@entity.totalPatients"
4287
- }
4288
- ]
4289
- }
4953
+ "type": "stat-display",
4954
+ "label": "TotalPatients",
4955
+ "value": [
4956
+ "object/get",
4957
+ [
4958
+ "array/first",
4959
+ "@entity"
4960
+ ],
4961
+ "totalPatients"
4290
4962
  ]
4291
4963
  },
4292
4964
  {
4293
- "type": "card",
4294
- "children": [
4295
- {
4296
- "type": "stack",
4297
- "direction": "vertical",
4298
- "gap": "sm",
4299
- "children": [
4300
- {
4301
- "type": "typography",
4302
- "variant": "caption",
4303
- "content": "AppointmentsToday"
4304
- },
4305
- {
4306
- "type": "typography",
4307
- "variant": "h3",
4308
- "content": "@entity.appointmentsToday"
4309
- }
4310
- ]
4311
- }
4965
+ "type": "stat-display",
4966
+ "label": "AppointmentsToday",
4967
+ "value": [
4968
+ "object/get",
4969
+ [
4970
+ "array/first",
4971
+ "@entity"
4972
+ ],
4973
+ "appointmentsToday"
4312
4974
  ]
4313
4975
  },
4314
4976
  {
4315
- "type": "card",
4316
- "children": [
4317
- {
4318
- "type": "stack",
4319
- "direction": "vertical",
4320
- "gap": "sm",
4321
- "children": [
4322
- {
4323
- "type": "typography",
4324
- "variant": "caption",
4325
- "content": "PendingIntakes"
4326
- },
4327
- {
4328
- "type": "typography",
4329
- "variant": "h3",
4330
- "content": "@entity.pendingIntakes"
4331
- }
4332
- ]
4333
- }
4977
+ "type": "stat-display",
4978
+ "label": "PendingIntakes",
4979
+ "value": [
4980
+ "object/get",
4981
+ [
4982
+ "array/first",
4983
+ "@entity"
4984
+ ],
4985
+ "pendingIntakes"
4334
4986
  ]
4335
4987
  },
4336
4988
  {
4337
- "type": "card",
4338
- "children": [
4339
- {
4340
- "type": "stack",
4341
- "direction": "vertical",
4342
- "gap": "sm",
4343
- "children": [
4344
- {
4345
- "type": "typography",
4346
- "variant": "caption",
4347
- "content": "ActivePrescriptions"
4348
- },
4349
- {
4350
- "type": "typography",
4351
- "variant": "h3",
4352
- "content": "@entity.activePrescriptions"
4353
- }
4354
- ]
4355
- }
4989
+ "type": "stat-display",
4990
+ "label": "ActivePrescriptions",
4991
+ "value": [
4992
+ "object/get",
4993
+ [
4994
+ "array/first",
4995
+ "@entity"
4996
+ ],
4997
+ "activePrescriptions"
4356
4998
  ]
4357
4999
  }
4358
5000
  ]
@@ -4419,91 +5061,51 @@
4419
5061
  "columns": 4,
4420
5062
  "children": [
4421
5063
  {
4422
- "type": "card",
4423
- "children": [
4424
- {
4425
- "type": "stack",
4426
- "direction": "vertical",
4427
- "gap": "sm",
4428
- "children": [
4429
- {
4430
- "type": "typography",
4431
- "variant": "caption",
4432
- "content": "TotalPatients"
4433
- },
4434
- {
4435
- "type": "typography",
4436
- "variant": "h3",
4437
- "content": "@entity.totalPatients"
4438
- }
4439
- ]
4440
- }
5064
+ "type": "stat-display",
5065
+ "label": "TotalPatients",
5066
+ "value": [
5067
+ "object/get",
5068
+ [
5069
+ "array/first",
5070
+ "@entity"
5071
+ ],
5072
+ "totalPatients"
4441
5073
  ]
4442
5074
  },
4443
5075
  {
4444
- "type": "card",
4445
- "children": [
4446
- {
4447
- "type": "stack",
4448
- "direction": "vertical",
4449
- "gap": "sm",
4450
- "children": [
4451
- {
4452
- "type": "typography",
4453
- "variant": "caption",
4454
- "content": "AppointmentsToday"
4455
- },
4456
- {
4457
- "type": "typography",
4458
- "variant": "h3",
4459
- "content": "@entity.appointmentsToday"
4460
- }
4461
- ]
4462
- }
5076
+ "type": "stat-display",
5077
+ "label": "AppointmentsToday",
5078
+ "value": [
5079
+ "object/get",
5080
+ [
5081
+ "array/first",
5082
+ "@entity"
5083
+ ],
5084
+ "appointmentsToday"
4463
5085
  ]
4464
5086
  },
4465
5087
  {
4466
- "type": "card",
4467
- "children": [
4468
- {
4469
- "type": "stack",
4470
- "direction": "vertical",
4471
- "gap": "sm",
4472
- "children": [
4473
- {
4474
- "type": "typography",
4475
- "variant": "caption",
4476
- "content": "PendingIntakes"
4477
- },
4478
- {
4479
- "type": "typography",
4480
- "variant": "h3",
4481
- "content": "@entity.pendingIntakes"
4482
- }
4483
- ]
4484
- }
5088
+ "type": "stat-display",
5089
+ "label": "PendingIntakes",
5090
+ "value": [
5091
+ "object/get",
5092
+ [
5093
+ "array/first",
5094
+ "@entity"
5095
+ ],
5096
+ "pendingIntakes"
4485
5097
  ]
4486
5098
  },
4487
5099
  {
4488
- "type": "card",
4489
- "children": [
4490
- {
4491
- "type": "stack",
4492
- "direction": "vertical",
4493
- "gap": "sm",
4494
- "children": [
4495
- {
4496
- "type": "typography",
4497
- "variant": "caption",
4498
- "content": "ActivePrescriptions"
4499
- },
4500
- {
4501
- "type": "typography",
4502
- "variant": "h3",
4503
- "content": "@entity.activePrescriptions"
4504
- }
4505
- ]
4506
- }
5100
+ "type": "stat-display",
5101
+ "label": "ActivePrescriptions",
5102
+ "value": [
5103
+ "object/get",
5104
+ [
5105
+ "array/first",
5106
+ "@entity"
5107
+ ],
5108
+ "activePrescriptions"
4507
5109
  ]
4508
5110
  }
4509
5111
  ]
@@ -4570,91 +5172,51 @@
4570
5172
  "columns": 4,
4571
5173
  "children": [
4572
5174
  {
4573
- "type": "card",
4574
- "children": [
4575
- {
4576
- "type": "stack",
4577
- "direction": "vertical",
4578
- "gap": "sm",
4579
- "children": [
4580
- {
4581
- "type": "typography",
4582
- "variant": "caption",
4583
- "content": "TotalPatients"
4584
- },
4585
- {
4586
- "type": "typography",
4587
- "variant": "h3",
4588
- "content": "@entity.totalPatients"
4589
- }
4590
- ]
4591
- }
5175
+ "type": "stat-display",
5176
+ "label": "TotalPatients",
5177
+ "value": [
5178
+ "object/get",
5179
+ [
5180
+ "array/first",
5181
+ "@entity"
5182
+ ],
5183
+ "totalPatients"
4592
5184
  ]
4593
5185
  },
4594
5186
  {
4595
- "type": "card",
4596
- "children": [
4597
- {
4598
- "type": "stack",
4599
- "direction": "vertical",
4600
- "gap": "sm",
4601
- "children": [
4602
- {
4603
- "type": "typography",
4604
- "variant": "caption",
4605
- "content": "AppointmentsToday"
4606
- },
4607
- {
4608
- "type": "typography",
4609
- "variant": "h3",
4610
- "content": "@entity.appointmentsToday"
4611
- }
4612
- ]
4613
- }
5187
+ "type": "stat-display",
5188
+ "label": "AppointmentsToday",
5189
+ "value": [
5190
+ "object/get",
5191
+ [
5192
+ "array/first",
5193
+ "@entity"
5194
+ ],
5195
+ "appointmentsToday"
4614
5196
  ]
4615
5197
  },
4616
5198
  {
4617
- "type": "card",
4618
- "children": [
4619
- {
4620
- "type": "stack",
4621
- "direction": "vertical",
4622
- "gap": "sm",
4623
- "children": [
4624
- {
4625
- "type": "typography",
4626
- "variant": "caption",
4627
- "content": "PendingIntakes"
4628
- },
4629
- {
4630
- "type": "typography",
4631
- "variant": "h3",
4632
- "content": "@entity.pendingIntakes"
4633
- }
4634
- ]
4635
- }
5199
+ "type": "stat-display",
5200
+ "label": "PendingIntakes",
5201
+ "value": [
5202
+ "object/get",
5203
+ [
5204
+ "array/first",
5205
+ "@entity"
5206
+ ],
5207
+ "pendingIntakes"
4636
5208
  ]
4637
5209
  },
4638
5210
  {
4639
- "type": "card",
4640
- "children": [
4641
- {
4642
- "type": "stack",
4643
- "direction": "vertical",
4644
- "gap": "sm",
4645
- "children": [
4646
- {
4647
- "type": "typography",
4648
- "variant": "caption",
4649
- "content": "ActivePrescriptions"
4650
- },
4651
- {
4652
- "type": "typography",
4653
- "variant": "h3",
4654
- "content": "@entity.activePrescriptions"
4655
- }
4656
- ]
4657
- }
5211
+ "type": "stat-display",
5212
+ "label": "ActivePrescriptions",
5213
+ "value": [
5214
+ "object/get",
5215
+ [
5216
+ "array/first",
5217
+ "@entity"
5218
+ ],
5219
+ "activePrescriptions"
4658
5220
  ]
4659
5221
  }
4660
5222
  ]