Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UploadFIG shows nondescript error when 'fhirVersions' is missing from package.json #24

Closed
pieterbos opened this issue Mar 14, 2025 · 1 comment
Assignees

Comments

@pieterbos
Copy link

pieterbos commented Mar 14, 2025

  • create FHIR package with only the following file in package/package.json:
{    
    "name": "com.nedap.custom",
    "version": "0.0.1",
    "description": "A simple test",
    "author": "Pieter Bos",
    "dependencies": {
        "hl7.fhir.r4.core": "4.0.1"
    },
    "canonical": "urn:something"
}

Then create a package.tgz with just that file. Run UploadFIG as follows:

UploadFIG -s package.tgz -t

The output will be:

HL7 FHIR Implementation Guide Uploader
--------------------------------------
Using local package: test.tar.gz
MD5 Checksum: E26525079993D3DBBFB73E8A4AAEFD52

Object reference not set to an instance of an object.

This is very hard to debug. Instead, it should indicate it cannot determine the FHIR version from the package. Also fhir version is not a mandatory field in package.json, but I can imagine it could be necessary for UploadFIG to work.

If you add the following to the package.json, it will work:

"fhirVersions" : ["4.0.1"],
@brianpos brianpos self-assigned this Mar 14, 2025
@brianpos
Copy link
Owner

Thanks, I'll fix this.
Yes its required for the processor as it needs to select which parser is used to read the resources in the content.
This is due to it not being a blind read text file, upload blob.
It parses the content, validates it, does lots of internal consistency and dependency processing checks which are very version specific.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants