@epcare/esm-report-builder 0.1.1-pre.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintignore +5 -0
- package/.eslintrc.js +19 -0
- package/.github/workflows/main.yml +162 -0
- package/.prettierrc +8 -0
- package/LICENSE +401 -0
- package/README.md +317 -0
- package/dist/0081d5d3d536cb23.js +1 -0
- package/dist/02acc4469a2fe2e4.woff2 +0 -0
- package/dist/081587ca0db8e63f.woff2 +0 -0
- package/dist/08cf53c4e5e71cf1.woff2 +0 -0
- package/dist/090b2bc014d24ea4.woff2 +0 -0
- package/dist/09de5db63ef7b579.js +1 -0
- package/dist/0ae92bcea615e948.woff2 +0 -0
- package/dist/0be8520d8945b3b7.woff2 +0 -0
- package/dist/0e7dd073cd8bb0ad.woff2 +0 -0
- package/dist/0edb77cd19e43550.js +1 -0
- package/dist/14869ac5d1830304.woff2 +0 -0
- package/dist/14aaceff85fc8b28.woff2 +0 -0
- package/dist/14c3abea79fc1389.js +1 -0
- package/dist/155a4ac079785bfd.js +1 -0
- package/dist/155a4ac079785bfd.js.map +1 -0
- package/dist/16f443eed01776ca.woff2 +0 -0
- package/dist/183bae0e53a22182.woff2 +0 -0
- package/dist/19c8f94ccd6289f5.woff2 +0 -0
- package/dist/1ae86565eab7451c.woff2 +0 -0
- package/dist/1c7bf8797e0a9be6.woff2 +0 -0
- package/dist/1f266d3619b30f16.woff2 +0 -0
- package/dist/1f8c5a4087a524fd.woff2 +0 -0
- package/dist/20ba2b23c5c0cd0b.woff2 +0 -0
- package/dist/22a32bd51591301b.js +1 -0
- package/dist/273c72d90e432a3d.js +1 -0
- package/dist/295dd01a1fbfee6d.woff2 +0 -0
- package/dist/29cbe6827c3f03ef.js +1 -0
- package/dist/2f686985e26e7107.woff2 +0 -0
- package/dist/315eff729e4ccbd9.woff2 +0 -0
- package/dist/368d16e3259bf207.woff2 +0 -0
- package/dist/36c49aa341a7079a.woff2 +0 -0
- package/dist/36e1e0430475edee.woff2 +0 -0
- package/dist/374c3ee36d9e040a.js +1 -0
- package/dist/377971e519bf3f4a.js +2 -0
- package/dist/377971e519bf3f4a.js.LICENSE.txt +39 -0
- package/dist/377971e519bf3f4a.js.map +1 -0
- package/dist/3b0ea8395009dcf3.js +2 -0
- package/dist/3b0ea8395009dcf3.js.LICENSE.txt +9 -0
- package/dist/3b0ea8395009dcf3.js.map +1 -0
- package/dist/3bc19662b8630ee9.woff2 +0 -0
- package/dist/3f645f473b3f8fba.woff2 +0 -0
- package/dist/41320d8930d23b36.js +1 -0
- package/dist/4218ac9901b9d36d.woff2 +0 -0
- package/dist/4659f3ca46d928b5.js +1 -0
- package/dist/4659f3ca46d928b5.js.map +1 -0
- package/dist/4680ba68412e4da9.woff2 +0 -0
- package/dist/48e37bd7ebf85a1f.woff2 +0 -0
- package/dist/4aabceefe5a2494a.js +1 -0
- package/dist/4c188cbaefba58cd.js +1 -0
- package/dist/4e11b8a7c445255f.woff2 +0 -0
- package/dist/537ddd61c5c1fce2.woff2 +0 -0
- package/dist/54f5eee3a7989556.js +1 -0
- package/dist/55c9107b50dd747c.js +1 -0
- package/dist/56c4118c0907f151.woff2 +0 -0
- package/dist/5938bc2ae7ec60c0.woff2 +0 -0
- package/dist/5c6586155f0d278a.woff2 +0 -0
- package/dist/5e50c92017029ca3.js +1 -0
- package/dist/5e50c92017029ca3.js.map +1 -0
- package/dist/600aca7295d8bcb7.js +2 -0
- package/dist/600aca7295d8bcb7.js.LICENSE.txt +9 -0
- package/dist/600aca7295d8bcb7.js.map +1 -0
- package/dist/60ec587649ba812a.woff2 +0 -0
- package/dist/64cf08a5ac3266d8.js +1 -0
- package/dist/652f476a8a1603d3.js +2 -0
- package/dist/652f476a8a1603d3.js.LICENSE.txt +9 -0
- package/dist/652f476a8a1603d3.js.map +1 -0
- package/dist/65e6511e035870e1.woff2 +0 -0
- package/dist/661425f6798cd16a.woff2 +0 -0
- package/dist/66b864fe213caf46.woff2 +0 -0
- package/dist/680eb791e6266590.js +2 -0
- package/dist/680eb791e6266590.js.LICENSE.txt +19 -0
- package/dist/680eb791e6266590.js.map +1 -0
- package/dist/69d087d970ee9455.woff2 +0 -0
- package/dist/69e3aa4276b4cb4b.js +1 -0
- package/dist/6a88f03fc4e7c3da.js +1 -0
- package/dist/6c6c45e66ff54281.woff2 +0 -0
- package/dist/6d9009857c6df878.js +1 -0
- package/dist/6ebe7cea59ed2853.js +1 -0
- package/dist/6f3181849e740935.js +1 -0
- package/dist/6f3181849e740935.js.map +1 -0
- package/dist/7073a7323e92bd11.woff2 +0 -0
- package/dist/70ac433ae2a89a89.js +1 -0
- package/dist/70ee4ee625ac0ec1.js +1 -0
- package/dist/718c6cc31274ab1a.woff2 +0 -0
- package/dist/727696c3934d0966.js +1 -0
- package/dist/727763c0f0df59dc.js +1 -0
- package/dist/727763c0f0df59dc.js.map +1 -0
- package/dist/72cdbedfe04be9f9.woff2 +0 -0
- package/dist/7509c9f56fe9e532.woff2 +0 -0
- package/dist/75dc5c5b04adc8bf.woff2 +0 -0
- package/dist/77b48bc05299ecca.woff2 +0 -0
- package/dist/7a0a0215c248c73d.woff2 +0 -0
- package/dist/7c0d0c5180de8729.js +1 -0
- package/dist/7f00bebb24e40167.woff2 +0 -0
- package/dist/802c6176541eeed7.woff2 +0 -0
- package/dist/8080081b3379c637.woff2 +0 -0
- package/dist/81cfdaeaa0bbca1f.js +1 -0
- package/dist/8605507b7a8487c4.woff2 +0 -0
- package/dist/893a160d06428365.js +1 -0
- package/dist/893a160d06428365.js.map +1 -0
- package/dist/8a83d654702f6534.woff2 +0 -0
- package/dist/8fe71173a13fe571.woff2 +0 -0
- package/dist/94aa912dcac90114.js +1 -0
- package/dist/9624cec0f9bdd81e.woff2 +0 -0
- package/dist/98a3af55a1698171.woff2 +0 -0
- package/dist/99823aaebba56f46.js +1 -0
- package/dist/9ba85996af74c5ce.woff2 +0 -0
- package/dist/9ddb22faa35006e7.woff2 +0 -0
- package/dist/a167fb2799dd741b.woff2 +0 -0
- package/dist/a2045a5cc4fdf94f.woff2 +0 -0
- package/dist/a246c73905a31c93.woff2 +0 -0
- package/dist/a325099b0a580ce2.js +2 -0
- package/dist/a325099b0a580ce2.js.LICENSE.txt +14 -0
- package/dist/a325099b0a580ce2.js.map +1 -0
- package/dist/a401aa7939cb6e6f.woff2 +0 -0
- package/dist/a40fef67997d3b2c.js +1 -0
- package/dist/a62897b000a24b86.js +1 -0
- package/dist/a6ed036f17a1ea29.woff2 +0 -0
- package/dist/a77bac4877483a0a.js +1 -0
- package/dist/a9f25ca430709a1a.woff2 +0 -0
- package/dist/aa0dfbdd569b1c24.js +2 -0
- package/dist/aa0dfbdd569b1c24.js.LICENSE.txt +5 -0
- package/dist/aa0dfbdd569b1c24.js.map +1 -0
- package/dist/ab0f637d6cff12e4.js +1 -0
- package/dist/afa9121a49e95351.woff2 +0 -0
- package/dist/afcda12d9f805543.woff2 +0 -0
- package/dist/b09ded85a7da77f1.woff2 +0 -0
- package/dist/b10dbe5318a91a12.js +1 -0
- package/dist/b2f4e9d1e821b71c.woff2 +0 -0
- package/dist/b4a074bf828bb757.woff2 +0 -0
- package/dist/b7f447da43f6e596.woff2 +0 -0
- package/dist/bcca84a524572d10.woff2 +0 -0
- package/dist/be093e052a6d50eb.js +1 -0
- package/dist/be4d1f97b11d087c.woff2 +0 -0
- package/dist/bec14780d81164de.woff2 +0 -0
- package/dist/c31657fe213c1b5e.js +1 -0
- package/dist/c49ef726d3f0420b.js +1 -0
- package/dist/c553f7e0199c5084.woff2 +0 -0
- package/dist/c94ac2fdc1ff1418.js +1 -0
- package/dist/c9d9ce9f465df4fe.woff2 +0 -0
- package/dist/cbbb57b397433964.js +2 -0
- package/dist/cbbb57b397433964.js.LICENSE.txt +14 -0
- package/dist/cbbb57b397433964.js.map +1 -0
- package/dist/d188f7f036ac5779.woff2 +0 -0
- package/dist/d1aa59bd9c702dc4.js +2 -0
- package/dist/d1aa59bd9c702dc4.js.LICENSE.txt +32 -0
- package/dist/d1aa59bd9c702dc4.js.map +1 -0
- package/dist/d265d81c58525ae4.woff2 +0 -0
- package/dist/d5942cd81663e136.woff2 +0 -0
- package/dist/d66b8ff73d95cabb.woff2 +0 -0
- package/dist/d84bac6d07672dd2.js +1 -0
- package/dist/d84bac6d07672dd2.js.map +1 -0
- package/dist/d88899ef0fd16719.woff2 +0 -0
- package/dist/d92b5ecf31fc187b.js +1 -0
- package/dist/d9a5d958e69e058d.woff2 +0 -0
- package/dist/dac90d495be353a0.woff2 +0 -0
- package/dist/db0550511978dc47.js +1 -0
- package/dist/dd8ce598529c3fab.woff2 +0 -0
- package/dist/de013f1be25103fa.woff2 +0 -0
- package/dist/df222fceeffca849.woff2 +0 -0
- package/dist/df22bda08ec7964c.js +1 -0
- package/dist/e05b7f902b02a251.js +1 -0
- package/dist/e05b7f902b02a251.js.map +1 -0
- package/dist/e465f1481f0d2e1c.js +1 -0
- package/dist/e62b00b9199c1ac9.woff2 +0 -0
- package/dist/e696cef1407b2610.woff2 +0 -0
- package/dist/eb42de5422d9af00.js +1 -0
- package/dist/eed48feba743e21c.woff2 +0 -0
- package/dist/f135ef54213f8975.js +1 -0
- package/dist/f260e50923d4283b.js +1 -0
- package/dist/f543c88feb236d11.woff2 +0 -0
- package/dist/f591b0079faa93fe.woff2 +0 -0
- package/dist/f6ed27923769ad1d.woff2 +0 -0
- package/dist/f8d066e92ea157c6.js +1 -0
- package/dist/fae042506530c1e6.js +1 -0
- package/dist/favicon.ico +0 -0
- package/dist/fbebeb4336e67012.woff2 +0 -0
- package/dist/fd574df77d31a5eb.js +1 -0
- package/dist/icon_128x128.3dde25c6e69b1c010a6a5d6b27b3f436.png +0 -0
- package/dist/icon_144x144.e263e02b838d229b02ff9133e6e0f2ba.png +0 -0
- package/dist/icon_192x192.d3d318638bbe8a10a3c687d3d302d01a.png +0 -0
- package/dist/icon_256x256.c729f6e7e914b58fcea5ce91d7aa9bad.png +0 -0
- package/dist/icon_384x384.c8923df6b6bd08eba5c79b78d7fcecc0.png +0 -0
- package/dist/icon_512x512.7163efb26df832de513bc58d925ea22e.png +0 -0
- package/dist/icon_96x96.682ee334ae19d49894217370b8596f61.png +0 -0
- package/dist/index.html +9 -0
- package/dist/logo-512.png +0 -0
- package/dist/logo.svg +30 -0
- package/dist/manifest.266df36f2271d27ae9bcaa196a2976ae.json +47 -0
- package/dist/openmrs.39723c21cec4b1fc.css +1 -0
- package/dist/openmrs.39723c21cec4b1fc.css.map +1 -0
- package/dist/openmrs.44bac4c8520ee42f.css +2 -0
- package/dist/openmrs.44bac4c8520ee42f.css.map +1 -0
- package/dist/openmrs.936e8cf6a4b1599d.css +2 -0
- package/dist/openmrs.936e8cf6a4b1599d.css.map +1 -0
- package/dist/openmrs.c3adea28ef850516.js +1 -0
- package/dist/openmrs.c3adea28ef850516.js.map +1 -0
- package/dist/openmrs.e4daba1e3b840e70.css +25 -0
- package/dist/openmrs.e4daba1e3b840e70.css.map +1 -0
- package/dist/service-worker.js +1 -0
- package/dist/service-worker.js.map +1 -0
- package/dist-build-23687264126/0081d5d3d536cb23.js +1 -0
- package/dist-build-23687264126/02acc4469a2fe2e4.woff2 +0 -0
- package/dist-build-23687264126/081587ca0db8e63f.woff2 +0 -0
- package/dist-build-23687264126/08cf53c4e5e71cf1.woff2 +0 -0
- package/dist-build-23687264126/090b2bc014d24ea4.woff2 +0 -0
- package/dist-build-23687264126/09de5db63ef7b579.js +1 -0
- package/dist-build-23687264126/0ae92bcea615e948.woff2 +0 -0
- package/dist-build-23687264126/0be8520d8945b3b7.woff2 +0 -0
- package/dist-build-23687264126/0e7dd073cd8bb0ad.woff2 +0 -0
- package/dist-build-23687264126/0edb77cd19e43550.js +1 -0
- package/dist-build-23687264126/14869ac5d1830304.woff2 +0 -0
- package/dist-build-23687264126/14aaceff85fc8b28.woff2 +0 -0
- package/dist-build-23687264126/14c3abea79fc1389.js +1 -0
- package/dist-build-23687264126/155a4ac079785bfd.js +1 -0
- package/dist-build-23687264126/155a4ac079785bfd.js.map +1 -0
- package/dist-build-23687264126/16f443eed01776ca.woff2 +0 -0
- package/dist-build-23687264126/183bae0e53a22182.woff2 +0 -0
- package/dist-build-23687264126/19c8f94ccd6289f5.woff2 +0 -0
- package/dist-build-23687264126/1ae86565eab7451c.woff2 +0 -0
- package/dist-build-23687264126/1c7bf8797e0a9be6.woff2 +0 -0
- package/dist-build-23687264126/1f266d3619b30f16.woff2 +0 -0
- package/dist-build-23687264126/1f8c5a4087a524fd.woff2 +0 -0
- package/dist-build-23687264126/20ba2b23c5c0cd0b.woff2 +0 -0
- package/dist-build-23687264126/22a32bd51591301b.js +1 -0
- package/dist-build-23687264126/273c72d90e432a3d.js +1 -0
- package/dist-build-23687264126/295dd01a1fbfee6d.woff2 +0 -0
- package/dist-build-23687264126/29cbe6827c3f03ef.js +1 -0
- package/dist-build-23687264126/2f686985e26e7107.woff2 +0 -0
- package/dist-build-23687264126/315eff729e4ccbd9.woff2 +0 -0
- package/dist-build-23687264126/368d16e3259bf207.woff2 +0 -0
- package/dist-build-23687264126/36c49aa341a7079a.woff2 +0 -0
- package/dist-build-23687264126/36e1e0430475edee.woff2 +0 -0
- package/dist-build-23687264126/374c3ee36d9e040a.js +1 -0
- package/dist-build-23687264126/377971e519bf3f4a.js +2 -0
- package/dist-build-23687264126/377971e519bf3f4a.js.LICENSE.txt +39 -0
- package/dist-build-23687264126/377971e519bf3f4a.js.map +1 -0
- package/dist-build-23687264126/3b0ea8395009dcf3.js +2 -0
- package/dist-build-23687264126/3b0ea8395009dcf3.js.LICENSE.txt +9 -0
- package/dist-build-23687264126/3b0ea8395009dcf3.js.map +1 -0
- package/dist-build-23687264126/3bc19662b8630ee9.woff2 +0 -0
- package/dist-build-23687264126/3f645f473b3f8fba.woff2 +0 -0
- package/dist-build-23687264126/41320d8930d23b36.js +1 -0
- package/dist-build-23687264126/4218ac9901b9d36d.woff2 +0 -0
- package/dist-build-23687264126/4659f3ca46d928b5.js +1 -0
- package/dist-build-23687264126/4659f3ca46d928b5.js.map +1 -0
- package/dist-build-23687264126/4680ba68412e4da9.woff2 +0 -0
- package/dist-build-23687264126/48e37bd7ebf85a1f.woff2 +0 -0
- package/dist-build-23687264126/4aabceefe5a2494a.js +1 -0
- package/dist-build-23687264126/4c188cbaefba58cd.js +1 -0
- package/dist-build-23687264126/4e11b8a7c445255f.woff2 +0 -0
- package/dist-build-23687264126/537ddd61c5c1fce2.woff2 +0 -0
- package/dist-build-23687264126/54f5eee3a7989556.js +1 -0
- package/dist-build-23687264126/55c9107b50dd747c.js +1 -0
- package/dist-build-23687264126/56c4118c0907f151.woff2 +0 -0
- package/dist-build-23687264126/5938bc2ae7ec60c0.woff2 +0 -0
- package/dist-build-23687264126/5c6586155f0d278a.woff2 +0 -0
- package/dist-build-23687264126/5e50c92017029ca3.js +1 -0
- package/dist-build-23687264126/5e50c92017029ca3.js.map +1 -0
- package/dist-build-23687264126/600aca7295d8bcb7.js +2 -0
- package/dist-build-23687264126/600aca7295d8bcb7.js.LICENSE.txt +9 -0
- package/dist-build-23687264126/600aca7295d8bcb7.js.map +1 -0
- package/dist-build-23687264126/60ec587649ba812a.woff2 +0 -0
- package/dist-build-23687264126/64cf08a5ac3266d8.js +1 -0
- package/dist-build-23687264126/652f476a8a1603d3.js +2 -0
- package/dist-build-23687264126/652f476a8a1603d3.js.LICENSE.txt +9 -0
- package/dist-build-23687264126/652f476a8a1603d3.js.map +1 -0
- package/dist-build-23687264126/65e6511e035870e1.woff2 +0 -0
- package/dist-build-23687264126/661425f6798cd16a.woff2 +0 -0
- package/dist-build-23687264126/66b864fe213caf46.woff2 +0 -0
- package/dist-build-23687264126/680eb791e6266590.js +2 -0
- package/dist-build-23687264126/680eb791e6266590.js.LICENSE.txt +19 -0
- package/dist-build-23687264126/680eb791e6266590.js.map +1 -0
- package/dist-build-23687264126/69d087d970ee9455.woff2 +0 -0
- package/dist-build-23687264126/69e3aa4276b4cb4b.js +1 -0
- package/dist-build-23687264126/6a88f03fc4e7c3da.js +1 -0
- package/dist-build-23687264126/6c6c45e66ff54281.woff2 +0 -0
- package/dist-build-23687264126/6d9009857c6df878.js +1 -0
- package/dist-build-23687264126/6ebe7cea59ed2853.js +1 -0
- package/dist-build-23687264126/6f3181849e740935.js +1 -0
- package/dist-build-23687264126/6f3181849e740935.js.map +1 -0
- package/dist-build-23687264126/7073a7323e92bd11.woff2 +0 -0
- package/dist-build-23687264126/70ac433ae2a89a89.js +1 -0
- package/dist-build-23687264126/70ee4ee625ac0ec1.js +1 -0
- package/dist-build-23687264126/718c6cc31274ab1a.woff2 +0 -0
- package/dist-build-23687264126/727696c3934d0966.js +1 -0
- package/dist-build-23687264126/727763c0f0df59dc.js +1 -0
- package/dist-build-23687264126/727763c0f0df59dc.js.map +1 -0
- package/dist-build-23687264126/72cdbedfe04be9f9.woff2 +0 -0
- package/dist-build-23687264126/7509c9f56fe9e532.woff2 +0 -0
- package/dist-build-23687264126/75dc5c5b04adc8bf.woff2 +0 -0
- package/dist-build-23687264126/77b48bc05299ecca.woff2 +0 -0
- package/dist-build-23687264126/7a0a0215c248c73d.woff2 +0 -0
- package/dist-build-23687264126/7c0d0c5180de8729.js +1 -0
- package/dist-build-23687264126/7f00bebb24e40167.woff2 +0 -0
- package/dist-build-23687264126/802c6176541eeed7.woff2 +0 -0
- package/dist-build-23687264126/8080081b3379c637.woff2 +0 -0
- package/dist-build-23687264126/81cfdaeaa0bbca1f.js +1 -0
- package/dist-build-23687264126/8605507b7a8487c4.woff2 +0 -0
- package/dist-build-23687264126/893a160d06428365.js +1 -0
- package/dist-build-23687264126/893a160d06428365.js.map +1 -0
- package/dist-build-23687264126/8a83d654702f6534.woff2 +0 -0
- package/dist-build-23687264126/8fe71173a13fe571.woff2 +0 -0
- package/dist-build-23687264126/94aa912dcac90114.js +1 -0
- package/dist-build-23687264126/9624cec0f9bdd81e.woff2 +0 -0
- package/dist-build-23687264126/98a3af55a1698171.woff2 +0 -0
- package/dist-build-23687264126/99823aaebba56f46.js +1 -0
- package/dist-build-23687264126/9ba85996af74c5ce.woff2 +0 -0
- package/dist-build-23687264126/9ddb22faa35006e7.woff2 +0 -0
- package/dist-build-23687264126/a167fb2799dd741b.woff2 +0 -0
- package/dist-build-23687264126/a2045a5cc4fdf94f.woff2 +0 -0
- package/dist-build-23687264126/a246c73905a31c93.woff2 +0 -0
- package/dist-build-23687264126/a325099b0a580ce2.js +2 -0
- package/dist-build-23687264126/a325099b0a580ce2.js.LICENSE.txt +14 -0
- package/dist-build-23687264126/a325099b0a580ce2.js.map +1 -0
- package/dist-build-23687264126/a401aa7939cb6e6f.woff2 +0 -0
- package/dist-build-23687264126/a40fef67997d3b2c.js +1 -0
- package/dist-build-23687264126/a62897b000a24b86.js +1 -0
- package/dist-build-23687264126/a6ed036f17a1ea29.woff2 +0 -0
- package/dist-build-23687264126/a77bac4877483a0a.js +1 -0
- package/dist-build-23687264126/a9f25ca430709a1a.woff2 +0 -0
- package/dist-build-23687264126/aa0dfbdd569b1c24.js +2 -0
- package/dist-build-23687264126/aa0dfbdd569b1c24.js.LICENSE.txt +5 -0
- package/dist-build-23687264126/aa0dfbdd569b1c24.js.map +1 -0
- package/dist-build-23687264126/ab0f637d6cff12e4.js +1 -0
- package/dist-build-23687264126/afa9121a49e95351.woff2 +0 -0
- package/dist-build-23687264126/afcda12d9f805543.woff2 +0 -0
- package/dist-build-23687264126/b09ded85a7da77f1.woff2 +0 -0
- package/dist-build-23687264126/b10dbe5318a91a12.js +1 -0
- package/dist-build-23687264126/b2f4e9d1e821b71c.woff2 +0 -0
- package/dist-build-23687264126/b4a074bf828bb757.woff2 +0 -0
- package/dist-build-23687264126/b7f447da43f6e596.woff2 +0 -0
- package/dist-build-23687264126/bcca84a524572d10.woff2 +0 -0
- package/dist-build-23687264126/be093e052a6d50eb.js +1 -0
- package/dist-build-23687264126/be4d1f97b11d087c.woff2 +0 -0
- package/dist-build-23687264126/bec14780d81164de.woff2 +0 -0
- package/dist-build-23687264126/c31657fe213c1b5e.js +1 -0
- package/dist-build-23687264126/c49ef726d3f0420b.js +1 -0
- package/dist-build-23687264126/c553f7e0199c5084.woff2 +0 -0
- package/dist-build-23687264126/c94ac2fdc1ff1418.js +1 -0
- package/dist-build-23687264126/c9d9ce9f465df4fe.woff2 +0 -0
- package/dist-build-23687264126/cbbb57b397433964.js +2 -0
- package/dist-build-23687264126/cbbb57b397433964.js.LICENSE.txt +14 -0
- package/dist-build-23687264126/cbbb57b397433964.js.map +1 -0
- package/dist-build-23687264126/d188f7f036ac5779.woff2 +0 -0
- package/dist-build-23687264126/d1aa59bd9c702dc4.js +2 -0
- package/dist-build-23687264126/d1aa59bd9c702dc4.js.LICENSE.txt +32 -0
- package/dist-build-23687264126/d1aa59bd9c702dc4.js.map +1 -0
- package/dist-build-23687264126/d265d81c58525ae4.woff2 +0 -0
- package/dist-build-23687264126/d5942cd81663e136.woff2 +0 -0
- package/dist-build-23687264126/d66b8ff73d95cabb.woff2 +0 -0
- package/dist-build-23687264126/d84bac6d07672dd2.js +1 -0
- package/dist-build-23687264126/d84bac6d07672dd2.js.map +1 -0
- package/dist-build-23687264126/d88899ef0fd16719.woff2 +0 -0
- package/dist-build-23687264126/d92b5ecf31fc187b.js +1 -0
- package/dist-build-23687264126/d9a5d958e69e058d.woff2 +0 -0
- package/dist-build-23687264126/dac90d495be353a0.woff2 +0 -0
- package/dist-build-23687264126/db0550511978dc47.js +1 -0
- package/dist-build-23687264126/dd8ce598529c3fab.woff2 +0 -0
- package/dist-build-23687264126/de013f1be25103fa.woff2 +0 -0
- package/dist-build-23687264126/df222fceeffca849.woff2 +0 -0
- package/dist-build-23687264126/df22bda08ec7964c.js +1 -0
- package/dist-build-23687264126/e05b7f902b02a251.js +1 -0
- package/dist-build-23687264126/e05b7f902b02a251.js.map +1 -0
- package/dist-build-23687264126/e465f1481f0d2e1c.js +1 -0
- package/dist-build-23687264126/e62b00b9199c1ac9.woff2 +0 -0
- package/dist-build-23687264126/e696cef1407b2610.woff2 +0 -0
- package/dist-build-23687264126/eb42de5422d9af00.js +1 -0
- package/dist-build-23687264126/eed48feba743e21c.woff2 +0 -0
- package/dist-build-23687264126/f135ef54213f8975.js +1 -0
- package/dist-build-23687264126/f260e50923d4283b.js +1 -0
- package/dist-build-23687264126/f543c88feb236d11.woff2 +0 -0
- package/dist-build-23687264126/f591b0079faa93fe.woff2 +0 -0
- package/dist-build-23687264126/f6ed27923769ad1d.woff2 +0 -0
- package/dist-build-23687264126/f8d066e92ea157c6.js +1 -0
- package/dist-build-23687264126/fae042506530c1e6.js +1 -0
- package/dist-build-23687264126/favicon.ico +0 -0
- package/dist-build-23687264126/fbebeb4336e67012.woff2 +0 -0
- package/dist-build-23687264126/fd574df77d31a5eb.js +1 -0
- package/dist-build-23687264126/icon_128x128.3dde25c6e69b1c010a6a5d6b27b3f436.png +0 -0
- package/dist-build-23687264126/icon_144x144.e263e02b838d229b02ff9133e6e0f2ba.png +0 -0
- package/dist-build-23687264126/icon_192x192.d3d318638bbe8a10a3c687d3d302d01a.png +0 -0
- package/dist-build-23687264126/icon_256x256.c729f6e7e914b58fcea5ce91d7aa9bad.png +0 -0
- package/dist-build-23687264126/icon_384x384.c8923df6b6bd08eba5c79b78d7fcecc0.png +0 -0
- package/dist-build-23687264126/icon_512x512.7163efb26df832de513bc58d925ea22e.png +0 -0
- package/dist-build-23687264126/icon_96x96.682ee334ae19d49894217370b8596f61.png +0 -0
- package/dist-build-23687264126/index.html +9 -0
- package/dist-build-23687264126/logo-512.png +0 -0
- package/dist-build-23687264126/logo.svg +30 -0
- package/dist-build-23687264126/manifest.266df36f2271d27ae9bcaa196a2976ae.json +47 -0
- package/dist-build-23687264126/openmrs.39723c21cec4b1fc.css +1 -0
- package/dist-build-23687264126/openmrs.39723c21cec4b1fc.css.map +1 -0
- package/dist-build-23687264126/openmrs.44bac4c8520ee42f.css +2 -0
- package/dist-build-23687264126/openmrs.44bac4c8520ee42f.css.map +1 -0
- package/dist-build-23687264126/openmrs.936e8cf6a4b1599d.css +2 -0
- package/dist-build-23687264126/openmrs.936e8cf6a4b1599d.css.map +1 -0
- package/dist-build-23687264126/openmrs.c3adea28ef850516.js +1 -0
- package/dist-build-23687264126/openmrs.c3adea28ef850516.js.map +1 -0
- package/dist-build-23687264126/openmrs.e4daba1e3b840e70.css +25 -0
- package/dist-build-23687264126/openmrs.e4daba1e3b840e70.css.map +1 -0
- package/dist-build-23687264126/service-worker.js +1 -0
- package/dist-build-23687264126/service-worker.js.map +1 -0
- package/e2e/core/env.ts +5 -0
- package/e2e/core/global-setup.ts +34 -0
- package/e2e/core/test.ts +21 -0
- package/e2e/pages/app-shell.page.ts +34 -0
- package/e2e/pages/etl-sources.page.ts +35 -0
- package/e2e/pages/report-sections.page.ts +20 -0
- package/e2e/pages/section-preview.modal.ts +29 -0
- package/e2e/specs/etl-sources.spec.ts +51 -0
- package/e2e/specs/navigation.spec.ts +13 -0
- package/e2e/specs/section-preview-validation.spec.ts +38 -0
- package/e2e/specs/section-preview.spec.ts +94 -0
- package/e2e/tsconfig.json +11 -0
- package/example.env +5 -0
- package/jest.config.js +28 -0
- package/package.json +82 -0
- package/playwright.config.ts +28 -0
- package/src/admin-card-link.extension.module.scss +55 -0
- package/src/admin-card-link.extension.tsx +24 -0
- package/src/components/admin/admin-page.component.tsx +31 -0
- package/src/components/admin/age-categories-page.component.tsx +109 -0
- package/src/components/admin/age-groups-page.component.tsx +146 -0
- package/src/components/admin/etl-sources-page.component.tsx +344 -0
- package/src/components/admin/report-categories-page.component.tsx +256 -0
- package/src/components/admin/report-library-page.component.tsx +540 -0
- package/src/components/ai-support/ai-assist-button.component.tsx +30 -0
- package/src/components/ai-support/ai-assist-modal.component.tsx +81 -0
- package/src/components/ai-support/ai.service.ts +21 -0
- package/src/components/ai-support/ai.types.ts +12 -0
- package/src/components/app-shell/report-builder-shell.component.tsx +120 -0
- package/src/components/app-shell/report-builder-shell.scss +15 -0
- package/src/components/data-themes/data-theme-form.component.tsx +59 -0
- package/src/components/data-themes/data-theme-modal.component.tsx +349 -0
- package/src/components/data-themes/data-themes-page.component.tsx +132 -0
- package/src/components/data-themes/data-themes-table.component.tsx +91 -0
- package/src/components/data-themes/icon-registry.ts +35 -0
- package/src/components/data-themes/sections/data-theme-basics.section.tsx +63 -0
- package/src/components/data-themes/sections/data-theme-condition-columns.section.tsx +397 -0
- package/src/components/data-themes/sections/data-theme-fields-editor.section.tsx +125 -0
- package/src/components/data-themes/sections/data-theme-metadata.section.tsx +245 -0
- package/src/components/data-themes/sections/data-theme-preview.section.tsx +115 -0
- package/src/components/data-themes/sections/data-theme-source.section.tsx +184 -0
- package/src/components/indicators/README.md +24 -0
- package/src/components/indicators/base-indicator-basic-fields.component.tsx +18 -0
- package/src/components/indicators/base-indicator-basics.section.tsx +54 -0
- package/src/components/indicators/base-indicator-countby.section.tsx +25 -0
- package/src/components/indicators/base-indicator-criteria.section.tsx +83 -0
- package/src/components/indicators/base-indicator-details-form.component.tsx +80 -0
- package/src/components/indicators/base-indicator-theme-unit-fields.component.tsx +39 -0
- package/src/components/indicators/create-base-indicator-modal.component.tsx +501 -0
- package/src/components/indicators/create-composite-base-indicator-modal.component.tsx +297 -0
- package/src/components/indicators/create-final-indicator-modal.component.tsx +260 -0
- package/src/components/indicators/diagnosis-filters-form.component.tsx +101 -0
- package/src/components/indicators/disaggregation-panel.component.tsx +93 -0
- package/src/components/indicators/handler/concept-search-multiselect.component.tsx +153 -0
- package/src/components/indicators/handler/question-answer-concept-search.component.tsx +336 -0
- package/src/components/indicators/indicator-status-tag.component.tsx +9 -0
- package/src/components/indicators/indicators-page.component.tsx +481 -0
- package/src/components/indicators/indicators-page.scss +121 -0
- package/src/components/indicators/indicators-table.component.tsx +166 -0
- package/src/components/indicators/preview-table.component.tsx +31 -0
- package/src/components/indicators/sections/composite-indicator-basics.section.tsx +36 -0
- package/src/components/indicators/sections/composite-indicator-picker.section.tsx +161 -0
- package/src/components/indicators/sections/composite-indicator-sql-preview.section.tsx +31 -0
- package/src/components/indicators/sections/final-indicator-basics.section.tsx +46 -0
- package/src/components/indicators/sections/final-indicator-disaggregation.section.tsx +47 -0
- package/src/components/indicators/sections/final-indicator-picker.section.tsx +92 -0
- package/src/components/indicators/sections/final-indicator-preview.section.tsx +20 -0
- package/src/components/indicators/sections/final-indicator-results-preview.section.tsx +65 -0
- package/src/components/indicators/sections/indicator-basics.section.tsx +40 -0
- package/src/components/indicators/sections/indicator-conditions.section.tsx +194 -0
- package/src/components/indicators/sections/indicator-sql-preview.section.tsx +26 -0
- package/src/components/indicators/sections/indicator-theme.section.tsx +48 -0
- package/src/components/indicators/sql-preview.component.tsx +19 -0
- package/src/components/indicators/types/base-indicator-form.types.ts +17 -0
- package/src/components/indicators/types/base-indicator-theme.constants.ts +8 -0
- package/src/components/indicators/types/composite-indicator.types.ts +21 -0
- package/src/components/indicators/types/condition-ui.types.ts +11 -0
- package/src/components/indicators/types/data-theme-config.types.ts +88 -0
- package/src/components/indicators/types/indicator-types.ts +56 -0
- package/src/components/indicators/types/sql-builders.ts +43 -0
- package/src/components/indicators/utils/composite-indicator-sql.utils.ts +206 -0
- package/src/components/indicators/utils/concept-preload.utils.ts +21 -0
- package/src/components/indicators/utils/final-indicator-sql.utils.ts +124 -0
- package/src/components/indicators/utils/indicator-conditions-hydration.utils.ts +254 -0
- package/src/components/indicators/utils/indicator-sql.utils.ts +185 -0
- package/src/components/landing/landing-action-item.component.tsx +50 -0
- package/src/components/landing/landing-action-list.component.tsx +12 -0
- package/src/components/landing/landing-activity-list.component.tsx +47 -0
- package/src/components/landing/landing-footer-grid.component.tsx +45 -0
- package/src/components/landing/landing-hero.component.tsx +18 -0
- package/src/components/landing/landing-section-card.component.tsx +33 -0
- package/src/components/landing/report-builder-landing-page.component.tsx +103 -0
- package/src/components/landing/report-builder-landing-page.scss +131 -0
- package/src/components/report/dashboard/reports-table.component.tsx +145 -0
- package/src/components/report/definition/panels/properties-panel.component.tsx +38 -0
- package/src/components/report/definition/panels/report-structure-panel.component.tsx +61 -0
- package/src/components/report/definition/panels/selection-panel.component.tsx +58 -0
- package/src/components/report/definition/report-definition-editor.component.tsx +99 -0
- package/src/components/report/definition/report-definition.types.ts +66 -0
- package/src/components/report/design/panels/IndicatorPropertiesPanel.scss +33 -0
- package/src/components/report/design/panels/IndicatorPropertiesPanel.tsx +389 -0
- package/src/components/report/design/panels/JsonPreviewPanel.scss +32 -0
- package/src/components/report/design/panels/JsonPreviewPanel.tsx +104 -0
- package/src/components/report/design/panels/mapping-preview-panel.component.tsx +82 -0
- package/src/components/report/design/panels/mapping-preview-panel.scss +55 -0
- package/src/components/report/design/panels/template-structure-panel.component.tsx +296 -0
- package/src/components/report/design/panels/template-structure-panel.scss +81 -0
- package/src/components/report/design/report-design-editor.component.tsx +894 -0
- package/src/components/report/design/report-design.types.ts +43 -0
- package/src/components/report/design/report-design.utils.ts +86 -0
- package/src/components/report/panels/report-detail.component.tsx +71 -0
- package/src/components/report/panels/report-panel-shell.component.tsx +60 -0
- package/src/components/report/report-dashboard.page.component.tsx +75 -0
- package/src/components/report/report-editor.page.component.tsx +466 -0
- package/src/components/report/report.routes.tsx +30 -0
- package/src/components/report-sections/create-report-section-modal.component.tsx +278 -0
- package/src/components/report-sections/hooks/useAgeCategories.ts +25 -0
- package/src/components/report-sections/hooks/useSectionEditorState.ts +306 -0
- package/src/components/report-sections/panels/Dhis2MappingPanel.tsx +157 -0
- package/src/components/report-sections/panels/DisaggregationPanel.tsx +97 -0
- package/src/components/report-sections/panels/IndicatorPickerPanel.tsx +143 -0
- package/src/components/report-sections/panels/SectionBasicsPanel.tsx +27 -0
- package/src/components/report-sections/report-section-preview-modal.component.tsx +418 -0
- package/src/components/report-sections/report-sections-page.component.tsx +313 -0
- package/src/components/report-sections/section-types.ts +55 -0
- package/src/components/report-sections/section-utils.ts +46 -0
- package/src/components/report-sections/sections-page.scss +79 -0
- package/src/components/run-reports/run-reports-page.component.tsx +23 -0
- package/src/components/shared/header/builder-header-actions.component.tsx +38 -0
- package/src/components/shared/header/header.component.tsx +85 -0
- package/src/components/shared/header/header.scss +150 -0
- package/src/components/shared/header/illustration.component.tsx +34 -0
- package/src/components/shared/indicator-properties-panel/IndicatorPropertiesPanel.scss +33 -0
- package/src/components/shared/indicator-properties-panel/IndicatorPropertiesPanel.tsx +389 -0
- package/src/components/shared/json-preview-panel/JsonPreviewPanel.scss +32 -0
- package/src/components/shared/json-preview-panel/JsonPreviewPanel.tsx +104 -0
- package/src/components/shared/mapping-preview-panel/mapping-preview-panel.component.tsx +82 -0
- package/src/components/shared/mapping-preview-panel/mapping-preview-panel.scss +55 -0
- package/src/components/shared/preview/query-results-preview.component.tsx +204 -0
- package/src/components/shared/template-structure-panel/template-structure-panel.component.tsx +296 -0
- package/src/components/shared/template-structure-panel/template-structure-panel.scss +81 -0
- package/src/config-schema.ts +23 -0
- package/src/globals.d.ts +14 -0
- package/src/hooks/theme/useDataThemes.ts +28 -0
- package/src/hooks/theme/useMambaTableMeta.ts +34 -0
- package/src/hooks/theme/useMambaTables.ts +63 -0
- package/src/index.ts +23 -0
- package/src/resources/agegroup/agegroups.api.ts +58 -0
- package/src/resources/concepts/concept-mapper.ts +21 -0
- package/src/resources/concepts/concept-types.ts +31 -0
- package/src/resources/concepts/concepts.resource.ts +44 -0
- package/src/resources/concepts/useConceptSearch.ts +41 -0
- package/src/resources/etl-source/etl-source.api.ts +65 -0
- package/src/resources/indicator/indicators.api.ts +125 -0
- package/src/resources/openmrs-api.ts +24 -0
- package/src/resources/preview/sql-preview.api.ts +54 -0
- package/src/resources/report/reports.api.ts +117 -0
- package/src/resources/report-category/report-category.api.ts +41 -0
- package/src/resources/report-library/report-library.api.ts +63 -0
- package/src/resources/report-section/report-sections.api.ts +73 -0
- package/src/resources/report-section/section-preview.api.ts +21 -0
- package/src/resources/theme/data-theme.api.ts +88 -0
- package/src/resources/theme/mamba-schema.api.ts +31 -0
- package/src/resources/theme/mamba-table-meta.api.ts +45 -0
- package/src/root.component.tsx +20 -0
- package/src/routes/report-builder.routes.tsx +66 -0
- package/src/routes/report-builder.scss +56 -0
- package/src/routes.json +21 -0
- package/src/sample-template.ts +121 -0
- package/src/template-utils.ts +110 -0
- package/src/types/carbon-react-inert.d.ts +13 -0
- package/src/types/condition-operators.ts +49 -0
- package/src/types/theme/data-theme.types.ts +88 -0
- package/src/utils/html-entities.utils.ts +23 -0
- package/tools/setup-tests.ts +1 -0
- package/translations/en.json +4 -0
- package/tsconfig.json +43 -0
- package/webpack.config.js +14 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Checkbox } from '@carbon/react';
|
|
3
|
+
|
|
4
|
+
export type DisaggregationState = {
|
|
5
|
+
gender: { enabled: boolean; male: boolean; female: boolean };
|
|
6
|
+
ageGroups: { enabled: boolean; g0_4: boolean; g5_14: boolean; g15_24: boolean; g25plus: boolean };
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
type Props = {
|
|
10
|
+
value: DisaggregationState;
|
|
11
|
+
onChange: (next: DisaggregationState) => void;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
function readChecked(arg1: any, arg2?: any): boolean {
|
|
15
|
+
// Carbon Checkbox `onChange` differs by version:
|
|
16
|
+
// - sometimes (checked, id, event)
|
|
17
|
+
// - sometimes (event, { checked, id })
|
|
18
|
+
if (typeof arg1 === 'boolean') return arg1;
|
|
19
|
+
if (arg2 && typeof arg2.checked === 'boolean') return arg2.checked;
|
|
20
|
+
return Boolean(arg1?.target?.checked);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const DisaggregationPanel: React.FC<Props> = ({ value, onChange }) => {
|
|
24
|
+
const set = (patch: Partial<DisaggregationState>) => onChange({ ...value, ...patch });
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<div style={{ border: '1px solid var(--cds-border-subtle, #e0e0e0)', borderRadius: 8, padding: '0.75rem' }}>
|
|
28
|
+
<div style={{ fontWeight: 600, marginBottom: '0.5rem' }}>Disaggregation</div>
|
|
29
|
+
|
|
30
|
+
<Checkbox
|
|
31
|
+
id="gender-enabled"
|
|
32
|
+
labelText="Gender"
|
|
33
|
+
checked={value.gender.enabled}
|
|
34
|
+
onChange={(a, b) => set({ gender: { ...value.gender, enabled: readChecked(a, b) } })}
|
|
35
|
+
/>
|
|
36
|
+
<div style={{ display: 'flex', gap: '1rem', paddingLeft: '1.5rem', marginBottom: '0.75rem' }}>
|
|
37
|
+
<Checkbox
|
|
38
|
+
id="male"
|
|
39
|
+
labelText="Male"
|
|
40
|
+
disabled={!value.gender.enabled}
|
|
41
|
+
checked={value.gender.male}
|
|
42
|
+
onChange={(a, b) => set({ gender: { ...value.gender, male: readChecked(a, b) } })}
|
|
43
|
+
/>
|
|
44
|
+
<Checkbox
|
|
45
|
+
id="female"
|
|
46
|
+
labelText="Female"
|
|
47
|
+
disabled={!value.gender.enabled}
|
|
48
|
+
checked={value.gender.female}
|
|
49
|
+
onChange={(a, b) => set({ gender: { ...value.gender, female: readChecked(a, b) } })}
|
|
50
|
+
/>
|
|
51
|
+
</div>
|
|
52
|
+
|
|
53
|
+
<Checkbox
|
|
54
|
+
id="age-enabled"
|
|
55
|
+
labelText="Age Groups"
|
|
56
|
+
checked={value.ageGroups.enabled}
|
|
57
|
+
onChange={(a, b) => set({ ageGroups: { ...value.ageGroups, enabled: readChecked(a, b) } })}
|
|
58
|
+
/>
|
|
59
|
+
<div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: '0.5rem', paddingLeft: '1.5rem' }}>
|
|
60
|
+
<Checkbox
|
|
61
|
+
id="g0_4"
|
|
62
|
+
labelText="0-4"
|
|
63
|
+
disabled={!value.ageGroups.enabled}
|
|
64
|
+
checked={value.ageGroups.g0_4}
|
|
65
|
+
onChange={(a, b) => set({ ageGroups: { ...value.ageGroups, g0_4: readChecked(a, b) } })}
|
|
66
|
+
/>
|
|
67
|
+
<Checkbox
|
|
68
|
+
id="g5_14"
|
|
69
|
+
labelText="5-14"
|
|
70
|
+
disabled={!value.ageGroups.enabled}
|
|
71
|
+
checked={value.ageGroups.g5_14}
|
|
72
|
+
onChange={(a, b) => set({ ageGroups: { ...value.ageGroups, g5_14: readChecked(a, b) } })}
|
|
73
|
+
/>
|
|
74
|
+
<Checkbox
|
|
75
|
+
id="g15_24"
|
|
76
|
+
labelText="15-24"
|
|
77
|
+
disabled={!value.ageGroups.enabled}
|
|
78
|
+
checked={value.ageGroups.g15_24}
|
|
79
|
+
onChange={(a, b) => set({ ageGroups: { ...value.ageGroups, g15_24: readChecked(a, b) } })}
|
|
80
|
+
/>
|
|
81
|
+
<Checkbox
|
|
82
|
+
id="g25plus"
|
|
83
|
+
labelText="25+"
|
|
84
|
+
disabled={!value.ageGroups.enabled}
|
|
85
|
+
checked={value.ageGroups.g25plus}
|
|
86
|
+
onChange={(a, b) => set({ ageGroups: { ...value.ageGroups, g25plus: readChecked(a, b) } })}
|
|
87
|
+
/>
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
);
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
export default DisaggregationPanel;
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ComboBox, InlineLoading, Tag } from '@carbon/react';
|
|
3
|
+
|
|
4
|
+
import { useConceptSearch } from '../../../resources/concepts/useConceptSearch';
|
|
5
|
+
import type { ConceptSummary } from '../../../resources/concepts/concept-types';
|
|
6
|
+
|
|
7
|
+
export type SelectedConcept = {
|
|
8
|
+
id: number;
|
|
9
|
+
uuid: string;
|
|
10
|
+
display: string;
|
|
11
|
+
|
|
12
|
+
icd10Code?: string;
|
|
13
|
+
icd11Code?: string;
|
|
14
|
+
|
|
15
|
+
conceptClass?: string;
|
|
16
|
+
datatype?: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
type Props = {
|
|
20
|
+
id: string;
|
|
21
|
+
labelText: string;
|
|
22
|
+
helperText?: string;
|
|
23
|
+
|
|
24
|
+
/** FULL selected objects (self-contained). */
|
|
25
|
+
value: SelectedConcept[];
|
|
26
|
+
|
|
27
|
+
/** emits FULL selections */
|
|
28
|
+
onChange: (next: SelectedConcept[]) => void;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
function extractCodeFromMappingDisplay(mappingDisplay: string, systemPrefix: string) {
|
|
32
|
+
const raw = (mappingDisplay ?? '').trim();
|
|
33
|
+
const prefix = `${systemPrefix}:`;
|
|
34
|
+
if (!raw.startsWith(prefix)) return undefined;
|
|
35
|
+
|
|
36
|
+
const remainder = raw.slice(prefix.length).trim();
|
|
37
|
+
if (!remainder) return undefined;
|
|
38
|
+
|
|
39
|
+
const token = remainder.split(' ')[0]?.split('(')[0]?.trim();
|
|
40
|
+
return token || undefined;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function getIcd10And11(concept: ConceptSummary) {
|
|
44
|
+
const mappings = concept.mappings ?? [];
|
|
45
|
+
let icd10: string | undefined;
|
|
46
|
+
let icd11: string | undefined;
|
|
47
|
+
|
|
48
|
+
for (const m of mappings) {
|
|
49
|
+
const disp = m?.display ?? '';
|
|
50
|
+
if (!icd10) icd10 = extractCodeFromMappingDisplay(disp, 'ICD-10-WHO');
|
|
51
|
+
if (!icd11) icd11 = extractCodeFromMappingDisplay(disp, 'ICD-11-WHO');
|
|
52
|
+
if (icd10 && icd11) break;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return { icd10Code: icd10, icd11Code: icd11 };
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function toSelectedConcept(c: ConceptSummary): SelectedConcept {
|
|
59
|
+
const { icd10Code, icd11Code } = getIcd10And11(c);
|
|
60
|
+
|
|
61
|
+
return {
|
|
62
|
+
id: Number(c.id) || 0,
|
|
63
|
+
uuid: c.uuid,
|
|
64
|
+
display: c.display,
|
|
65
|
+
icd10Code,
|
|
66
|
+
icd11Code,
|
|
67
|
+
conceptClass: c.conceptClass?.name,
|
|
68
|
+
datatype: c.datatype?.name,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function itemToString(c: ConceptSummary | null) {
|
|
73
|
+
if (!c) return '';
|
|
74
|
+
const { icd10Code, icd11Code } = getIcd10And11(c);
|
|
75
|
+
|
|
76
|
+
const bits: string[] = [];
|
|
77
|
+
if (icd10Code) bits.push(`ICD-10:${icd10Code}`);
|
|
78
|
+
if (icd11Code) bits.push(`ICD-11:${icd11Code}`);
|
|
79
|
+
if (c.conceptClass?.name) bits.push(c.conceptClass.name);
|
|
80
|
+
|
|
81
|
+
return bits.length ? `${c.display} • ${bits.join(' • ')}` : c.display;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export default function ConceptSearchMultiSelect({ id, labelText, helperText, value, onChange }: Props) {
|
|
85
|
+
const [query, setQuery] = React.useState('');
|
|
86
|
+
const { loading, results, error } = useConceptSearch(query);
|
|
87
|
+
|
|
88
|
+
const addSelected = React.useCallback(
|
|
89
|
+
(picked: ConceptSummary | null) => {
|
|
90
|
+
if (!picked) return;
|
|
91
|
+
|
|
92
|
+
const pickedSelected = toSelectedConcept(picked);
|
|
93
|
+
|
|
94
|
+
const next = new Map<string, SelectedConcept>();
|
|
95
|
+
for (const x of value ?? []) next.set(x.uuid, x);
|
|
96
|
+
next.set(pickedSelected.uuid, pickedSelected);
|
|
97
|
+
|
|
98
|
+
onChange(Array.from(next.values()));
|
|
99
|
+
},
|
|
100
|
+
[onChange, value],
|
|
101
|
+
);
|
|
102
|
+
|
|
103
|
+
const removeSelectedUuid = React.useCallback(
|
|
104
|
+
(uuid: string) => {
|
|
105
|
+
onChange((value ?? []).filter((x) => x.uuid !== uuid));
|
|
106
|
+
},
|
|
107
|
+
[onChange, value],
|
|
108
|
+
);
|
|
109
|
+
|
|
110
|
+
return (
|
|
111
|
+
<div>
|
|
112
|
+
<div style={{ marginBottom: '0.5rem', fontWeight: 600 }}>{labelText}</div>
|
|
113
|
+
{helperText ? (
|
|
114
|
+
<div style={{ fontSize: '0.875rem', opacity: 0.8, marginBottom: '0.75rem' }}>{helperText}</div>
|
|
115
|
+
) : null}
|
|
116
|
+
|
|
117
|
+
<ComboBox
|
|
118
|
+
id={`${id}-search`}
|
|
119
|
+
titleText="Search concepts"
|
|
120
|
+
items={results ?? []}
|
|
121
|
+
itemToString={itemToString}
|
|
122
|
+
placeholder="Type to search concepts…"
|
|
123
|
+
onInputChange={(text) => setQuery(String(text ?? ''))}
|
|
124
|
+
onChange={(e: any) => addSelected(e?.selectedItem ?? null)}
|
|
125
|
+
/>
|
|
126
|
+
|
|
127
|
+
<div style={{ marginTop: '0.5rem' }}>
|
|
128
|
+
{loading ? <InlineLoading description="Searching…" /> : null}
|
|
129
|
+
{!loading && error ? (
|
|
130
|
+
<div style={{ fontSize: '0.875rem', color: 'var(--cds-text-error, #da1e28)' }}>{error}</div>
|
|
131
|
+
) : null}
|
|
132
|
+
</div>
|
|
133
|
+
|
|
134
|
+
{value?.length ? (
|
|
135
|
+
<div style={{ marginTop: '0.75rem', display: 'flex', flexWrap: 'wrap', gap: '0.5rem' }}>
|
|
136
|
+
{value.map((x) => (
|
|
137
|
+
<Tag
|
|
138
|
+
key={x.uuid}
|
|
139
|
+
type="gray"
|
|
140
|
+
filter
|
|
141
|
+
onClose={() => removeSelectedUuid(x.uuid)}
|
|
142
|
+
title={x.icd10Code || x.icd11Code ? `${x.display}` : x.display}
|
|
143
|
+
>
|
|
144
|
+
{x.display}
|
|
145
|
+
{x.icd10Code ? ` • ICD-10:${x.icd10Code}` : ''}
|
|
146
|
+
{x.icd11Code ? ` • ICD-11:${x.icd11Code}` : ''}
|
|
147
|
+
</Tag>
|
|
148
|
+
))}
|
|
149
|
+
</div>
|
|
150
|
+
) : null}
|
|
151
|
+
</div>
|
|
152
|
+
);
|
|
153
|
+
}
|
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ComboBox, InlineLoading, Tag } from '@carbon/react';
|
|
3
|
+
|
|
4
|
+
import { useConceptSearch } from '../../../resources/concepts/useConceptSearch';
|
|
5
|
+
import type { ConceptSummary } from '../../../resources/concepts/concept-types';
|
|
6
|
+
import { getConceptAnswers } from '../../../resources/concepts/concepts.resource';
|
|
7
|
+
|
|
8
|
+
import type { SelectedConcept } from './concept-search-multiselect.component';
|
|
9
|
+
|
|
10
|
+
type Value = {
|
|
11
|
+
questions: SelectedConcept[]; // ✅ multi
|
|
12
|
+
answers: SelectedConcept[];
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
type Props = {
|
|
16
|
+
id: string;
|
|
17
|
+
labelText: string;
|
|
18
|
+
helperText?: string;
|
|
19
|
+
|
|
20
|
+
questionsLabelText?: string;
|
|
21
|
+
answersLabelText?: string;
|
|
22
|
+
|
|
23
|
+
value: Value;
|
|
24
|
+
onChange: (next: Value) => void;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
function extractCodeFromMappingDisplay(mappingDisplay: string, systemPrefix: string) {
|
|
28
|
+
const raw = (mappingDisplay ?? '').trim();
|
|
29
|
+
const prefix = `${systemPrefix}:`;
|
|
30
|
+
if (!raw.startsWith(prefix)) return undefined;
|
|
31
|
+
|
|
32
|
+
const remainder = raw.slice(prefix.length).trim();
|
|
33
|
+
if (!remainder) return undefined;
|
|
34
|
+
|
|
35
|
+
const token = remainder.split(' ')[0]?.split('(')[0]?.trim();
|
|
36
|
+
return token || undefined;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function getIcd10And11(concept: ConceptSummary) {
|
|
40
|
+
const mappings = concept.mappings ?? [];
|
|
41
|
+
let icd10: string | undefined;
|
|
42
|
+
let icd11: string | undefined;
|
|
43
|
+
|
|
44
|
+
for (const m of mappings) {
|
|
45
|
+
const disp = m?.display ?? '';
|
|
46
|
+
if (!icd10) icd10 = extractCodeFromMappingDisplay(disp, 'ICD-10-WHO');
|
|
47
|
+
if (!icd11) icd11 = extractCodeFromMappingDisplay(disp, 'ICD-11-WHO');
|
|
48
|
+
if (icd10 && icd11) break;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return { icd10Code: icd10, icd11Code: icd11 };
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function toSelectedConcept(c: ConceptSummary): SelectedConcept {
|
|
55
|
+
const { icd10Code, icd11Code } = getIcd10And11(c);
|
|
56
|
+
|
|
57
|
+
return {
|
|
58
|
+
id: Number(c.id) || 0,
|
|
59
|
+
uuid: c.uuid,
|
|
60
|
+
display: c.display,
|
|
61
|
+
icd10Code,
|
|
62
|
+
icd11Code,
|
|
63
|
+
conceptClass: c.conceptClass?.name,
|
|
64
|
+
datatype: c.datatype?.name,
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function itemToString(c: ConceptSummary | null) {
|
|
69
|
+
if (!c) return '';
|
|
70
|
+
const { icd10Code, icd11Code } = getIcd10And11(c);
|
|
71
|
+
|
|
72
|
+
const bits: string[] = [];
|
|
73
|
+
if (icd10Code) bits.push(`ICD-10:${icd10Code}`);
|
|
74
|
+
if (icd11Code) bits.push(`ICD-11:${icd11Code}`);
|
|
75
|
+
if (c.conceptClass?.name) bits.push(c.conceptClass.name);
|
|
76
|
+
|
|
77
|
+
return bits.length ? `${c.display} • ${bits.join(' • ')}` : c.display;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function selectedToString(c: SelectedConcept | null) {
|
|
81
|
+
if (!c) return '';
|
|
82
|
+
const bits: string[] = [];
|
|
83
|
+
if (c.icd10Code) bits.push(`ICD-10:${c.icd10Code}`);
|
|
84
|
+
if (c.icd11Code) bits.push(`ICD-11:${c.icd11Code}`);
|
|
85
|
+
if (c.conceptClass) bits.push(c.conceptClass);
|
|
86
|
+
return bits.length ? `${c.display} • ${bits.join(' • ')}` : c.display;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export default function QuestionAnswerConceptSearch({
|
|
90
|
+
id,
|
|
91
|
+
labelText,
|
|
92
|
+
helperText,
|
|
93
|
+
questionsLabelText = 'Question concept(s)',
|
|
94
|
+
answersLabelText = 'Expected answers',
|
|
95
|
+
value,
|
|
96
|
+
onChange,
|
|
97
|
+
}: Props) {
|
|
98
|
+
// Question search
|
|
99
|
+
const [qQuery, setQQuery] = React.useState('');
|
|
100
|
+
const { loading: qLoading, results: qResults, error: qError } = useConceptSearch(qQuery);
|
|
101
|
+
|
|
102
|
+
// Answers derived from selected questions
|
|
103
|
+
const [answersOptions, setAnswersOptions] = React.useState<SelectedConcept[]>([]);
|
|
104
|
+
const [aLoading, setALoading] = React.useState(false);
|
|
105
|
+
const [aError, setAError] = React.useState<string | null>(null);
|
|
106
|
+
|
|
107
|
+
// Used only to clear ComboBox input after picking an answer
|
|
108
|
+
const [answerComboKey, setAnswerComboKey] = React.useState(0);
|
|
109
|
+
const [questionComboKey, setQuestionComboKey] = React.useState(0);
|
|
110
|
+
|
|
111
|
+
const selectedQuestions = value.questions ?? [];
|
|
112
|
+
const selectedAnswers = value.answers ?? [];
|
|
113
|
+
|
|
114
|
+
const mergeUniqueByUuid = React.useCallback((xs: SelectedConcept[]) => {
|
|
115
|
+
const m = new Map<string, SelectedConcept>();
|
|
116
|
+
for (const x of xs ?? []) {
|
|
117
|
+
if (x?.uuid) m.set(x.uuid, x);
|
|
118
|
+
}
|
|
119
|
+
return Array.from(m.values());
|
|
120
|
+
}, []);
|
|
121
|
+
|
|
122
|
+
const loadAnswersForQuestions = React.useCallback(
|
|
123
|
+
async (questionUuids: string[], signal?: AbortSignal) => {
|
|
124
|
+
setALoading(true);
|
|
125
|
+
setAError(null);
|
|
126
|
+
setAnswersOptions([]);
|
|
127
|
+
|
|
128
|
+
try {
|
|
129
|
+
const uniqQ = Array.from(new Set(questionUuids.filter(Boolean)));
|
|
130
|
+
if (!uniqQ.length) {
|
|
131
|
+
setAnswersOptions([]);
|
|
132
|
+
setAError(null);
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// fetch answers per question, then union
|
|
137
|
+
const answerLists = await Promise.all(
|
|
138
|
+
uniqQ.map(async (qUuid) => {
|
|
139
|
+
try {
|
|
140
|
+
const answers = await getConceptAnswers(qUuid, signal);
|
|
141
|
+
return (answers ?? []).map(toSelectedConcept).filter((x) => Boolean(x.uuid));
|
|
142
|
+
} catch {
|
|
143
|
+
return [];
|
|
144
|
+
}
|
|
145
|
+
}),
|
|
146
|
+
);
|
|
147
|
+
|
|
148
|
+
const merged = mergeUniqueByUuid(answerLists.flat());
|
|
149
|
+
|
|
150
|
+
if (!merged.length) {
|
|
151
|
+
setAError('Selected question(s) have no configured answers. Please choose a different question.');
|
|
152
|
+
setAnswersOptions([]);
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
setAnswersOptions(merged);
|
|
157
|
+
|
|
158
|
+
// keep currently selected answers only if still valid
|
|
159
|
+
const allowed = new Set(merged.map((x) => x.uuid));
|
|
160
|
+
const filtered = (selectedAnswers ?? []).filter((a) => a?.uuid && allowed.has(a.uuid));
|
|
161
|
+
if (filtered.length !== (selectedAnswers?.length ?? 0)) {
|
|
162
|
+
onChange({ questions: selectedQuestions, answers: filtered });
|
|
163
|
+
}
|
|
164
|
+
} finally {
|
|
165
|
+
setALoading(false);
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
[mergeUniqueByUuid, onChange, selectedAnswers, selectedQuestions],
|
|
169
|
+
);
|
|
170
|
+
|
|
171
|
+
// whenever questions change, reload and union answers
|
|
172
|
+
React.useEffect(() => {
|
|
173
|
+
const uuids = (selectedQuestions ?? []).map((q) => q.uuid).filter(Boolean);
|
|
174
|
+
if (!uuids.length) {
|
|
175
|
+
setAnswersOptions([]);
|
|
176
|
+
setAError(null);
|
|
177
|
+
setALoading(false);
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
const ac = new AbortController();
|
|
182
|
+
loadAnswersForQuestions(uuids, ac.signal);
|
|
183
|
+
return () => ac.abort();
|
|
184
|
+
}, [loadAnswersForQuestions, selectedQuestions]);
|
|
185
|
+
|
|
186
|
+
const addQuestion = (picked: ConceptSummary | null) => {
|
|
187
|
+
if (!picked) return;
|
|
188
|
+
|
|
189
|
+
const nextQ = toSelectedConcept(picked);
|
|
190
|
+
const next = mergeUniqueByUuid([...(selectedQuestions ?? []), nextQ]);
|
|
191
|
+
|
|
192
|
+
onChange({ questions: next, answers: selectedAnswers });
|
|
193
|
+
|
|
194
|
+
// reset question combobox input
|
|
195
|
+
setQuestionComboKey((k) => k + 1);
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
const removeQuestionUuid = (uuid: string) => {
|
|
199
|
+
const nextQ = (selectedQuestions ?? []).filter((q) => q.uuid !== uuid);
|
|
200
|
+
onChange({ questions: nextQ, answers: selectedAnswers });
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
const clearAllQuestions = () => {
|
|
204
|
+
onChange({ questions: [], answers: [] });
|
|
205
|
+
setAnswersOptions([]);
|
|
206
|
+
setAError(null);
|
|
207
|
+
setALoading(false);
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
const addAnswer = (picked: SelectedConcept | null) => {
|
|
211
|
+
if (!picked) return;
|
|
212
|
+
|
|
213
|
+
const next = mergeUniqueByUuid([...(selectedAnswers ?? []), picked]);
|
|
214
|
+
onChange({ questions: selectedQuestions, answers: next });
|
|
215
|
+
|
|
216
|
+
// reset answer combobox input
|
|
217
|
+
setAnswerComboKey((k) => k + 1);
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
const removeAnswerUuid = (uuid: string) => {
|
|
221
|
+
onChange({ questions: selectedQuestions, answers: (selectedAnswers ?? []).filter((x) => x.uuid !== uuid) });
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
const canPickAnswers = (selectedQuestions?.length ?? 0) > 0 && !aLoading && !aError;
|
|
225
|
+
|
|
226
|
+
return (
|
|
227
|
+
<div>
|
|
228
|
+
<div style={{ marginBottom: '0.5rem', fontWeight: 600 }}>{labelText}</div>
|
|
229
|
+
{helperText ? (
|
|
230
|
+
<div style={{ fontSize: '0.875rem', opacity: 0.8, marginBottom: '0.75rem' }}>{helperText}</div>
|
|
231
|
+
) : null}
|
|
232
|
+
|
|
233
|
+
{/* Questions */}
|
|
234
|
+
<div style={{ marginBottom: '1rem' }}>
|
|
235
|
+
<div style={{ marginBottom: '0.5rem', fontWeight: 600 }}>{questionsLabelText}</div>
|
|
236
|
+
|
|
237
|
+
<ComboBox
|
|
238
|
+
key={questionComboKey}
|
|
239
|
+
id={`${id}-questions`}
|
|
240
|
+
titleText="Search question concept"
|
|
241
|
+
items={qResults ?? []}
|
|
242
|
+
itemToString={itemToString}
|
|
243
|
+
placeholder="Type to search question…"
|
|
244
|
+
onInputChange={(text) => setQQuery(String(text ?? ''))}
|
|
245
|
+
onChange={(e: any) => addQuestion(e?.selectedItem ?? null)}
|
|
246
|
+
/>
|
|
247
|
+
|
|
248
|
+
<div style={{ marginTop: '0.5rem' }}>
|
|
249
|
+
{qLoading ? <InlineLoading description="Searching…" /> : null}
|
|
250
|
+
{!qLoading && qError ? (
|
|
251
|
+
<div style={{ fontSize: '0.875rem', color: 'var(--cds-text-error, #da1e28)' }}>{qError}</div>
|
|
252
|
+
) : null}
|
|
253
|
+
</div>
|
|
254
|
+
|
|
255
|
+
{selectedQuestions?.length ? (
|
|
256
|
+
<div style={{ marginTop: '0.75rem', display: 'flex', flexWrap: 'wrap', gap: '0.5rem' }}>
|
|
257
|
+
{selectedQuestions.map((q) => (
|
|
258
|
+
<Tag
|
|
259
|
+
key={q.uuid}
|
|
260
|
+
type="gray"
|
|
261
|
+
filter
|
|
262
|
+
onClose={() => removeQuestionUuid(q.uuid)}
|
|
263
|
+
title={selectedToString(q)}
|
|
264
|
+
>
|
|
265
|
+
{q.display}
|
|
266
|
+
{q.icd10Code ? ` • ICD-10:${q.icd10Code}` : ''}
|
|
267
|
+
{q.icd11Code ? ` • ICD-11:${q.icd11Code}` : ''}
|
|
268
|
+
</Tag>
|
|
269
|
+
))}
|
|
270
|
+
|
|
271
|
+
<Tag type="red" filter onClose={clearAllQuestions} title="Clear all questions">
|
|
272
|
+
Clear all
|
|
273
|
+
</Tag>
|
|
274
|
+
</div>
|
|
275
|
+
) : null}
|
|
276
|
+
</div>
|
|
277
|
+
|
|
278
|
+
{/* Answers */}
|
|
279
|
+
<div>
|
|
280
|
+
<div style={{ marginBottom: '0.5rem', fontWeight: 600 }}>{answersLabelText}</div>
|
|
281
|
+
|
|
282
|
+
{(selectedQuestions?.length ?? 0) > 0 ? (
|
|
283
|
+
<div style={{ fontSize: '0.875rem', opacity: 0.8, marginBottom: '0.75rem' }}>
|
|
284
|
+
Pick answer concept(s) for selected question(s).
|
|
285
|
+
</div>
|
|
286
|
+
) : (
|
|
287
|
+
<div style={{ fontSize: '0.875rem', opacity: 0.8, marginBottom: '0.75rem' }}>
|
|
288
|
+
Select at least one question first to load allowed answers.
|
|
289
|
+
</div>
|
|
290
|
+
)}
|
|
291
|
+
|
|
292
|
+
{aLoading ? <InlineLoading description="Loading answers…" /> : null}
|
|
293
|
+
{!aLoading && aError ? (
|
|
294
|
+
<div
|
|
295
|
+
style={{
|
|
296
|
+
fontSize: '0.875rem',
|
|
297
|
+
color: 'var(--cds-text-error, #da1e28)',
|
|
298
|
+
marginBottom: '0.75rem',
|
|
299
|
+
}}
|
|
300
|
+
>
|
|
301
|
+
{aError}
|
|
302
|
+
</div>
|
|
303
|
+
) : null}
|
|
304
|
+
|
|
305
|
+
<ComboBox
|
|
306
|
+
key={answerComboKey}
|
|
307
|
+
id={`${id}-answers`}
|
|
308
|
+
titleText="Select answer"
|
|
309
|
+
items={answersOptions}
|
|
310
|
+
itemToString={(x) => selectedToString(x)}
|
|
311
|
+
disabled={!canPickAnswers}
|
|
312
|
+
placeholder={canPickAnswers ? 'Type to filter answers…' : 'Answers disabled'}
|
|
313
|
+
onChange={(e: any) => addAnswer(e?.selectedItem ?? null)}
|
|
314
|
+
/>
|
|
315
|
+
|
|
316
|
+
{selectedAnswers?.length ? (
|
|
317
|
+
<div style={{ marginTop: '0.75rem', display: 'flex', flexWrap: 'wrap', gap: '0.5rem' }}>
|
|
318
|
+
{selectedAnswers.map((x) => (
|
|
319
|
+
<Tag
|
|
320
|
+
key={x.uuid}
|
|
321
|
+
type="gray"
|
|
322
|
+
filter
|
|
323
|
+
onClose={() => removeAnswerUuid(x.uuid)}
|
|
324
|
+
title={selectedToString(x)}
|
|
325
|
+
>
|
|
326
|
+
{x.display}
|
|
327
|
+
{x.icd10Code ? ` • ICD-10:${x.icd10Code}` : ''}
|
|
328
|
+
{x.icd11Code ? ` • ICD-11:${x.icd11Code}` : ''}
|
|
329
|
+
</Tag>
|
|
330
|
+
))}
|
|
331
|
+
</div>
|
|
332
|
+
) : null}
|
|
333
|
+
</div>
|
|
334
|
+
</div>
|
|
335
|
+
);
|
|
336
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Tag } from '@carbon/react';
|
|
3
|
+
|
|
4
|
+
const IndicatorStatusTag: React.FC<{ status: 'Draft' | 'Published' }> = ({ status }) => {
|
|
5
|
+
if (status === 'Published') return <Tag type="green">Published</Tag>;
|
|
6
|
+
return <Tag type="cool-gray">Draft</Tag>;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export default IndicatorStatusTag;
|