fhirsmith 0.18.2 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. package/ACCESSIBILITY.md +119 -0
  2. package/CHANGELOG.md +149 -0
  3. package/CONFIGURATION.md +305 -0
  4. package/LICENSE +29 -0
  5. package/README.md +29 -122
  6. package/cluster.js +1220 -0
  7. package/cluster.md +707 -0
  8. package/config-template.json +77 -8
  9. package/extension-tracker/extension-tracker-template.html +5 -8
  10. package/extension-tracker/extension-tracker.js +0 -2
  11. package/folder/folder.js +7 -6
  12. package/ips/analysis.js +560 -0
  13. package/ips/ips-template.html +5 -8
  14. package/ips/ips.js +132 -59
  15. package/ips/nationality.js +120 -0
  16. package/ips/pipeline.js +74 -21
  17. package/ips/presenter.js +1 -1
  18. package/ips/readme.md +132 -25
  19. package/ips/render.js +466 -77
  20. package/ips/store.js +79 -22
  21. package/ips/structure.js +247 -0
  22. package/ips/terminology.js +1 -1
  23. package/library/body-limit.js +22 -0
  24. package/library/cache-generation.js +15 -0
  25. package/library/cgroup-memory.js +133 -1
  26. package/library/cluster-counts.js +121 -0
  27. package/library/cluster-events.js +153 -0
  28. package/library/cluster-metrics.js +193 -0
  29. package/library/cluster-status.js +468 -0
  30. package/library/config-reader.js +96 -0
  31. package/library/daily-report.js +100 -2
  32. package/library/html-server.js +27 -1
  33. package/library/i18nsupport.js +23 -1
  34. package/library/keep-alive.js +18 -0
  35. package/library/languages.js +17 -3
  36. package/library/logger.js +31 -0
  37. package/library/memory-guard.js +428 -0
  38. package/library/native-memory.js +52 -0
  39. package/library/npm-audit.js +51 -25
  40. package/library/openapi-doc.js +7 -5
  41. package/library/package-manager.js +8 -0
  42. package/library/role.js +197 -0
  43. package/library/server-credentials.js +169 -0
  44. package/library/sqlite-utilities.js +59 -0
  45. package/library/ssrf-guard.js +100 -0
  46. package/library/static-response-stats.js +16 -0
  47. package/library/version-utilities.js +50 -0
  48. package/library/worker-count.js +192 -0
  49. package/nginx.md +30 -11
  50. package/npmprojector/indexer.js +18 -10
  51. package/package.json +11 -8
  52. package/packages/feed-check-page.js +117 -0
  53. package/packages/feed-check.js +279 -0
  54. package/packages/npm-check.js +57 -3
  55. package/packages/npm-signing.js +219 -0
  56. package/packages/openapi.yaml +207 -1
  57. package/packages/package-crawler.js +322 -41
  58. package/packages/packages-template.html +6 -8
  59. package/packages/packages.js +604 -57
  60. package/packages/readme.md +113 -1
  61. package/publisher/publisher-template.html +2 -5
  62. package/publisher/publisher.js +121 -110
  63. package/publisher/readme.md +75 -0
  64. package/registry/crawler.js +84 -108
  65. package/registry/documentation/configuration.md +34 -0
  66. package/registry/registry-template.html +5 -8
  67. package/registry/registry.js +5 -4
  68. package/root-bare-template.html +7 -4
  69. package/root-template.html +5 -8
  70. package/server.js +398 -198
  71. package/shl/shl.js +38 -37
  72. package/static/a11y/a11y-check.js +832 -0
  73. package/static/a11y/axe.min.js +12 -0
  74. package/static/assets/css/bootstrap-fhir.css +15 -15
  75. package/static/assets/images/flags/au.svg +18 -0
  76. package/static/assets/images/flags/unknown.svg +11 -0
  77. package/static/assets/images/flags/us.svg +63 -0
  78. package/static/assets/images/icon_audit.png +0 -0
  79. package/static/assets/images/icon_clinical.png +0 -0
  80. package/static/assets/images/icon_document.png +0 -0
  81. package/static/assets/images/icon_external.png +0 -0
  82. package/static/assets/images/icon_medication.png +0 -0
  83. package/static/assets/images/icon_organization.png +0 -0
  84. package/static/assets/images/icon_other.png +0 -0
  85. package/static/assets/images/icon_person.png +0 -0
  86. package/static/assets/images/icon_section.png +0 -0
  87. package/stats-db.js +45 -0
  88. package/stats.js +197 -10
  89. package/testing/testing-template.html +5 -8
  90. package/token/nginx_passport_setup.md +1 -1
  91. package/token/security_guide.md +1 -1
  92. package/token/token-template.html +2 -5
  93. package/token/token.js +40 -36
  94. package/translations/Messages.properties +19 -0
  95. package/tx/README.md +154 -4
  96. package/tx/closure/closure-store.js +126 -3
  97. package/tx/cm/cm-database.js +69 -57
  98. package/tx/cm/cm-package.js +29 -1
  99. package/tx/cs/cs-api.js +284 -19
  100. package/tx/cs/cs-api.md +41 -4
  101. package/tx/cs/cs-areacode.js +1 -1
  102. package/tx/cs/cs-country.js +17 -5
  103. package/tx/cs/cs-cpt.js +33 -16
  104. package/tx/cs/cs-cs.js +148 -14
  105. package/tx/cs/cs-currency.js +1 -1
  106. package/tx/cs/cs-icd11.js +21 -13
  107. package/tx/cs/cs-icf.js +22 -3
  108. package/tx/cs/cs-lang.js +2 -2
  109. package/tx/cs/cs-loinc.js +185 -66
  110. package/tx/cs/cs-mimetypes.js +12 -2
  111. package/tx/cs/cs-ndc.js +40 -25
  112. package/tx/cs/cs-omop.js +54 -29
  113. package/tx/cs/cs-rxnorm.js +300 -196
  114. package/tx/cs/cs-snomed.js +608 -64
  115. package/tx/cs/cs-ucum.js +14 -4
  116. package/tx/cs/cs-unii.js +18 -14
  117. package/tx/cs/cs-virtual.js +210 -0
  118. package/tx/ecosystem-resolver.js +413 -0
  119. package/tx/html/cluster-dash-metrics.liquid +26 -0
  120. package/tx/html/cluster-home-metrics.liquid +31 -0
  121. package/tx/html/cluster-metrics-script.liquid +251 -0
  122. package/tx/html/codesystem-operations.liquid +3 -3
  123. package/tx/html/ecl-panel.liquid +1 -1
  124. package/tx/html/external-metrics.liquid +17 -0
  125. package/tx/html/operations-form.liquid +17 -17
  126. package/tx/html/search-form.liquid +11 -11
  127. package/tx/html/status-line.liquid +58 -0
  128. package/tx/html/status-panel.liquid +140 -0
  129. package/tx/html/status-tasks.liquid +25 -0
  130. package/tx/html/tx-template.html +2 -5
  131. package/tx/importers/atc-to-fhir.js +17 -16
  132. package/tx/importers/export-icd11-codesystem.js +3 -2
  133. package/tx/importers/import-icd11.js +4 -3
  134. package/tx/importers/import-loinc.module.js +118 -56
  135. package/tx/importers/import-ndc.module.js +56 -44
  136. package/tx/importers/import-rxnorm.module.js +118 -79
  137. package/tx/importers/import-sct.module.js +57 -58
  138. package/tx/importers/import-unii.module.js +37 -36
  139. package/tx/importers/subset-loinc.module.js +49 -48
  140. package/tx/importers/subset-rxnorm.module.js +29 -28
  141. package/tx/importers/terminal.js +18 -0
  142. package/tx/importers/tx-import-base.js +13 -12
  143. package/tx/importers/tx-import-settings.js +5 -4
  144. package/tx/importers/tx-import.js +53 -52
  145. package/tx/library/canonical-resource.js +49 -0
  146. package/tx/library/codesystem.js +94 -5
  147. package/tx/library/designations.js +45 -2
  148. package/tx/library/extensions.js +13 -7
  149. package/tx/library/implicit-valuesets.js +66 -0
  150. package/tx/library/renderer.js +77 -21
  151. package/tx/library/sqlite-utilities.js +2 -0
  152. package/tx/library/ucum-parsers.js +11 -1
  153. package/tx/library/wait-for-cache.js +43 -0
  154. package/tx/library.js +321 -22
  155. package/tx/openapi-operations.js +6 -4
  156. package/tx/operation-context.js +460 -99
  157. package/tx/params.js +25 -0
  158. package/tx/problems.js +3 -5
  159. package/tx/provider.js +278 -42
  160. package/tx/resource-cache-sqlite.js +1050 -0
  161. package/tx/sct/ecl.js +47 -6
  162. package/tx/sct/editions.js +39 -0
  163. package/tx/sct/expressions.js +10 -1
  164. package/tx/sct/load-config.js +107 -0
  165. package/tx/sct/mmap.js +109 -0
  166. package/tx/sct/structures.js +166 -13
  167. package/tx/sct/text-index.js +5 -1
  168. package/tx/syndication/syndication-feed.js +2 -2
  169. package/tx/tx-html.js +44 -8
  170. package/tx/tx.fhir.org.yml +8 -8
  171. package/tx/tx.js +282 -80
  172. package/tx/usage-tracker.js +39 -11
  173. package/tx/vs/vs-api.js +19 -0
  174. package/tx/vs/vs-database.js +386 -62
  175. package/tx/vs/vs-package.js +27 -4
  176. package/tx/vs/vs-vsac.js +648 -100
  177. package/tx/workers/batch-validate.js +37 -10
  178. package/tx/workers/batch.js +6 -1
  179. package/tx/workers/cache-control.js +15 -4
  180. package/tx/workers/closure.js +156 -13
  181. package/tx/workers/compare.js +8 -5
  182. package/tx/workers/expand.js +1173 -289
  183. package/tx/workers/metadata.js +35 -0
  184. package/tx/workers/search.js +53 -1
  185. package/tx/workers/supplement-filters.js +145 -0
  186. package/tx/workers/translate.js +169 -4
  187. package/tx/workers/validate.js +223 -119
  188. package/tx/workers/worker.js +123 -31
  189. package/tx/xversion/xv-valueset.js +7 -4
  190. package/utilities/submit-test-report.js +3 -1
  191. package/utilities/tx-stress-test.js +482 -0
  192. package/vcl/readme.md +37 -0
  193. package/vcl/vcl-parser.js +15 -0
  194. package/xig/readme.md +52 -0
  195. package/xig/xig-template.html +5 -8
  196. package/xig/xig.js +238 -422
  197. package/changelog-template.md +0 -22
  198. package/registry/test-runner.js +0 -237
  199. package/release.sh +0 -80
  200. package/test-scripts/repro-re2-wasm-leak.js +0 -34
  201. package/tsconfig.eslint.json +0 -9
  202. package/tx/html/dash-metrics.liquid +0 -147
  203. package/tx/html/home-metrics.liquid +0 -225
@@ -1,225 +0,0 @@
1
- <div style="display: flex; gap: 20px; margin-bottom: 20px;">
2
- <div style="flex: 1;">
3
- <h6>Memory Usage (Heap Used)</h6>
4
- <canvas id="memoryChart" height="200"></canvas>
5
- </div>
6
- <div style="flex: 1;">
7
- <h6>Requests per Minute</h6>
8
- <canvas id="requestChart" height="200"></canvas>
9
- </div>
10
- <div style="flex: 1;">
11
- <h6>Turnaround Time</h6>
12
- <canvas id="tatChart" height="200"></canvas>
13
- </div>
14
- </div>
15
- <div style="display: flex; gap: 20px; margin-bottom: 20px;">
16
- <div style="flex: 1;">
17
- <h6>Client Cache</h6>
18
- <canvas id="clientCacheChart" height="200"></canvas>
19
- </div>
20
- <div style="flex: 1;">
21
- <h6>Node Blocking (mean)</h6>
22
- <canvas id="blockChart" height="200"></canvas>
23
- </div>
24
- <div style="flex: 1;">
25
- <h6>Node Blocking (max)</h6>
26
- <canvas id="blockMaxChart" height="200"></canvas>
27
- </div>
28
- </div>
29
-
30
- <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
31
- <script>
32
- (function() {
33
- const historyData = {{ historyJson }};
34
- const startTime = {{ startTime }};
35
-
36
- function formatTime(timestamp) {
37
- const d = new Date(timestamp);
38
- return d.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' });
39
- }
40
-
41
- function formatMB(bytes) {
42
- return (bytes / 1024 / 1024).toFixed(1);
43
- }
44
-
45
- function formatDuration(ms) {
46
- const hours = ms / 3600000;
47
- if (hours < 1) {
48
- return Math.round(ms / 60000) + 'm ago';
49
- }
50
- return hours.toFixed(1) + 'h ago';
51
- }
52
-
53
- const chartOptions = {
54
- responsive: false,
55
- maintainAspectRatio: false,
56
- scales: {
57
- x: {
58
- ticks: {
59
- maxTicksAuto: 6
60
- }
61
- },
62
- y: {
63
- beginAtZero: true
64
- }
65
- },
66
- plugins: {
67
- legend: {
68
- display: false
69
- }
70
- }
71
- };
72
-
73
- // Memory chart
74
- new Chart(document.getElementById('memoryChart'), {
75
- type: 'line',
76
- data: {
77
- labels: historyData.map(d => formatTime(d.time)),
78
- datasets: [{
79
- data: historyData.map(d => parseFloat(formatMB(d.mem))),
80
- borderColor: '#007bff',
81
- backgroundColor: 'rgba(0, 123, 255, 0.1)',
82
- fill: true,
83
- tension: 0.3,
84
- pointRadius: 2
85
- }]
86
- },
87
- options: {
88
- ...chartOptions,
89
- scales: {
90
- ...chartOptions.scales,
91
- y: {
92
- ...chartOptions.scales.y,
93
- title: {
94
- display: true,
95
- text: 'MB (𝚫 from start)'
96
- }
97
- }
98
- }
99
- }
100
- });
101
-
102
- // Tat chart
103
- new Chart(document.getElementById('tatChart'), {
104
- type: 'line',
105
- data: {
106
- labels: historyData.map(d => formatTime(d.time)),
107
- datasets: [{
108
- data: historyData.map(d => d.tat),
109
- borderColor: '#7b7b7b',
110
- backgroundColor: 'rgba(123, 123, 123, 0.1)',
111
- fill: true,
112
- tension: 0.3,
113
- pointRadius: 2
114
- }]
115
- },
116
- options: {
117
- ...chartOptions,
118
- scales: {
119
- ...chartOptions.scales,
120
- y: {
121
- ...chartOptions.scales.y,
122
- title: {
123
- display: true,
124
- text: 'ms'
125
- }
126
- }
127
- }
128
- }
129
- });
130
-
131
- // Client cache concepts chart
132
- new Chart(document.getElementById('clientCacheChart'), {
133
- type: 'line',
134
- data: {
135
- labels: historyData.map(d => formatTime(d.time)),
136
- datasets: [{
137
- data: historyData.map(d => d.clientConcepts),
138
- borderColor: '#ff7b00',
139
- backgroundColor: 'rgba(255, 123, 0, 0.1)',
140
- fill: true,
141
- tension: 0.3,
142
- pointRadius: 2
143
- }]
144
- },
145
- options: {
146
- ...chartOptions,
147
- scales: {
148
- ...chartOptions.scales,
149
- y: {
150
- ...chartOptions.scales.y,
151
- title: {
152
- display: true,
153
- text: 'Client Cache # concepts'
154
- }
155
- }
156
- }
157
- }
158
- });
159
-
160
- // Requests chart
161
- new Chart(document.getElementById('requestChart'), {
162
- type: 'line',
163
- data: {
164
- labels: historyData.map(d => formatTime(d.time)),
165
- datasets: [{
166
- data: historyData.map(d => d.rpm.toFixed(2)),
167
- borderColor: '#28a745',
168
- backgroundColor: 'rgba(40, 167, 69, 0.1)',
169
- fill: true,
170
- tension: 0.3,
171
- pointRadius: 2
172
- }]
173
- },
174
- options: {
175
- ...chartOptions,
176
- scales: {
177
- ...chartOptions.scales,
178
- y: {
179
- ...chartOptions.scales.y,
180
- title: {
181
- display: true,
182
- text: 'req/min'
183
- }
184
- }
185
- }
186
- }
187
- });
188
- // Blocking charts. Mean and max are separate charts because they are on different
189
- // scales: a multi-second stall puts max in the thousands of ms while the mean sits at
190
- // a few ms, so on one chart the mean is a flat line along the bottom.
191
- function blockChart(id, field, colour, fill) {
192
- new Chart(document.getElementById(id), {
193
- type: 'line',
194
- data: {
195
- labels: historyData.map(d => formatTime(d.time)),
196
- datasets: [{
197
- data: historyData.map(d => d[field]),
198
- borderColor: colour,
199
- backgroundColor: fill,
200
- fill: true,
201
- tension: 0.3,
202
- pointRadius: 2
203
- }]
204
- },
205
- options: {
206
- ...chartOptions,
207
- scales: {
208
- ...chartOptions.scales,
209
- y: {
210
- ...chartOptions.scales.y,
211
- title: {
212
- display: true,
213
- text: 'ms'
214
- }
215
- }
216
- }
217
- }
218
- });
219
- }
220
- // the average event-loop delay over each interval
221
- blockChart('blockChart', 'block', '#2845a7', 'rgba(40, 69, 167, 0.1)');
222
- // the worst single stall in each interval: the one that shows request-freezing blocks
223
- blockChart('blockMaxChart', 'blockMax', '#a72828', 'rgba(167, 40, 40, 0.1)');
224
- })();
225
- </script>