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

Feat/ig install #601

Merged
merged 7 commits into from
Nov 23, 2023
Merged

Feat/ig install #601

merged 7 commits into from
Nov 23, 2023

Conversation

jkiddo
Copy link
Collaborator

@jkiddo jkiddo commented Oct 28, 2023

No description provided.

@jkiddo jkiddo requested a review from dotasek October 28, 2023 13:09
@jkiddo
Copy link
Collaborator Author

jkiddo commented Oct 28, 2023

This is a feature requested by @costateixeira for speeding up the process of having an IG and make it usable without having to reboot the server instance. It is disabled by default.

@jkiddo jkiddo added the enhancement New feature or request label Oct 28, 2023
@dotasek
Copy link
Contributor

dotasek commented Nov 22, 2023

Is there a way to automatically test this feature?

@costateixeira
Copy link
Contributor

costateixeira commented Nov 22, 2023 via email

@dotasek
Copy link
Contributor

dotasek commented Nov 23, 2023

Here is what I did to test:

  1. Downloaded the IPS tgz (as package.tgz)

  2. Converted to a base64 file:cat package.tgz | base64 > base64_package

  3. Created a template json file:

{
    "resourceType": "Parameters",
    "parameter": [
      {
        "name": "npmContent",
        "valueBase64Binary": "REPLACEME"
      }
    ]
  }
  1. Replaced REPLACEME. I got most of the way tere with perl -pe 's/REPLACEME/cat base64_package/ge' -i query_template.json and then had to fix a stray newline.

  2. Sent this as the body to http:https://0.0.0.0:8080/fhir/ImplementationGuide/$install

I get this 200 response:

{
  "resourceType": "Parameters"
}

From there I can see some indication of success in the logs:

2023-11-23 10:35:05.800 [http-nio-8080-exec-9] INFO  fhirtest.access [LoggingInterceptor.java:177] Path[/fhir] Source[] Operation[extended-operation-type $install ImplementationGuide] UA[insomnia/8.4.4] Params[] ResponseEncoding[JSON] Operation[extended-operation-type $install ImplementationGuide] UA[insomnia/8.4.4] Params[] ResponseEncoding[JSON]
2023-11-23 10:39:01.236 [http-nio-8080-exec-1] INFO  c.u.f.j.p.loader.PackageLoaderSvc [PackageLoaderSvc.java:116] Parsing package .tar.gz (1060702 bytes) from Embedded content
2023-11-23 10:39:01.660 [http-nio-8080-exec-1] INFO  c.u.f.jpa.packages.JpaPackageCache [JpaPackageCache.java:417] Package[hl7.fhir.uv.ips#1.1.0] Indexing StructureDefinition Resource[package/StructureDefinition-AllergyIntolerance-uv-ips.json] with URL: http:https://hl7.org/fhir/uv/ips/StructureDefinition/AllergyIntolerance-uv-ips|1.1.0
2023-11-23 10:39:01.764 [http-nio-8080-exec-1] INFO  c.u.f.jpa.packages.JpaPackageCache [JpaPackageCache.java:417] Package[hl7.fhir.uv.ips#1.1.0] Indexing StructureDefinition Resource[package/StructureDefinition-Bundle-uv-ips.json] with URL: http:https://hl7.org/fhir/uv/ips/StructureDefinition/Bundle-uv-ips|1.1.0
2023-11-23 10:39:01.766 [http-nio-8080-exec-1] INFO  c.u.f.jpa.packages.JpaPackageCache [JpaPackageCache.java:417] Package[hl7.fhir.uv.ips#1.1.0] Indexing StructureDefinition Resource[package/StructureDefinition-CodeableConcept-uv-ips.json] with URL: http:https://hl7.org/fhir/uv/ips/StructureDefinition/CodeableConcept-uv-ips|1.1.0
2
...

And I can query for a randomly selected StructureDefinition: http:https://0.0.0.0:8080/fhir/StructureDefinition/Observation-pregnancy-edd-uv-ips

Which gives me a 200 and a StructureDefinition for Observation-pregnancy-edd-uv-ips

Copy link
Contributor

@dotasek dotasek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See testing procedure in comments.

@costateixeira
Copy link
Contributor

costateixeira commented Nov 23, 2023 via email

@jkiddo jkiddo merged commit 1f7d25c into hapifhir:master Nov 23, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants