Skip to content

Commit

Permalink
Merge pull request #102
Browse files Browse the repository at this point in the history
IGDD-1778 FHIR tests for postman
  • Loading branch information
austinmoody authored Dec 27, 2024
2 parents eaf0494 + 3979126 commit 2e0c1e4
Show file tree
Hide file tree
Showing 4 changed files with 438 additions and 56 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package gov.cdc.izgateway.xform.endpoints.fhir;

import gov.cdc.izgateway.security.AccessControlRegistry;
import gov.cdc.izgw.v2tofhir.converter.MessageParser;
import gov.cdc.izgw.v2tofhir.datatype.HumanNameParser;
import gov.cdc.izgw.v2tofhir.segment.PIDParser;
Expand Down Expand Up @@ -47,6 +48,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Lazy;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
Expand Down Expand Up @@ -126,6 +128,7 @@
@RolesAllowed({Roles.SOAP, Roles.ADMIN})
@RequestMapping("/fhir")
@Slf4j
@Lazy(false)
public class FhirController {

/**
Expand Down Expand Up @@ -157,9 +160,10 @@ public static class FhirConfiguration {
* @param hub The hub controller to talk to.
* @param config The configuration for the converter
*/
public FhirController(@Autowired HubController hub, FhirConfiguration config) {
public FhirController(@Autowired HubController hub, FhirConfiguration config, AccessControlRegistry registry) {
this.hub = hub;
this.config = config;
registry.register(this);
}

/**
Expand Down
5 changes: 5 additions & 0 deletions testing/configuration/organizations.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
"id" : "0d15449b-fb08-4013-8985-20c148b353fe",
"active" : true,
"commonName" : "pcahill.testing.izgateway.org"
}, {
"organizationName" : "Starfleet Medical Systems",
"id" : "0d15449b-fb08-4013-8985-20c148b353fe",
"active" : true,
"commonName" : "sampleSubject"
}, {
"organizationName" : "Cosmic Ray Immunization Center (localhost)",
"id" : "a10bb561-5d7b-4ec7-84c5-b6fa73efe562",
Expand Down
14 changes: 7 additions & 7 deletions testing/configuration/solutions.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
"method" : "set",
"id" : "c995f9f1-7cca-4b01-a1fa-1087a35d5502",
"order" : 0,
"destinationField" : "/MSH-7-1",
"setValue" : "MSH 7 NEW VALUE"
"destinationField" : "/MSH-22-1",
"setValue" : "MSH 22 NEW VALUE 4"
} ]
} ]
}, {
Expand Down Expand Up @@ -118,8 +118,8 @@
"method" : "set",
"id" : "ef3eb737-0cf2-44cc-8608-84e7017e5c27",
"order" : 0,
"destinationField" : "/MSX-7-1",
"setValue" : "MSH 7 NEW VALUE"
"destinationField" : "/MSX-22-1",
"setValue" : "MSH 22 NEW VALUE"
} ]
} ]
}, {
Expand Down Expand Up @@ -170,7 +170,7 @@
"responseOperations" : [ ]
}, {
"id" : "bf3326fe-ab52-4d6c-b37f-7db5f1769c4c",
"solutionName" : "POSTMAN MSH-7-1 Response Transformer - DO NOT DELETE",
"solutionName" : "POSTMAN MSH-19-1 Response Transformer - DO NOT DELETE",
"description" : "Used in Postman Tests",
"version" : "1.0",
"active" : true,
Expand All @@ -184,8 +184,8 @@
"method" : "set",
"id" : "6f750e31-3b60-49bc-a01e-1c2d8b84e3db",
"order" : 0,
"destinationField" : "/MSH-7-1",
"setValue" : "MSH 7 NEW VALUE"
"destinationField" : "/MSH-19-1",
"setValue" : "MSH 19 NEW VALUE"
} ]
} ]
}, {
Expand Down
Loading

0 comments on commit 2e0c1e4

Please sign in to comment.