fhirsmith 0.5.2 → 0.5.4
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 +27 -0
- package/README.md +1 -1
- package/library/package-manager.js +1 -1
- package/package.json +1 -1
- package/server.js +13 -0
- package/stats.js +21 -7
- package/tx/README.md +12 -8
- package/tx/cs/cs-api.js +87 -8
- package/tx/cs/cs-areacode.js +0 -9
- package/tx/cs/cs-country.js +0 -10
- package/tx/cs/cs-cpt.js +1 -6
- package/tx/cs/cs-cs.js +1 -2
- package/tx/cs/cs-currency.js +0 -9
- package/tx/cs/cs-hgvs.js +0 -5
- package/tx/cs/cs-lang.js +0 -10
- package/tx/cs/cs-loinc.js +0 -7
- package/tx/cs/cs-omop.js +0 -6
- package/tx/cs/cs-rxnorm.js +3 -0
- package/tx/cs/cs-snomed.js +10 -4
- package/tx/cs/cs-ucum.js +0 -9
- package/tx/html/search-form.liquid +5 -2
- package/tx/html/tx-template.html +1 -0
- package/tx/library/designations.js +5 -1
- package/tx/library/renderer.js +6 -1
- package/tx/library.js +1 -0
- package/tx/operation-context.js +1 -0
- package/tx/params.js +7 -1
- package/tx/problems.js +90 -0
- package/tx/provider.js +22 -1
- package/tx/tx-html.js +130 -17
- package/tx/tx.fhir.org.yml +1 -0
- package/tx/tx.js +41 -5
- package/tx/usage-tracker.js +70 -0
- package/tx/vs/vs-api.js +3 -0
- package/tx/vs/vs-database.js +15 -7
- package/tx/vs/vs-package.js +6 -1
- package/tx/vs/vs-vsac.js +30 -14
- package/tx/workers/expand.js +235 -138
- package/tx/workers/search.js +12 -6
- package/tx/workers/validate.js +4 -1
- package/tx/workers/worker.js +14 -0
- package/tx/xversion/xv-parameters.js +8 -1
- package/tx/xversion/xv-resource.js +16 -16
- package/tx/cs/cs-db.js +0 -1308
package/tx/vs/vs-vsac.js
CHANGED
|
@@ -4,7 +4,6 @@ const { AbstractValueSetProvider } = require('./vs-api');
|
|
|
4
4
|
const { ValueSetDatabase } = require('./vs-database');
|
|
5
5
|
const { VersionUtilities } = require('../../library/version-utilities');
|
|
6
6
|
const folders = require('../../library/folder-setup');
|
|
7
|
-
const ValueSet = require("../library/valueset");
|
|
8
7
|
|
|
9
8
|
/**
|
|
10
9
|
* VSAC (Value Set Authority Center) ValueSet provider
|
|
@@ -52,6 +51,10 @@ class VSACValueSetProvider extends AbstractValueSetProvider {
|
|
|
52
51
|
});
|
|
53
52
|
}
|
|
54
53
|
|
|
54
|
+
sourcePackage() {
|
|
55
|
+
return "vsac";
|
|
56
|
+
}
|
|
57
|
+
|
|
55
58
|
/**
|
|
56
59
|
* Initialize the provider - setup database and start refresh cycle
|
|
57
60
|
* @returns {Promise<void>}
|
|
@@ -314,8 +317,20 @@ class VSACValueSetProvider extends AbstractValueSetProvider {
|
|
|
314
317
|
* @private
|
|
315
318
|
*/
|
|
316
319
|
async _reloadMap() {
|
|
317
|
-
const newMap = await this.database.loadAllValueSets(
|
|
318
|
-
|
|
320
|
+
const newMap = await this.database.loadAllValueSets(this.sourcePackage());
|
|
321
|
+
for (const vs of newMap.values()) {
|
|
322
|
+
if (vs.jsonObj.compose) {
|
|
323
|
+
for (const inc of vs.jsonObj.compose.include || []) {
|
|
324
|
+
if (inc.version) {
|
|
325
|
+
delete inc.version;
|
|
326
|
+
}
|
|
327
|
+
}for (const inc of vs.jsonObj.compose.exclude || []) {
|
|
328
|
+
if (inc.version) {
|
|
329
|
+
delete inc.version;
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
}
|
|
319
334
|
// Atomic replacement of the map
|
|
320
335
|
this.valueSetMap = newMap;
|
|
321
336
|
}
|
|
@@ -460,17 +475,18 @@ class VSACValueSetProvider extends AbstractValueSetProvider {
|
|
|
460
475
|
// are fetched, we check to see if we've got the compose, and if we
|
|
461
476
|
// haven't, then we fetch it and store it
|
|
462
477
|
async checkFullVS(vs) {
|
|
463
|
-
if (!vs) {
|
|
464
|
-
|
|
465
|
-
}
|
|
466
|
-
if (vs.jsonObj
|
|
467
|
-
|
|
468
|
-
}
|
|
469
|
-
console.log('get a full copy for the ValueSet '+vs.url+'|'+vs.version);
|
|
470
|
-
let vsNew = await this._fetchValueSet(vs.id);
|
|
471
|
-
await this.database.upsertValueSet(vsNew);
|
|
472
|
-
this.database.addToMap(this.valueSetMap, vsNew.id, vsNew.url, vsNew.version, vsNew);
|
|
473
|
-
return new ValueSet(vsNew);
|
|
478
|
+
// if (!vs) {
|
|
479
|
+
// return null;
|
|
480
|
+
// }
|
|
481
|
+
// if (vs.jsonObj?.compose) {
|
|
482
|
+
// return vs;
|
|
483
|
+
// }
|
|
484
|
+
// console.log('get a full copy for the ValueSet '+vs.url+'|'+vs.version);
|
|
485
|
+
// let vsNew = await this._fetchValueSet(vs.id);
|
|
486
|
+
// await this.database.upsertValueSet(vsNew);
|
|
487
|
+
// this.database.addToMap(this.valueSetMap, vsNew.id, vsNew.url, vsNew.version, vsNew);
|
|
488
|
+
// return new ValueSet(vsNew);
|
|
489
|
+
return vs;
|
|
474
490
|
}
|
|
475
491
|
|
|
476
492
|
async processContentAndHistory(q, tracking, length) {
|