fhirsmith 0.9.1 → 0.9.3

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.
@@ -340,10 +340,25 @@ class TerminologyWorker {
340
340
  * @param {string} version - ValueSet version (optional, overrides URL version)
341
341
  * @returns {ValueSet|null} Found ValueSet or null
342
342
  */
343
- async findValueSet(url, version = '') {
343
+ async findValueSet(url, version, source = '') {
344
344
  if (!url) {
345
345
  return null;
346
346
  }
347
+ if (url.startsWith("#")) {
348
+ if (source) {
349
+ if (source.jsonObj) {
350
+ source = source.jsonObj;
351
+ }
352
+ for (const contained of source.contained || []) {
353
+ if (contained.id === url.substring(1)) {
354
+ const ret = this.wrapRawResource(contained);
355
+ ret.isContained = true;
356
+ return ret;
357
+ }
358
+ }
359
+ }
360
+ return null;
361
+ }
347
362
 
348
363
  // Parse URL|version format
349
364
  let effectiveUrl = url;