FHIR Package Loading Sadness
Im playing whack a mole importing an IG (which is a fairly typical exercise with fhir packages) through FHIR packages, and getting at some parts I cant seem to work around with some store errors...
Im getting MAXSTRING on `hl7.terminology.r4`:
Saving hl7.terminology.r4@3.1.0
Load Resources: hl7.terminology.r4@3.1.0
Resource Used in Multiple Packages: http://terminology.hl7.org/CodeSystem/dicom-audit-lifecycle|20100826(hl7.fhir.r4.core@4.0.1,hl7.terminology.r4@3.1.0)
Set sc=rsrc.%Save() Throw:('sc) ##class(%Exception.StatusException).ThrowIfInt
^
errupt(sc)
<THROW>zaddPackageResources+74^HS.FHIRMeta.Load.NpmLoader.1 *%Exception.SystemException <MAXSTRING> %SaveData+28^HS.FHIRMeta.Storage.Rsrc.1For this one, I started by declaring a ridiculous "99999999999999999" for MAXLEN on the properties of HS.FHIRMeta.Storage.Rsrc, then removing it altogether and get passed it... no dice.
and STRINGSTACK for `us.nlm.vsac`
Saving us.nlm.vsac@0.3.0 Load Resources: us.nlm.vsac@0.3.0 set rsrc.json = json.%ToJSON() ^ <STRINGSTACK>zaddPackageResources+72^HS.FHIRMeta.Load.NpmLoader.1
I have no ideas on this one, but thinking it may be a symptom of the first one.
Set tSC = ##class(HS.FHIRMeta.Load.NpmLoader).importPackages($lb("/usr/lib/node_modules/hl7.terminology.r4"))If you had to hack the system classes to get this to work, which approach would you take ?
These packages are fairly common I would think, so I think a back end limitation has been introduced.
Comments
Not sure of impact but for R&D just to save a global node, total properties needs to add up to a max of 32K.
Property json As %String(MAXLEN = 32000, TRUNCATE=1);
, which approach would you take ?
I would try to use embedded Python to escape from <MAXSTRING>
cut it to reasonable pieces and use them in COS as far as necessary.
This is a limitation on a maximum resource length that was lifted in 2022.2 preview 4.