fhirsmith 0.4.2 → 0.5.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.
- package/CHANGELOG.md +12 -0
- package/README.md +1 -1
- package/library/cron-utilities.js +136 -0
- package/library/html-server.js +13 -29
- package/library/html.js +3 -8
- package/library/languages.js +160 -37
- package/library/package-manager.js +48 -1
- package/library/utilities.js +100 -19
- package/package.json +2 -2
- package/packages/package-crawler.js +6 -1
- package/packages/packages.js +38 -54
- package/publisher/publisher.js +19 -27
- package/registry/api.js +11 -10
- package/registry/crawler.js +31 -29
- package/registry/model.js +5 -26
- package/registry/registry.js +32 -41
- package/server.js +53 -5
- package/shl/shl.js +0 -18
- package/static/assets/js/statuspage.js +1 -9
- package/stats.js +39 -1
- package/token/token.js +14 -9
- package/translations/Messages.properties +2 -1
- package/tx/README.md +17 -6
- package/tx/cs/cs-api.js +19 -1
- package/tx/cs/cs-base.js +77 -0
- package/tx/cs/cs-country.js +46 -0
- package/tx/cs/cs-cpt.js +9 -5
- package/tx/cs/cs-cs.js +27 -13
- package/tx/cs/cs-lang.js +60 -22
- package/tx/cs/cs-loinc.js +69 -98
- package/tx/cs/cs-mimetypes.js +4 -0
- package/tx/cs/cs-ndc.js +6 -0
- package/tx/cs/cs-omop.js +16 -15
- package/tx/cs/cs-rxnorm.js +23 -1
- package/tx/cs/cs-snomed.js +283 -40
- package/tx/cs/cs-ucum.js +90 -70
- package/tx/importers/import-sct.module.js +371 -35
- package/tx/importers/readme.md +117 -7
- package/tx/library/bundle.js +5 -0
- package/tx/library/capabilitystatement.js +3 -142
- package/tx/library/codesystem.js +19 -173
- package/tx/library/conceptmap.js +4 -218
- package/tx/library/designations.js +14 -1
- package/tx/library/extensions.js +7 -0
- package/tx/library/namingsystem.js +3 -89
- package/tx/library/operation-outcome.js +8 -3
- package/tx/library/parameters.js +3 -2
- package/tx/library/renderer.js +10 -6
- package/tx/library/terminologycapabilities.js +3 -243
- package/tx/library/valueset.js +3 -235
- package/tx/library.js +100 -13
- package/tx/operation-context.js +23 -4
- package/tx/params.js +35 -38
- package/tx/provider.js +6 -5
- package/tx/sct/expressions.js +12 -3
- package/tx/tx-html.js +80 -89
- package/tx/tx.fhir.org.yml +6 -5
- package/tx/tx.js +163 -13
- package/tx/vs/vs-database.js +56 -39
- package/tx/vs/vs-package.js +21 -2
- package/tx/vs/vs-vsac.js +175 -39
- package/tx/workers/batch-validate.js +2 -0
- package/tx/workers/batch.js +2 -0
- package/tx/workers/expand.js +132 -112
- package/tx/workers/lookup.js +33 -14
- package/tx/workers/metadata.js +2 -2
- package/tx/workers/read.js +3 -2
- package/tx/workers/related.js +574 -0
- package/tx/workers/search.js +46 -9
- package/tx/workers/subsumes.js +13 -3
- package/tx/workers/translate.js +7 -3
- package/tx/workers/validate.js +258 -285
- package/tx/workers/worker.js +43 -39
- package/tx/xml/bundle-xml.js +237 -0
- package/tx/xml/xml-base.js +215 -64
- package/tx/xversion/xv-bundle.js +71 -0
- package/tx/xversion/xv-capabiliityStatement.js +137 -0
- package/tx/xversion/xv-codesystem.js +169 -0
- package/tx/xversion/xv-conceptmap.js +224 -0
- package/tx/xversion/xv-namingsystem.js +88 -0
- package/tx/xversion/xv-operationoutcome.js +27 -0
- package/tx/xversion/xv-parameters.js +87 -0
- package/tx/xversion/xv-resource.js +45 -0
- package/tx/xversion/xv-terminologyCapabilities.js +214 -0
- package/tx/xversion/xv-valueset.js +234 -0
- package/utilities/dev-proxy-server.js +126 -0
- package/utilities/explode-results.js +58 -0
- package/utilities/split-by-system.js +198 -0
- package/utilities/vsac-cs-fetcher.js +0 -0
- package/{windows-install.js → utilities/windows-install.js} +2 -0
- package/vcl/vcl.js +0 -18
- package/xig/xig.js +108 -99
package/tx/workers/subsumes.js
CHANGED
|
@@ -42,8 +42,9 @@ class SubsumesWorker extends TerminologyWorker {
|
|
|
42
42
|
try {
|
|
43
43
|
await this.handleTypeLevelSubsumes(req, res);
|
|
44
44
|
} catch (error) {
|
|
45
|
-
req.logInfo = "error "+(error.msgId || error.className);
|
|
46
45
|
this.log.error(error);
|
|
46
|
+
this.debugLog(error);
|
|
47
|
+
req.logInfo = "error "+(error.msgId || error.className);
|
|
47
48
|
if (error instanceof Issue) {
|
|
48
49
|
let oo = new OperationOutcome();
|
|
49
50
|
oo.addIssue(error);
|
|
@@ -66,6 +67,7 @@ class SubsumesWorker extends TerminologyWorker {
|
|
|
66
67
|
await this.handleInstanceLevelSubsumes(req, res);
|
|
67
68
|
} catch (error) {
|
|
68
69
|
this.log.error(error);
|
|
70
|
+
this.debugLog(error);
|
|
69
71
|
if (error instanceof Issue) {
|
|
70
72
|
let oo = new OperationOutcome();
|
|
71
73
|
oo.addIssue(error);
|
|
@@ -167,7 +169,7 @@ class SubsumesWorker extends TerminologyWorker {
|
|
|
167
169
|
txp.readParams(params.jsonObj);
|
|
168
170
|
|
|
169
171
|
// Load any supplements
|
|
170
|
-
const supplements = this.loadSupplements(codeSystem.url, codeSystem.version);
|
|
172
|
+
const supplements = this.loadSupplements(codeSystem.url, codeSystem.version, txp.supplements);
|
|
171
173
|
|
|
172
174
|
// Create a FhirCodeSystemProvider for this CodeSystem
|
|
173
175
|
const csProvider = new FhirCodeSystemProvider(this.opContext, codeSystem, supplements);
|
|
@@ -298,8 +300,16 @@ class SubsumesWorker extends TerminologyWorker {
|
|
|
298
300
|
throw error;
|
|
299
301
|
}
|
|
300
302
|
|
|
303
|
+
let equal = false;
|
|
304
|
+
if (csProvider.isCaseSensitive()) {
|
|
305
|
+
equal = codingA.code == codingB.code;
|
|
306
|
+
} else {
|
|
307
|
+
equal = codingA.code === codingB.code;
|
|
308
|
+
}
|
|
309
|
+
equal = equal || locateA == locateB;
|
|
310
|
+
|
|
301
311
|
// Determine the subsumption relationship
|
|
302
|
-
let outcome = await csProvider.subsumesTest(codingA.code, codingB.code);
|
|
312
|
+
let outcome = equal ? 'equivalent' : await csProvider.subsumesTest(codingA.code, codingB.code);
|
|
303
313
|
|
|
304
314
|
return {
|
|
305
315
|
resourceType: 'Parameters',
|
package/tx/workers/translate.js
CHANGED
|
@@ -44,6 +44,7 @@ class TranslateWorker extends TerminologyWorker {
|
|
|
44
44
|
await this.handleTypeLevelTranslate(req, res);
|
|
45
45
|
} catch (error) {
|
|
46
46
|
this.log.error(error);
|
|
47
|
+
this.debugLog(error);
|
|
47
48
|
if (error instanceof Issue) {
|
|
48
49
|
const oo = new OperationOutcome();
|
|
49
50
|
oo.addIssue(error);
|
|
@@ -66,6 +67,7 @@ class TranslateWorker extends TerminologyWorker {
|
|
|
66
67
|
await this.handleInstanceLevelTranslate(req, res);
|
|
67
68
|
} catch (error) {
|
|
68
69
|
this.log.error(error);
|
|
70
|
+
this.debugLog(error);
|
|
69
71
|
if (error instanceof Issue) {
|
|
70
72
|
const oo = new OperationOutcome();
|
|
71
73
|
oo.addIssue(error);
|
|
@@ -247,7 +249,7 @@ class TranslateWorker extends TerminologyWorker {
|
|
|
247
249
|
|
|
248
250
|
checkCode(op, langList, path, code, system, version, display) {
|
|
249
251
|
let result = false;
|
|
250
|
-
const cp = this.findCodeSystem(system, version, null, ['complete', 'fragment'], true, true, false, null);
|
|
252
|
+
const cp = this.findCodeSystem(system, version, null, ['complete', 'fragment'], true, true, false, null, this.requiredSupplements);
|
|
251
253
|
if (cp != null) {
|
|
252
254
|
const lct = cp.locate(this.opContext, code);
|
|
253
255
|
if (op.error('InstanceValidator', 'invalid', path, lct != null, 'Unknown Code (' + system + '#' + code + ')')) {
|
|
@@ -406,14 +408,16 @@ class TranslateWorker extends TerminologyWorker {
|
|
|
406
408
|
valueString: 'No translations found'
|
|
407
409
|
});
|
|
408
410
|
}
|
|
409
|
-
} catch (
|
|
411
|
+
} catch (error) {
|
|
412
|
+
this.log.error(error);
|
|
413
|
+
this.debugLog(error);
|
|
410
414
|
result.push({
|
|
411
415
|
name: 'result',
|
|
412
416
|
valueBoolean: false
|
|
413
417
|
});
|
|
414
418
|
result.push({
|
|
415
419
|
name: 'message',
|
|
416
|
-
valueString:
|
|
420
|
+
valueString: error.message
|
|
417
421
|
});
|
|
418
422
|
}
|
|
419
423
|
|