diff --git a/src/main/java/net/ihe/gazelle/servlet/ChHapiFhirServer.java b/src/main/java/net/ihe/gazelle/adapter/servlet/ChHapiFhirServer.java similarity index 93% rename from src/main/java/net/ihe/gazelle/servlet/ChHapiFhirServer.java rename to src/main/java/net/ihe/gazelle/adapter/servlet/ChHapiFhirServer.java index dd30c125317a8aace8f77411c0a3eb58c1f6c8f6..0cd18a12f53fde58add7aed7f915dba2f5ee87c2 100644 --- a/src/main/java/net/ihe/gazelle/servlet/ChHapiFhirServer.java +++ b/src/main/java/net/ihe/gazelle/adapter/servlet/ChHapiFhirServer.java @@ -1,4 +1,4 @@ -package net.ihe.gazelle.servlet; +package net.ihe.gazelle.adapter.servlet; import java.util.ArrayList; import java.util.List; @@ -14,8 +14,8 @@ import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; import ca.uhn.fhir.rest.server.interceptor.ExceptionHandlingInterceptor; import ca.uhn.fhir.rest.server.interceptor.LoggingInterceptor; import ca.uhn.fhir.rest.server.interceptor.ResponseHighlighterInterceptor; -import net.ihe.gazelle.interceptor.LegacyLoggingInterceptor; -import net.ihe.gazelle.provider.ChPatientResourceProvider; +import net.ihe.gazelle.business.interceptor.LegacyLoggingInterceptor; +import net.ihe.gazelle.business.provider.ChPatientResourceProvider; /** * This servlet is the actual FHIR server itself diff --git a/src/main/java/net/ihe/gazelle/adapter/servlet/IheHapiFhirServer.java b/src/main/java/net/ihe/gazelle/adapter/servlet/IheHapiFhirServer.java new file mode 100644 index 0000000000000000000000000000000000000000..991f78699674a0a1ae2ce3aee29c87e89e1f9ab2 --- /dev/null +++ b/src/main/java/net/ihe/gazelle/adapter/servlet/IheHapiFhirServer.java @@ -0,0 +1,66 @@ +package net.ihe.gazelle.adapter.servlet; + +import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.narrative.DefaultThymeleafNarrativeGenerator; +import ca.uhn.fhir.narrative.INarrativeGenerator; +import ca.uhn.fhir.rest.server.IResourceProvider; +import ca.uhn.fhir.rest.server.RestfulServer; +import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; +import ca.uhn.fhir.rest.server.interceptor.ExceptionHandlingInterceptor; +import ca.uhn.fhir.rest.server.interceptor.LoggingInterceptor; +import net.ihe.gazelle.business.provider.IhePatientResourceProvider; +import javax.servlet.annotation.WebServlet; +import java.util.ArrayList; +import java.util.List; + + +@WebServlet(urlPatterns = {"/fhir_ihe/*"}, displayName = "FHIR Server IHE") +public class IheHapiFhirServer extends RestfulServer { + + private static final long serialVersionUID = 1L; + + /** + * Constructor + */ + public IheHapiFhirServer() { + super(FhirContext.forR4()); + } + + /** + * This method is called automatically when the + * servlet is initializing. + */ + @Override + public void initialize() { + /* + * Two resource providers are defined. Each one handles a specific + * type of resource. + */ + List<IResourceProvider> providers = new ArrayList<IResourceProvider>(); + providers.add(new IhePatientResourceProvider()); + setResourceProviders(providers); + + //creating an interceptor to log in console an error occurring + LoggingInterceptor loggingInterceptor = new LoggingInterceptor(); + loggingInterceptor.setLoggerName("test.accesslog"); + loggingInterceptor.setMessageFormat("Source[$remoteAddr] Operation[${operationType}" + + "${idOrResourceName}] UA[${requestHeader.user-agent}] Params[${requestParameters}]"); + + registerInterceptor(loggingInterceptor); + + //creating an interceptor for special exception to dump the stack trace in the logs. + ExceptionHandlingInterceptor exceptionInterceptor = new ExceptionHandlingInterceptor(); + exceptionInterceptor.setReturnStackTracesForExceptionTypes(InternalErrorException.class, NullPointerException.class); + registerInterceptor(exceptionInterceptor); + + /* + * Use a narrative generator. This is a completely optional step, + * but can be useful as it causes HAPI to generate narratives for + * resources which don't otherwise have one. + */ + INarrativeGenerator narrativeGen = new DefaultThymeleafNarrativeGenerator(); + getFhirContext().setNarrativeGenerator(narrativeGen); + + } + +} diff --git a/src/main/java/net/ihe/gazelle/interceptor/LegacyLoggingInterceptor.java b/src/main/java/net/ihe/gazelle/business/interceptor/LegacyLoggingInterceptor.java similarity index 97% rename from src/main/java/net/ihe/gazelle/interceptor/LegacyLoggingInterceptor.java rename to src/main/java/net/ihe/gazelle/business/interceptor/LegacyLoggingInterceptor.java index ea98029e1cd51b8c35bac636f4349ba0275d1dd3..3bf84bc30997de9e528a31c785e69734feacbe16 100644 --- a/src/main/java/net/ihe/gazelle/interceptor/LegacyLoggingInterceptor.java +++ b/src/main/java/net/ihe/gazelle/business/interceptor/LegacyLoggingInterceptor.java @@ -1,4 +1,4 @@ -package net.ihe.gazelle.interceptor; +package net.ihe.gazelle.business.interceptor; import java.io.IOException; diff --git a/src/main/java/net/ihe/gazelle/interceptor/NewLoggingInterceptor.java b/src/main/java/net/ihe/gazelle/business/interceptor/NewLoggingInterceptor.java similarity index 93% rename from src/main/java/net/ihe/gazelle/interceptor/NewLoggingInterceptor.java rename to src/main/java/net/ihe/gazelle/business/interceptor/NewLoggingInterceptor.java index 49761fed82dc9ca44cca99fe6795d1837d0de3a9..295e8296f2f6e0e6fee9d2f4fb1221b5a7928d11 100644 --- a/src/main/java/net/ihe/gazelle/interceptor/NewLoggingInterceptor.java +++ b/src/main/java/net/ihe/gazelle/business/interceptor/NewLoggingInterceptor.java @@ -1,4 +1,4 @@ -package net.ihe.gazelle.interceptor; +package net.ihe.gazelle.business.interceptor; import ca.uhn.fhir.interceptor.api.Hook; import ca.uhn.fhir.interceptor.api.Pointcut; diff --git a/src/main/java/net/ihe/gazelle/provider/ChPatientResourceProvider.java b/src/main/java/net/ihe/gazelle/business/provider/ChPatientResourceProvider.java similarity index 99% rename from src/main/java/net/ihe/gazelle/provider/ChPatientResourceProvider.java rename to src/main/java/net/ihe/gazelle/business/provider/ChPatientResourceProvider.java index e8c06daa6c49d499c9075f35af759294995aafdb..74f518b3d67b7a1bd5e15d6d7149a05de05cc1ad 100644 --- a/src/main/java/net/ihe/gazelle/provider/ChPatientResourceProvider.java +++ b/src/main/java/net/ihe/gazelle/business/provider/ChPatientResourceProvider.java @@ -1,4 +1,4 @@ -package net.ihe.gazelle.provider; +package net.ihe.gazelle.business.provider; import java.net.MalformedURLException; import java.net.URL; @@ -181,7 +181,7 @@ public class ChPatientResourceProvider implements IResourceProvider { @Operation(name="$ihe-pix", idempotent = true) public Parameters findPatientsByIdentifier(@OperationParam(name = "sourceIdentifier") TokenParam sourceIdentifier, @OperationParam(name = "targetSystem") StringAndListParam targetSystem) - throws PatientResourceProviderException, ForbiddenOperationException, ResourceNotFoundException { + throws PatientResourceProviderException, ForbiddenOperationException, ResourceNotFoundException { Parameters results = new Parameters(); @@ -461,10 +461,10 @@ public class ChPatientResourceProvider implements IResourceProvider { /** * Method used to generate a Parameter Component representing an error in the the Fhir Resource Model * Permits to display the error. - * + * * @param errorType : the code of the error as a String. * Will be translated as an OperationOutcome.IssueType - * @return A ParametersParameterComponent representing the http error as a Fhir resource + * @return A ParametersParameterComponent representing the http error as a Fhir resource */ private ParametersParameterComponent generateErrorReturn(String errorCode) { OperationOutcome error = new OperationOutcome(); diff --git a/src/main/java/net/ihe/gazelle/business/provider/IhePatientResourceProvider.java b/src/main/java/net/ihe/gazelle/business/provider/IhePatientResourceProvider.java new file mode 100644 index 0000000000000000000000000000000000000000..cb67f07e63eecec40af1f861ce948972ca1c8846 --- /dev/null +++ b/src/main/java/net/ihe/gazelle/business/provider/IhePatientResourceProvider.java @@ -0,0 +1,261 @@ +package net.ihe.gazelle.business.provider; + +import ca.uhn.fhir.rest.annotation.Operation; +import ca.uhn.fhir.rest.annotation.OperationParam; +import ca.uhn.fhir.rest.annotation.Search; +import ca.uhn.fhir.rest.param.StringAndListParam; +import ca.uhn.fhir.rest.param.StringOrListParam; +import ca.uhn.fhir.rest.param.StringParam; +import ca.uhn.fhir.rest.param.TokenParam; +import ca.uhn.fhir.rest.server.IResourceProvider; +import ca.uhn.fhir.rest.server.exceptions.ForbiddenOperationException; +import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; +import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException; +import net.ihe.gazelle.app.patientregistryapi.application.SearchCrossReferenceException; +import net.ihe.gazelle.app.patientregistryapi.business.EntityIdentifier; +import net.ihe.gazelle.app.patientregistryapi.business.PatientAliases; +import net.ihe.gazelle.app.patientregistryapi.business.PersonName; +import net.ihe.gazelle.app.patientregistryxrefsearchclient.adapter.XRefSearchClient; +import org.hl7.fhir.instance.model.api.IBaseResource; +import org.hl7.fhir.r4.model.*; +import org.hl7.fhir.r4.model.Address.AddressUse; +import org.hl7.fhir.r4.model.Enumerations.AdministrativeGender; +import org.hl7.fhir.r4.model.HumanName.NameUse; +import org.hl7.fhir.r4.model.Parameters.ParametersParameterComponent; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.net.MalformedURLException; +import java.net.URL; +import java.util.*; + +/** + * This is a resource provider which stores Patient resources in memory using a HashMap. This is obviously not a production-ready solution for many + * reasons, + * but it is useful to help illustrate how to build a fully-functional server. + */ +public class IhePatientResourceProvider implements IResourceProvider { + /** + * The getResourceType method comes from IResourceProvider, and must be overridden to indicate what type of resource this provider supplies. + */ + @Override + public Class<? extends IBaseResource> getResourceType() { + return Patient.class; + } + + private static final Logger patientLogger = LoggerFactory.getLogger(IhePatientResourceProvider.class); + + /** + * This map has a resource ID as a key, and each key maps to a Deque list containing all versions of the resource with that ID. + */ + private Map<Long, Deque<Patient>> myIdToPatientVersions = new HashMap<Long, Deque<Patient>>(); + + + /** + * Search method for a Patient using the source identifier required parameter + * and an optional list of target system + * + * @param sourceIdentifierParam : the source identifier of the patient, should be formatted "urn:oid:x.x.x.x.x.x.x.x.x.x|value" + * @param targetSystemParam: the target System(s) we want to find the Patient on, should be formatted "urn:oid:x.x.x.x.x.x.x.x.x.x,urn:oid:x + * .x.x.x + * .x.x.x.x.x.x," + * @return a Parameters element composed of a list of target identifier for every Patient found, and an url to the Patient in the server. + */ + @Operation(name = "$ihe-pix", idempotent = true) + public Parameters findPatientsByIdentifier(@OperationParam(name = "sourceIdentifier", min = 1, max = 1) TokenParam sourceIdentifierParam, + @OperationParam(name = "targetSystem") StringAndListParam targetSystemParam) throws PatientResourceProviderException, ForbiddenOperationException, ResourceNotFoundException { + + EntityIdentifier sourceIdentifier = createEntityIdentifierFromSourceIdentifier(sourceIdentifierParam); + List<String> targetSystemList = createTargetSystemListFromParam(targetSystemParam); + + + Parameters results = new Parameters(); + + PatientAliases response; + + int log = 0; + + try { + URL url = new URL("https://qualification.ihe-europe.net/patient-registry/CrossReferenceService/xref-processing-service?wsdl"); + XRefSearchClient searchClient = new XRefSearchClient(url); + patientLogger.info(targetSystemList.toString()); + + response = searchClient.search(sourceIdentifier, targetSystemList); + patientLogger.info(Integer.toString(log++)); + + + } catch (MalformedURLException e) { + throw new PatientResourceProviderException("Could not find target url for Patient Registry, The given URL might be wrong.", e); + } catch (SearchCrossReferenceException e) { + + //results.addParameter(generateErrorReturn("code-invalid")); + return results; + //throw new ResourceNotFoundException("Could not find Patient in Patient Registry"); + } + + patientLogger.info(Integer.toString(log++)); + + if (response.getMembers().size() == 0) { + // results.addParameter(generateErrorReturn("notfound")); + return results; + //throw new ResourceNotFoundException("No crossReferenced Patient found."); + } + + patientLogger.info("Number of patents found : " + response.getMembers().size()); + + for (net.ihe.gazelle.app.patientregistryapi.business.Patient pat : response.getMembers()) { + +// long id = myNextId++; + + patientLogger.info(pat.getNames().get(0).getFamily()); + + Patient translated = this.translatePatientToR4(pat); + + for (EntityIdentifier entity : pat.getIdentifiers()) { + patientLogger.info(Integer.toString(log++)); + + Identifier r4Identifier = new Identifier(); + r4Identifier.setSystem(entity.getSystemIdentifier()); + r4Identifier.setValue(entity.getValue()); + translated.addIdentifier(r4Identifier); + + ParametersParameterComponent alias = new ParametersParameterComponent(); + alias.setName("target Identifier"); + alias.setValue(r4Identifier); + results.addParameter(alias); + + } + + ParametersParameterComponent targetId = new ParametersParameterComponent(); + targetId.setName("targetId"); + Reference ref = new Reference(); +// targetId.setValue(ref); + + results.addParameter(targetId); + patientLogger.info(Integer.toString(log++)); + + // translated.setId(Long.toString(id)); + LinkedList<Patient> listToAdd = new LinkedList<>(); + listToAdd.add(translated); + // myIdToPatientVersions.put(id, listToAdd); + + } + // results.setId(Long.toString(myNextId++)); + patientLogger.info(Integer.toString(log++)); + return results; + } + + @Search + public List<Patient> findPatientsUsingArbitraryCriteria() { + LinkedList<Patient> retVal = new LinkedList<Patient>(); + + for (Deque<Patient> nextPatientList : myIdToPatientVersions.values()) { + Patient nextPatient = nextPatientList.getLast(); + retVal.add(nextPatient); + } + + return retVal; + } + + + /** + * Private Method called to translate a Patient between the model in Patient Registry to the fhir model + * We need to translate a Patient in order to have it in the list of Patient contained in the fhir server + * To later have access to it (through an URL given when searched) + * + * @param patReg : the Patient in the Patient Registry Model + * @return the same Patient translated in the FHIR r4 model. + */ + private Patient translatePatientToR4(net.ihe.gazelle.app.patientregistryapi.business.Patient patReg) { + + Patient translatedPatient = new Patient(); + + translatedPatient.setActive(patReg.isActive()); + List<HumanName> nameList = new ArrayList<>(); + for (PersonName pName : patReg.getNames()) { + HumanName name = new HumanName(); + name.setFamily(pName.getFamily()); + List<StringType> givenNames = new ArrayList<>(); + for (String given : pName.getGivens()) { + givenNames.add(new StringType(given)); + } + name.setGiven(givenNames); + name.addPrefix(pName.getPrefix()); + name.addSuffix(pName.getSuffix()); + name.setUse(NameUse.fromCode(pName.getUse())); + nameList.add(name); + } + translatedPatient.setName(nameList); + translatedPatient.setGender(AdministrativeGender.fromCode(patReg.getGender().toString().toLowerCase())); + List<Address> addresses = new ArrayList<>(); + for (net.ihe.gazelle.app.patientregistryapi.business.Address pAddress : patReg.getAddresses()) { + Address address = new Address(); + address.setUse(AddressUse.fromCode(pAddress.getUse().toString().toLowerCase())); + address.setCity(pAddress.getCity()); + address.setCountry(pAddress.getCountryIso3()); + address.setPostalCode(pAddress.getPostalCode()); + address.setState(pAddress.getState()); + for (String addressLine : pAddress.getLines()) + address.addLine(addressLine); + addresses.add(address); + } + translatedPatient.setAddress(addresses); + translatedPatient.setBirthDate(patReg.getDateOfBirth()); + + return translatedPatient; + + } + + private EntityIdentifier createEntityIdentifierFromSourceIdentifier(TokenParam sourceIdentifier) { + if (sourceIdentifier == null) { + throw new InvalidRequestException("Invalid request : sourceIdentifier is a mandatory parameter"); + } + String sourceIdentifierSystem = sourceIdentifier.getSystem(); + String sourceIdentifierValue = sourceIdentifier.getValue(); + if (sourceIdentifierSystem == null) { + throw new InvalidRequestException("Invalid request : sourceIdentifier is wrong"); + } + if (sourceIdentifierValue == null) { + throw new InvalidRequestException("Invalid request : sourceIdentifier is wrong"); + } + if (sourceIdentifierSystem.isBlank() || sourceIdentifierValue.isBlank()) { + throw new InvalidRequestException("Invalid request : sourceIdentifier is wrong"); + } + patientLogger.info("Searching Patient with given sourceIdentifier: " + sourceIdentifier); + + EntityIdentifier wellFormedEntityIdentifier = new EntityIdentifier(); + if (sourceIdentifierSystem.contains("urn:oid:")) { + wellFormedEntityIdentifier.setSystemIdentifier(sourceIdentifierSystem.replace("urn:oid:", "")); + wellFormedEntityIdentifier.setType("ISO"); + wellFormedEntityIdentifier.setValue(sourceIdentifierValue); + } else if (sourceIdentifierSystem.contains("http")) { + wellFormedEntityIdentifier.setSystemIdentifier(sourceIdentifierSystem); + wellFormedEntityIdentifier.setType("ISO"); + wellFormedEntityIdentifier.setValue(sourceIdentifierValue); + } else { + throw new InvalidRequestException("Invalid request : sourceIdentifier system is malformed"); + } + return wellFormedEntityIdentifier; + } + + private List<String> createTargetSystemListFromParam(StringAndListParam targetSystemParam) { + List<String> targetSystemList = new ArrayList<>(); + if (targetSystemParam != null) { + for (StringOrListParam listParam : targetSystemParam.getValuesAsQueryTokens()) { + List<StringParam> queryStrings = listParam.getValuesAsQueryTokens(); + for (StringParam singleParam : queryStrings) { + String singleParamValue = singleParam.getValue(); + if (singleParamValue.contains("urn:oid:")) { + singleParamValue = singleParamValue.replace("urn:oid:", ""); + } + if (singleParamValue.equals("")) { + throw new InvalidRequestException("Invalid request : targetDomain can not be empty"); + } + targetSystemList.add(singleParamValue); + } + } + } + return targetSystemList; + } + +} diff --git a/src/main/java/net/ihe/gazelle/provider/PatientResourceProviderException.java b/src/main/java/net/ihe/gazelle/business/provider/PatientResourceProviderException.java similarity index 93% rename from src/main/java/net/ihe/gazelle/provider/PatientResourceProviderException.java rename to src/main/java/net/ihe/gazelle/business/provider/PatientResourceProviderException.java index c5928d05e96bab2bf4b2d5861c11a96cb6c1fdd0..a2ec930474177b4fca52477350f15815d8febadd 100644 --- a/src/main/java/net/ihe/gazelle/provider/PatientResourceProviderException.java +++ b/src/main/java/net/ihe/gazelle/business/provider/PatientResourceProviderException.java @@ -1,4 +1,4 @@ -package net.ihe.gazelle.provider; +package net.ihe.gazelle.business.provider; public class PatientResourceProviderException extends Exception { diff --git a/src/main/java/net/ihe/gazelle/provider/IhePatientResourceProvider.java b/src/main/java/net/ihe/gazelle/provider/IhePatientResourceProvider.java deleted file mode 100644 index e00035557e8aece3768f48dd17e9c9523512432d..0000000000000000000000000000000000000000 --- a/src/main/java/net/ihe/gazelle/provider/IhePatientResourceProvider.java +++ /dev/null @@ -1,473 +0,0 @@ -package net.ihe.gazelle.provider; - -import java.net.MalformedURLException; -import java.net.URL; -import java.util.ArrayList; -import java.util.Deque; -import java.util.HashMap; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; - -import org.hl7.fhir.instance.model.api.IBaseResource; -import org.hl7.fhir.r4.model.Address; -import org.hl7.fhir.r4.model.Address.AddressUse; -import org.hl7.fhir.r4.model.Enumerations.AdministrativeGender; -import org.hl7.fhir.r4.model.HumanName; -import org.hl7.fhir.r4.model.HumanName.NameUse; -import org.hl7.fhir.r4.model.IdType; -import org.hl7.fhir.r4.model.Identifier; -import org.hl7.fhir.r4.model.InstantType; -import org.hl7.fhir.r4.model.OperationOutcome; -import org.hl7.fhir.r4.model.OperationOutcome.IssueSeverity; -import org.hl7.fhir.r4.model.OperationOutcome.OperationOutcomeIssueComponent; -import org.hl7.fhir.r4.model.Parameters; -import org.hl7.fhir.r4.model.Parameters.ParametersParameterComponent; -import org.hl7.fhir.r4.model.Patient; -import org.hl7.fhir.r4.model.Reference; -import org.hl7.fhir.r4.model.StringType; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.parser.DataFormatException; -import ca.uhn.fhir.rest.annotation.Create; -import ca.uhn.fhir.rest.annotation.IdParam; -import ca.uhn.fhir.rest.annotation.Operation; -import ca.uhn.fhir.rest.annotation.OperationParam; -import ca.uhn.fhir.rest.annotation.Read; -import ca.uhn.fhir.rest.annotation.RequiredParam; -import ca.uhn.fhir.rest.annotation.ResourceParam; -import ca.uhn.fhir.rest.annotation.Search; -import ca.uhn.fhir.rest.annotation.Update; -import ca.uhn.fhir.rest.api.MethodOutcome; -import ca.uhn.fhir.rest.param.StringAndListParam; -import ca.uhn.fhir.rest.param.StringOrListParam; -import ca.uhn.fhir.rest.param.StringParam; -import ca.uhn.fhir.rest.param.TokenParam; -import ca.uhn.fhir.rest.server.IResourceProvider; -import ca.uhn.fhir.rest.server.exceptions.ForbiddenOperationException; -import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; -import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException; -import ca.uhn.fhir.rest.server.exceptions.UnprocessableEntityException; -import net.ihe.gazelle.app.patientregistryapi.application.SearchCrossReferenceException; -import net.ihe.gazelle.app.patientregistryapi.business.EntityIdentifier; -import net.ihe.gazelle.app.patientregistryapi.business.PatientAliases; -import net.ihe.gazelle.app.patientregistryapi.business.PersonName; -import net.ihe.gazelle.app.patientregistryxrefsearchclient.adapter.XRefSearchClient; - -/** - * This is a resource provider which stores Patient resources in memory using a HashMap. This is obviously not a production-ready solution for many reasons, - * but it is useful to help illustrate how to build a fully-functional server. - */ -public class IhePatientResourceProvider implements IResourceProvider { - - private static final Logger patientLogger = LoggerFactory.getLogger(IhePatientResourceProvider.class); - - /** - * This map has a resource ID as a key, and each key maps to a Deque list containing all versions of the resource with that ID. - */ - private Map<Long, Deque<Patient>> myIdToPatientVersions = new HashMap<Long, Deque<Patient>>(); - - /** - * This is used to generate new IDs - */ - private long myNextId = 1; - - /** - * Constructor, which pre-populates the provider with one resource instance. - */ - public IhePatientResourceProvider() { - long resourceId = myNextId++; - - Patient patient = new Patient(); - patient.setId(Long.toString(resourceId)); - patient.addIdentifier(); - patient.getIdentifier().get(0).setSystem("urn:oid"); - patient.getIdentifier().get(0).setValue("00002"); - patient.addName().setFamily("Test"); - patient.getName().get(0).addGiven("PatientOne"); - patient.setGender(AdministrativeGender.FEMALE); - - LinkedList<Patient> list = new LinkedList<Patient>(); - list.add(patient); - - - myIdToPatientVersions.put(resourceId, list); - - } - - /** - * Stores a new version of the patient in memory so that it can be retrieved later. - * - * @param thePatient The patient resource to store - * @param theId The ID of the patient to retrieve - */ - private void addNewVersion(Patient thePatient, Long theId) { - if (!myIdToPatientVersions.containsKey(theId)) { - myIdToPatientVersions.put(theId, new LinkedList<Patient>()); - } - - thePatient.getMeta().setLastUpdatedElement(InstantType.withCurrentTime()); - - Deque<Patient> existingVersions = myIdToPatientVersions.get(theId); - - // We just use the current number of versions as the next version number - String newVersion = Integer.toString(existingVersions.size()); - - // Create an ID with the new version and assign it back to the resource - IdType newId = new IdType("Patient", Long.toString(theId), newVersion); - thePatient.setId(newId); - - existingVersions.add(thePatient); - } - - /** - * The "@Create" annotation indicates that this method implements "create=type", which adds a - * new instance of a resource to the server. - */ - @Create() - public MethodOutcome createPatient(@ResourceParam Patient thePatient) { - validateResource(thePatient); - - // Here we are just generating IDs sequentially - long id = myNextId++; - - addNewVersion(thePatient, id); - - // Let the caller know the ID of the newly created resource - return new MethodOutcome(new IdType(id)); - } - - /** - * The "@Search" annotation indicates that this method supports the search operation. You may have many different method annotated with this annotation, to support many different search criteria. - * This example searches by family name. - * - * @param theFamilyName This operation takes one parameter which is the search criteria. It is annotated with the "@Required" annotation. This annotation takes one argument, a string containing the name of - * the search criteria. The datatype here is StringDt, but there are other possible parameter types depending on the specific search criteria. - * @return This method returns a list of Patients. This list may contain multiple matching resources, or it may also be empty. - */ - @Search() - public List<Patient> findPatientsByName(@RequiredParam(name = Patient.SP_FAMILY) StringType theFamilyName) { - LinkedList<Patient> retVal = new LinkedList<Patient>(); - - /* - * Look for all patients matching the name - */ - for (Deque<Patient> nextPatientList : myIdToPatientVersions.values()) { - Patient nextPatient = nextPatientList.getLast(); - NAMELOOP: - for (HumanName nextName : nextPatient.getName()) { - String nextFamily = nextName.getFamily(); - if (theFamilyName.equals(nextFamily)) { - retVal.add(nextPatient); - break NAMELOOP; - } - } - } - - return retVal; - } - - /** - * Search method for a Patient using the source identifier required parameter - * and an optional list of target system - * - * @param sourceIdentifier : the source identifier of the patient, should be formated "urn:oid:x.x.x.x.x.x.x.x.x.x|value" - * @param targetSystem: the target System(s) we want to find the Patient on, should be formated "urn:oid:x.x.x.x.x.x.x.x.x.x,urn:oid:x.x.x.x.x.x.x.x.x.x," - * - * @return a Parameters element composed of a list of target identifier for every Patient found, and an url to the Patient in the server. - */ - @Operation(name="$ihe-pix", idempotent = true) - public Parameters findPatientsByIdentifier(@OperationParam(name = "sourceIdentifier",min = 1,max = 1) TokenParam sourceIdentifier, - @OperationParam(name = "targetSystem") StringAndListParam targetSystem) throws PatientResourceProviderException, ForbiddenOperationException, ResourceNotFoundException { - - Parameters results = new Parameters(); - - patientLogger.info("Searching Patient " + sourceIdentifier); - - PatientAliases response = new PatientAliases(); - - int log = 0; - if (sourceIdentifier ==null){ - throw new InvalidRequestException("Missing parameter"); - } - try { - URL url = new URL("https://qualification.ihe-europe.net/patient-registry/CrossReferenceService/xref-processing-service?wsdl"); - - XRefSearchClient searchClient = new XRefSearchClient(url); - - EntityIdentifier wellFormedEntityIdentifier = new EntityIdentifier(); - - - if (sourceIdentifier.getSystem().contains("urn:oid:")) { - wellFormedEntityIdentifier.setSystemIdentifier(sourceIdentifier.getSystem().replace("urn:oid:", "")); - wellFormedEntityIdentifier.setType("ISO"); - } - - wellFormedEntityIdentifier.setValue(sourceIdentifier.getValue()); - patientLogger.info(wellFormedEntityIdentifier.getValue()); - - List<String> listTargetSystem = new ArrayList<String>(); - if (null != targetSystem) { - for (StringOrListParam nextList : targetSystem.getValuesAsQueryTokens()) { - List<StringParam> queryStrings = nextList.getValuesAsQueryTokens(); - for (StringParam singleParam : queryStrings) { - if (singleParam.getValue().equals("")) { - results.addParameter(generateErrorReturn("code-invalid")); - return results; - //throw new ForbiddenOperationException("Won't accept empty targetSystem"); - } - listTargetSystem.add(singleParam.getValue()); - } - } - } - - - patientLogger.info(listTargetSystem.toString()); - - response = searchClient.search(wellFormedEntityIdentifier, listTargetSystem); - patientLogger.info(Integer.toString(log++)); - - - } catch (MalformedURLException e) { - throw new PatientResourceProviderException("Could not find target url for Patient Registry, The given URL might be wrong.", e); - } catch (SearchCrossReferenceException e) { - - results.addParameter(generateErrorReturn("code-invalid")); - return results; - //throw new ResourceNotFoundException("Could not find Patient in Patient Registry"); - } - - patientLogger.info(Integer.toString(log++)); - - if ( response.getMembers().size() == 0 ) { - results.addParameter(generateErrorReturn("notfound")); - return results; - //throw new ResourceNotFoundException("No crossReferenced Patient found."); - } - - patientLogger.info("Number of patents found : " + response.getMembers().size()); - - for (net.ihe.gazelle.app.patientregistryapi.business.Patient pat : response.getMembers()) { - - long id = myNextId++; - - patientLogger.info(pat.getNames().get(0).getFamily()); - - Patient translated = this.translatePatientToR4(pat); - - for (EntityIdentifier entity : pat.getIdentifiers()) { - patientLogger.info(Integer.toString(log++)); - - Identifier r4Identifier = new Identifier(); - r4Identifier.setSystem(entity.getSystemIdentifier()); - r4Identifier.setValue(entity.getValue()); - translated.addIdentifier(r4Identifier); - - ParametersParameterComponent alias = new ParametersParameterComponent(); - alias.setName("target Identifier"); - alias.setValue(r4Identifier); - results.addParameter(alias); - - } - - ParametersParameterComponent targetId = new ParametersParameterComponent(); - targetId.setName("targetId"); - Reference ref = new Reference(); - ref.setReference("pixm_fhir_server/fhir/Patient/" + id); - targetId.setValue(ref); - - results.addParameter(targetId); - patientLogger.info(Integer.toString(log++)); - - translated.setId(Long.toString(id)); - LinkedList<Patient> listToAdd = new LinkedList<>(); - listToAdd.add(translated); - myIdToPatientVersions.put(id, listToAdd); - - } - results.setId(Long.toString(myNextId++)); - patientLogger.info(Integer.toString(log++)); - return results; - } - - @Search - public List<Patient> findPatientsUsingArbitraryCriteria() { - LinkedList<Patient> retVal = new LinkedList<Patient>(); - - for (Deque<Patient> nextPatientList : myIdToPatientVersions.values()) { - Patient nextPatient = nextPatientList.getLast(); - retVal.add(nextPatient); - } - - return retVal; - } - - - /** - * The getResourceType method comes from IResourceProvider, and must be overridden to indicate what type of resource this provider supplies. - */ - @Override - public Class<? extends IBaseResource> getResourceType() { - return Patient.class; - } - - /** - * This is the "read" operation. The "@Read" annotation indicates that this method supports the read and/or vread operation. - * <p> - * Read operations take a single parameter annotated with the {@link IdParam} paramater, and should return a single resource instance. - * </p> - * - * @param theId The read operation takes one parameter, which must be of type IdDt and must be annotated with the "@Read.IdParam" annotation. - * @return Returns a resource matching this identifier, or null if none exists. - */ - @Read(version = true) - public Patient readPatient(@IdParam IdType theId) { - - Deque<Patient> retVal; - patientLogger.warn("ReadingPatient " + theId.getIdPart()); - try { - retVal = myIdToPatientVersions.get(theId.getIdPartAsLong()); - } catch (NumberFormatException e) { - /* - * If we can't parse the ID as a long, it's not valid so this is an unknown resource - */ - throw new ResourceNotFoundException(theId); - } - - if (retVal == null) { - throw new ResourceNotFoundException(theId); - } - if (theId.hasVersionIdPart() == false) { - return retVal.getLast(); - } else { - patientLogger.info("Patient found"); - for (Patient nextVersion : retVal) { - String nextVersionId = nextVersion.getIdElement().getVersionIdPart(); - if (theId.getVersionIdPart().equals(nextVersionId)) { - return nextVersion; - } - } - patientLogger.warn("Could not find ressource"); - // No matching version - throw new ResourceNotFoundException("Unknown version: " + theId.getValue()); - } - - } - - /** - * The "@Update" annotation indicates that this method supports replacing an existing - * resource (by ID) with a new instance of that resource. - * - * @param theId This is the ID of the patient to update - * @param thePatient This is the actual resource to save - * @return This method returns a "MethodOutcome" - */ - @Update() - public MethodOutcome updatePatient(@IdParam IdType theId, @ResourceParam Patient thePatient) { - validateResource(thePatient); - - Long id; - try { - id = theId.getIdPartAsLong(); - } catch (DataFormatException e) { - throw new InvalidRequestException("Invalid ID " + theId.getValue() + " - Must be numeric"); - } - - /* - * Throw an exception (HTTP 404) if the ID is not known - */ - if (!myIdToPatientVersions.containsKey(id)) { - throw new ResourceNotFoundException(theId); - } - - addNewVersion(thePatient, id); - - return new MethodOutcome(); - } - - /** - * This method just provides simple business validation for resources we are storing. - * - * @param thePatient The patient to validate - */ - private void validateResource(Patient thePatient) { - /* - * Our server will have a rule that patients must have a family name or we will reject them - */ - if (thePatient.getNameFirstRep().getFamily().isEmpty()) { - OperationOutcome outcome = new OperationOutcome(); - outcome.addIssue().setSeverity(IssueSeverity.FATAL).setDiagnostics("No family name provided, Patient resources must have at least one family name."); - throw new UnprocessableEntityException(FhirContext.forDstu3(), outcome); - } - } - - /** - * Private Method called to translate a Patient between the model in Patient Registry to the fhir model - * We need to translate a Patient in order to have it in the list of Patient contained in the fhir server - * To later have access to it (through an URL given when searched) - * - * @param patReg : the Patient in the Patient Registry Model - * @return the same Patient translated in the FHIR r4 model. - */ - private Patient translatePatientToR4(net.ihe.gazelle.app.patientregistryapi.business.Patient patReg) { - - Patient translatedPatient = new Patient(); - - translatedPatient.setActive(patReg.isActive()); - List<HumanName> nameList = new ArrayList<>(); - for (PersonName pName : patReg.getNames()) { - HumanName name = new HumanName(); - name.setFamily(pName.getFamily()); - List<StringType> givenNames = new ArrayList<>(); - for (String given : pName.getGivens()) { - givenNames.add(new StringType(given)); - } - name.setGiven(givenNames); - name.addPrefix(pName.getPrefix()); - name.addSuffix(pName.getSuffix()); - name.setUse(NameUse.fromCode(pName.getUse())); - nameList.add(name); - } - translatedPatient.setName(nameList); - translatedPatient.setGender(AdministrativeGender.fromCode(patReg.getGender().toString().toLowerCase())); - List<Address> addresses = new ArrayList<>(); - for (net.ihe.gazelle.app.patientregistryapi.business.Address pAddress : patReg.getAddresses()) { - Address address = new Address(); - address.setUse(AddressUse.fromCode(pAddress.getUse().toString().toLowerCase())); - address.setCity(pAddress.getCity()); - address.setCountry(pAddress.getCountryIso3()); - address.setPostalCode(pAddress.getPostalCode()); - address.setState(pAddress.getState()); - for(String addressLine : pAddress.getLines()) - address.addLine(addressLine); - addresses.add(address); - } - translatedPatient.setAddress(addresses); - translatedPatient.setBirthDate(patReg.getDateOfBirth()); - - return translatedPatient; - - } - - /** - * Method used to generate a Parameter Component representing an error in the the Fhir Resource Model - * Permits to display the error. - * - * @param errorType : the code of the error as a String. - * Will be translated as an OperationOutcome.IssueType - * @return A ParametersParameterComponent representing the http error as a Fhir resource - */ - private ParametersParameterComponent generateErrorReturn(String errorType) { - OperationOutcome error = new OperationOutcome(); - OperationOutcomeIssueComponent issue = new OperationOutcomeIssueComponent(); - issue.setCode(OperationOutcome.IssueType.fromCode(errorType)); - error.addIssue(issue); - ParametersParameterComponent errorReturned = new ParametersParameterComponent(); - errorReturned.setResource(error); - return errorReturned; - } - - -} diff --git a/src/main/java/net/ihe/gazelle/servlet/IheHapiFhirServer.java b/src/main/java/net/ihe/gazelle/servlet/IheHapiFhirServer.java deleted file mode 100644 index 9028e36cb2468a79cfc629e2271e18d9c4874b87..0000000000000000000000000000000000000000 --- a/src/main/java/net/ihe/gazelle/servlet/IheHapiFhirServer.java +++ /dev/null @@ -1,72 +0,0 @@ -package net.ihe.gazelle.servlet; - -import java.util.ArrayList; -import java.util.List; - -import javax.servlet.annotation.WebServlet; - -import ca.uhn.fhir.context.FhirContext; -import ca.uhn.fhir.narrative.DefaultThymeleafNarrativeGenerator; -import ca.uhn.fhir.narrative.INarrativeGenerator; -import ca.uhn.fhir.rest.server.IResourceProvider; -import ca.uhn.fhir.rest.server.RestfulServer; -import ca.uhn.fhir.rest.server.exceptions.InternalErrorException; -import ca.uhn.fhir.rest.server.interceptor.ExceptionHandlingInterceptor; -import ca.uhn.fhir.rest.server.interceptor.LoggingInterceptor; -import ca.uhn.fhir.rest.server.interceptor.ResponseHighlighterInterceptor; -import net.ihe.gazelle.interceptor.LegacyLoggingInterceptor; -import net.ihe.gazelle.provider.IhePatientResourceProvider; - -/** - * This servlet is the actual FHIR server itself - */ -@WebServlet(urlPatterns= {"/fhir_ihe/*"}, displayName="FHIR Server IHE") -public class IheHapiFhirServer extends RestfulServer { - - private static final long serialVersionUID = 1L; - - /** - * Constructor - */ - public IheHapiFhirServer() { - super(FhirContext.forR4()); // This is an R4 server - } - - /** - * This method is called automatically when the - * servlet is initializing. - */ - @Override - public void initialize() { - /* - * Two resource providers are defined. Each one handles a specific - * type of resource. - */ - List<IResourceProvider> providers = new ArrayList<IResourceProvider>(); - providers.add(new IhePatientResourceProvider()); - setResourceProviders(providers); - - //creating an interceptor to log in console an error occurring - LoggingInterceptor loggingInterceptor = new LoggingInterceptor(); - loggingInterceptor.setLoggerName("test.accesslog"); - loggingInterceptor.setMessageFormat("Source[$remoteAddr] Operation[${operationType}" - + "${idOrResourceName}] UA[${requestHeader.user-agent}] Params[${requestParameters}]"); - - registerInterceptor(loggingInterceptor); - - //creating an interceptor for special excpetion to dump the stack trace in the logs. - ExceptionHandlingInterceptor exceptionInterceptor = new ExceptionHandlingInterceptor(); - exceptionInterceptor.setReturnStackTracesForExceptionTypes(InternalErrorException.class, NullPointerException.class); - registerInterceptor(exceptionInterceptor); - - /* - * Use a narrative generator. This is a completely optional step, - * but can be useful as it causes HAPI to generate narratives for - * resources which don't otherwise have one. - */ - INarrativeGenerator narrativeGen = new DefaultThymeleafNarrativeGenerator(); - getFhirContext().setNarrativeGenerator(narrativeGen); - - } - -} diff --git a/src/main/resources/SoapUI/IHE-Pixm-soapui-project.xml b/src/main/resources/SoapUI/IHE-Pixm-soapui-project.xml index 18f5a8143b9195e23c9e3badc6dad09319f42e1c..71822cb5dec90e9583bbe0740d82f9d7813dcdba 100644 --- a/src/main/resources/SoapUI/IHE-Pixm-soapui-project.xml +++ b/src/main/resources/SoapUI/IHE-Pixm-soapui-project.xml @@ -30,7 +30,7 @@ <con:entry key="Domain" value=""/> <con:entry key="Tool Args" value=""/> <con:entry key="Save Project" value="false"/> -</xml-fragment>]]></con:setting></con:settings><con:interface xsi:type="con:RestService" id="3aa45915-2866-4224-a6c0-61c79628c944" wadlVersion="http://wadl.dev.java.net/2009/02" name="http://qualification.ihe-europe.net" type="rest" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:settings/><con:definitionCache type="TEXT" rootPart=""/><con:endpoints><con:endpoint>http://localhost:8089/</con:endpoint><con:endpoint>http://qualification.ihe-europe.net</con:endpoint></con:endpoints><con:resource name="" path="{resource}{operation}" id="cf9419c5-50ad-4552-915e-bcb5492a80db"><con:settings/><con:parameters><con:parameter><con:name>resource</con:name><con:value/><con:style>TEMPLATE</con:style><con:default/><con:description xsi:nil="true"/></con:parameter><con:parameter><con:name>operation</con:name><con:value/><con:style>TEMPLATE</con:style><con:default/><con:description xsi:nil="true"/></con:parameter><con:parameter><con:name>sourceIdentifier</con:name><con:value/><con:style>QUERY</con:style><con:default/><con:description xsi:nil="true"/></con:parameter><con:parameter><con:name>targetSystem</con:name><con:value/><con:style>QUERY</con:style><con:default/><con:description xsi:nil="true"/></con:parameter><con:parameter><con:name>_format</con:name><con:value/><con:style>QUERY</con:style><con:default/><con:description xsi:nil="true"/></con:parameter></con:parameters><con:method name="GET from sourceIdentifier" id="a06fed5a-ee7b-4b4b-be29-9368040008a4" method="GET"><con:settings/><con:parameters/><con:representation type="FAULT"><con:mediaType>text/html; charset=iso-8859-1</con:mediaType><con:status>404</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="FAULT"><con:mediaType xsi:nil="true"/><con:status>404</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="FAULT"><con:mediaType xsi:nil="true"/><con:status>404</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="FAULT"><con:mediaType xsi:nil="true"/><con:status>404</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="FAULT"><con:mediaType xsi:nil="true"/><con:status>404</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="FAULT"><con:mediaType xsi:nil="true"/><con:status>404</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="FAULT"><con:mediaType xsi:nil="true"/><con:status>404</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType>text/html; charset=iso-8859-1</con:mediaType><con:status>200</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="FAULT"><con:mediaType xsi:nil="true"/><con:status>404</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType>application/json</con:mediaType><con:status>200</con:status><con:params/><con:element xmlns:pat="http://qualification.ihe-europe.net/Patient%2F%24ihe-pix">pat:Response</con:element></con:representation><con:representation type="FAULT"><con:mediaType>application/json</con:mediaType><con:status>404 400 403 401</con:status><con:params/><con:element xmlns:pat="http://qualification.ihe-europe.net/Patient%2F%24ihe-pix">pat:Fault</con:element></con:representation><con:representation type="FAULT"><con:mediaType xsi:nil="true"/><con:status>500</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="FAULT"><con:mediaType xsi:nil="true"/><con:status>500</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="FAULT"><con:mediaType xsi:nil="true"/><con:status>500</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="FAULT"><con:mediaType xsi:nil="true"/><con:status>500</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType>fhir+json</con:mediaType><con:status>200</con:status><con:params/><con:element xmlns:pat="http://qualification.ihe-europe.net/Patient%2F%24ihe-pix">pat:Response</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType>fhir+xml</con:mediaType><con:status>200</con:status><con:params/><con:element>id</con:element></con:representation><con:representation type="FAULT"><con:mediaType>application/fhir+xml</con:mediaType><con:status>403</con:status><con:params/><con:element>id</con:element></con:representation><con:representation type="FAULT"><con:mediaType/><con:status>404</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="FAULT"><con:mediaType xsi:nil="true"/><con:status>500</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="FAULT"><con:mediaType xsi:nil="true"/><con:status>500</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="FAULT"><con:mediaType xsi:nil="true"/><con:status>500</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="FAULT"><con:mediaType xsi:nil="true"/><con:status>500</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="FAULT"><con:mediaType xsi:nil="true"/><con:status>500</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="FAULT"><con:mediaType xsi:nil="true"/><con:status>500</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="FAULT"><con:mediaType xsi:nil="true"/><con:status>404</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="FAULT"><con:mediaType xsi:nil="true"/><con:status>500</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="FAULT"><con:mediaType>application/fhir+json</con:mediaType><con:status>404</con:status><con:params/><con:element xmlns:pat="http://qualification.ihe-europe.net/Patient%2F%24ihe-pix">pat:Fault</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:request name="code 200" id="79fc74bf-5277-4aef-8f00-744072264e5e" mediaType="application/json" multiValueDelimiter=","><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers"><xml-fragment/></con:setting><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@remove_empty_content">false</con:setting></con:settings><con:endpoint>http://localhost:8089/</con:endpoint><con:request/><con:originalUri>http://qualification.ihe-europe.net/Patient%2F%24ihe-pix</con:originalUri><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters> +</xml-fragment>]]></con:setting></con:settings><con:interface xsi:type="con:RestService" id="3aa45915-2866-4224-a6c0-61c79628c944" wadlVersion="http://wadl.dev.java.net/2009/02" name="http://qualification.ihe-europe.net" type="rest" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:settings/><con:definitionCache type="TEXT" rootPart=""/><con:endpoints><con:endpoint>http://localhost:8580/pixm_fhir_server/fhir_ihe</con:endpoint><con:endpoint>http://qualification.ihe-europe.net/pixm_fhir_server/fhir_ihe</con:endpoint></con:endpoints><con:resource name="" path="/{resource}/{operation}" id="cf9419c5-50ad-4552-915e-bcb5492a80db"><con:settings/><con:parameters><con:parameter><con:name>resource</con:name><con:value/><con:style>TEMPLATE</con:style><con:default/><con:description xsi:nil="true"/></con:parameter><con:parameter><con:name>operation</con:name><con:value/><con:style>TEMPLATE</con:style><con:default/><con:description xsi:nil="true"/></con:parameter><con:parameter><con:name>sourceIdentifier</con:name><con:value/><con:style>QUERY</con:style><con:default/><con:description xsi:nil="true"/></con:parameter><con:parameter><con:name>targetSystem</con:name><con:value/><con:style>QUERY</con:style><con:default/><con:description xsi:nil="true"/></con:parameter><con:parameter><con:name>_format</con:name><con:value/><con:style>QUERY</con:style><con:default/><con:description xsi:nil="true"/></con:parameter></con:parameters><con:method name="GET from sourceIdentifier" id="a06fed5a-ee7b-4b4b-be29-9368040008a4" method="GET"><con:settings/><con:parameters/><con:representation type="FAULT"><con:mediaType>text/html; charset=iso-8859-1</con:mediaType><con:status>404</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="FAULT"><con:mediaType xsi:nil="true"/><con:status>404</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="FAULT"><con:mediaType xsi:nil="true"/><con:status>404</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="FAULT"><con:mediaType xsi:nil="true"/><con:status>404</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="FAULT"><con:mediaType xsi:nil="true"/><con:status>404</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="FAULT"><con:mediaType xsi:nil="true"/><con:status>404</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="FAULT"><con:mediaType xsi:nil="true"/><con:status>404</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType>text/html; charset=iso-8859-1</con:mediaType><con:status>200</con:status><con:params/><con:element>html</con:element></con:representation><con:representation type="FAULT"><con:mediaType xsi:nil="true"/><con:status>404</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType>application/json</con:mediaType><con:status>200</con:status><con:params/><con:element xmlns:pat="http://qualification.ihe-europe.net/Patient%2F%24ihe-pix">pat:Response</con:element></con:representation><con:representation type="FAULT"><con:mediaType>application/json</con:mediaType><con:status>404 400 403 401</con:status><con:params/><con:element xmlns:pat="http://qualification.ihe-europe.net/Patient%2F%24ihe-pix">pat:Fault</con:element></con:representation><con:representation type="FAULT"><con:mediaType xsi:nil="true"/><con:status>500</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="FAULT"><con:mediaType xsi:nil="true"/><con:status>500</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="FAULT"><con:mediaType xsi:nil="true"/><con:status>500</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="FAULT"><con:mediaType xsi:nil="true"/><con:status>500</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType>fhir+json</con:mediaType><con:status>200</con:status><con:params/><con:element xmlns:pat="http://qualification.ihe-europe.net/Patient%2F%24ihe-pix">pat:Response</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType>fhir+xml</con:mediaType><con:status>200</con:status><con:params/><con:element>id</con:element></con:representation><con:representation type="FAULT"><con:mediaType>application/fhir+xml</con:mediaType><con:status>403</con:status><con:params/><con:element>id</con:element></con:representation><con:representation type="FAULT"><con:mediaType/><con:status>404</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="FAULT"><con:mediaType xsi:nil="true"/><con:status>500</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="FAULT"><con:mediaType xsi:nil="true"/><con:status>500</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="FAULT"><con:mediaType xsi:nil="true"/><con:status>500</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="FAULT"><con:mediaType xsi:nil="true"/><con:status>500</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="FAULT"><con:mediaType xsi:nil="true"/><con:status>500</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="FAULT"><con:mediaType xsi:nil="true"/><con:status>500</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="FAULT"><con:mediaType xsi:nil="true"/><con:status>404</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="FAULT"><con:mediaType xsi:nil="true"/><con:status>500</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="FAULT"><con:mediaType>application/fhir+json</con:mediaType><con:status>404</con:status><con:params/><con:element xmlns:pat="http://qualification.ihe-europe.net/Patient%2F%24ihe-pix">pat:Fault</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType xsi:nil="true"/><con:status>0</con:status><con:params/><con:element>data</con:element></con:representation><con:representation type="FAULT"><con:mediaType>application/fhir+json; charset=UTF-8</con:mediaType><con:status>404 500 400</con:status><con:params/><con:element xmlns:pat="http://qualification.ihe-europe.net/Patient%2F%24ihe-pix">pat:Fault</con:element></con:representation><con:representation type="RESPONSE"><con:mediaType>application/fhir+json; charset=UTF-8</con:mediaType><con:status>200</con:status><con:params/><con:element xmlns:pat="http://qualification.ihe-europe.net/Patient%2F%24ihe-pix">pat:Response</con:element></con:representation><con:request name="code 200" id="79fc74bf-5277-4aef-8f00-744072264e5e" mediaType="application/json" multiValueDelimiter=","><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers"><xml-fragment/></con:setting><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@remove_empty_content">false</con:setting></con:settings><con:endpoint>http://localhost:8089/</con:endpoint><con:request/><con:originalUri>http://qualification.ihe-europe.net/Patient%2F%24ihe-pix</con:originalUri><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters> <con:entry key="sourceIdentifier" value="urn:oid:1.3.6.1.4.1.21367.2010.1.2.300|NA5404"/> <con:entry key="resource" value="Patient"/> <con:entry key="operation" value="/$ihe-pix"/> @@ -46,33 +46,33 @@ <con:entry key="sourceIdentifier" value="urn:oid:1.3.6.1.4.1.21367.2010.1.2.300|NA5404 "/> <con:entry key="resource" value="Patient"/> <con:entry key="operation" value="/$ihe-pix"/> -</con:parameters><con:parameterOrder><con:entry>resource</con:entry><con:entry>operation</con:entry><con:entry>sourceIdentifier</con:entry><con:entry>targetSystem</con:entry><con:entry>_format</con:entry></con:parameterOrder></con:request></con:method></con:resource></con:interface><con:testSuite id="4008d084-2b9b-4853-90b1-75ae50eda188" name="PixM - Code 200"><con:description>TestSuite generated for REST Service [http://qualification.ihe-europe.net]</con:description><con:settings/><con:runType>SEQUENTIAL</con:runType><con:testCase id="c9b20a8c-efd3-4613-8b00-ed4cbbf5a582" failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="TestCase" searchProperties="true"><con:description>TestCase generated for REST Resource [] located at [/{resource}{operation}]</con:description><con:settings/><con:testStep type="transfer" name="Property Transfer" id="2bbdf78b-4de4-4c6b-b73d-e88fca4f3bd0"><con:settings/><con:config xsi:type="con:PropertyTransfersStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:transfers setNullOnMissingSource="true" transferTextContent="true" failOnError="true" ignoreEmpty="false" transferToAll="false" entitize="false" transferChildNodes="false"><con:name>sourceIdentifier</con:name><con:sourceType>sourceIdentifier</con:sourceType><con:sourceStep>#TestSuite#</con:sourceStep><con:targetType>sourceIdentifier</con:targetType><con:targetStep>code 200</con:targetStep><con:upgraded>true</con:upgraded></con:transfers><con:transfers setNullOnMissingSource="true" transferTextContent="true" failOnError="true" ignoreEmpty="false" transferToAll="false" entitize="false" transferChildNodes="false"><con:name> targetSystem</con:name><con:sourceType>targetSystem</con:sourceType><con:sourceStep>#TestSuite#</con:sourceStep><con:targetType>targetSystem</con:targetType><con:targetStep>code 200</con:targetStep><con:upgraded>true</con:upgraded></con:transfers><con:transfers setNullOnMissingSource="true" transferTextContent="true" failOnError="true" ignoreEmpty="false" transferToAll="false" entitize="false" transferChildNodes="false"><con:name>_format</con:name><con:sourceType>_format</con:sourceType><con:sourceStep>#TestSuite#</con:sourceStep><con:targetType>_format</con:targetType><con:targetStep>code 200</con:targetStep><con:upgraded>true</con:upgraded></con:transfers></con:config></con:testStep><con:testStep type="restrequest" name="code 200" id="92a9dcef-29ec-4d16-a50b-8379860b7234"><con:settings/><con:config service="http://qualification.ihe-europe.net" resourcePath="/{resource}{operation}" methodName="GET from sourceIdentifier" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="code 200" id="79fc74bf-5277-4aef-8f00-744072264e5e" mediaType="application/json" multiValueDelimiter=","><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers"><xml-fragment/></con:setting><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@remove_empty_content">false</con:setting></con:settings><con:endpoint>localhost:8580/pixm_fhir_server/fhir_ihe/</con:endpoint><con:request/><con:originalUri>http://qualification.ihe-europe.net/Patient%2F%24ihe-pix</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="19207097-8fec-4017-89c0-f4ba61af51e4" name="Valid HTTP Status Codes"><con:configuration><codes>200</codes></con:configuration></con:assertion><con:assertion type="GroovyScriptAssertion" id="22513178-52bd-4e7a-9cf0-0e6d2eb7649d" name="Script Assertion"><con:configuration><scriptText>String sourceIdentifier = context.testCase.testSteps['code 200'].getPropertyValue( "sourceIdentifier" ) +</con:parameters><con:parameterOrder><con:entry>resource</con:entry><con:entry>operation</con:entry><con:entry>sourceIdentifier</con:entry><con:entry>targetSystem</con:entry><con:entry>_format</con:entry></con:parameterOrder></con:request></con:method></con:resource></con:interface><con:testSuite id="4008d084-2b9b-4853-90b1-75ae50eda188" name="PixM - Code 200"><con:description>TestSuite generated for REST Service [http://qualification.ihe-europe.net]</con:description><con:settings/><con:runType>SEQUENTIAL</con:runType><con:testCase id="c9b20a8c-efd3-4613-8b00-ed4cbbf5a582" failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="TestCase" searchProperties="true"><con:description>TestCase generated for REST Resource [] located at [/{resource}{operation}]</con:description><con:settings/><con:testStep type="transfer" name="Property Transfer" id="2bbdf78b-4de4-4c6b-b73d-e88fca4f3bd0"><con:settings/><con:config xsi:type="con:PropertyTransfersStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:transfers setNullOnMissingSource="true" transferTextContent="true" failOnError="true" ignoreEmpty="false" transferToAll="false" entitize="false" transferChildNodes="false"><con:name>sourceIdentifier</con:name><con:sourceType>sourceIdentifier</con:sourceType><con:sourceStep>#TestSuite#</con:sourceStep><con:targetType>sourceIdentifier</con:targetType><con:targetStep>code 200</con:targetStep><con:upgraded>true</con:upgraded></con:transfers><con:transfers setNullOnMissingSource="true" transferTextContent="true" failOnError="true" ignoreEmpty="false" transferToAll="false" entitize="false" transferChildNodes="false"><con:name> targetSystem</con:name><con:sourceType>targetSystem</con:sourceType><con:sourceStep>#TestSuite#</con:sourceStep><con:targetType>targetSystem</con:targetType><con:targetStep>code 200</con:targetStep><con:upgraded>true</con:upgraded></con:transfers><con:transfers setNullOnMissingSource="true" transferTextContent="true" failOnError="true" ignoreEmpty="false" transferToAll="false" entitize="false" transferChildNodes="false"><con:name>_format</con:name><con:sourceType>_format</con:sourceType><con:sourceStep>#TestSuite#</con:sourceStep><con:targetType>_format</con:targetType><con:targetStep>code 200</con:targetStep><con:upgraded>true</con:upgraded></con:transfers></con:config></con:testStep><con:testStep type="restrequest" name="code 200" id="92a9dcef-29ec-4d16-a50b-8379860b7234"><con:settings/><con:config service="http://qualification.ihe-europe.net" resourcePath="/{resource}/{operation}" methodName="GET from sourceIdentifier" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="code 200" id="79fc74bf-5277-4aef-8f00-744072264e5e" mediaType="application/json" multiValueDelimiter=","><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers"><xml-fragment/></con:setting><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@remove_empty_content">false</con:setting></con:settings><con:endpoint>localhost:8580/pixm_fhir_server/fhir_ihe/</con:endpoint><con:request/><con:originalUri>http://qualification.ihe-europe.net/Patient%2F%24ihe-pix</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="19207097-8fec-4017-89c0-f4ba61af51e4" name="Valid HTTP Status Codes"><con:configuration><codes>200</codes></con:configuration></con:assertion><con:assertion type="GroovyScriptAssertion" id="22513178-52bd-4e7a-9cf0-0e6d2eb7649d" name="Script Assertion"><con:configuration><scriptText>String sourceIdentifier = context.testCase.testSteps['code 200'].getPropertyValue( "sourceIdentifier" ) log.info sourceIdentifier assert (sourceIdentifier ==~ /urn:oid:([0-9]*)(\.[0-9]*){10}\|([0-9A-Z])*/)</scriptText></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters> <con:entry key="sourceIdentifier" value="urn:oid:1.3.6.1.4.1.21367.2010.1.2.300|NA5404"/> <con:entry key="resource" value="Patient"/> <con:entry key="_format" value="json"/> - <con:entry key="operation" value="/$ihe-pix"/> + <con:entry key="operation" value="$ihe-pix"/> <con:entry key="targetSystem" value="domain1"/> -</con:parameters><con:parameterOrder><con:entry>resource</con:entry><con:entry>operation</con:entry><con:entry>sourceIdentifier</con:entry><con:entry>targetSystem</con:entry><con:entry>_format</con:entry></con:parameterOrder></con:restRequest></con:config></con:testStep><con:properties/></con:testCase><con:properties><con:property><con:name>Endpoint</con:name><con:value> http://localhost:8580/pixm_fhir_server/fhir_ihe</con:value></con:property><con:property><con:name>resource</con:name><con:value>Patient</con:value></con:property><con:property><con:name>operation</con:name><con:value>/$ihe-pix</con:value></con:property><con:property><con:name>sourceIdentifier</con:name><con:value>urn:oid:1.3.6.1.4.1.21367.2010.1.2.300|NA5404</con:value></con:property><con:property><con:name>targetSystem</con:name><con:value>domain1</con:value></con:property><con:property><con:name>_format</con:name><con:value>json</con:value></con:property></con:properties></con:testSuite><con:testSuite id="6de478cb-4400-4297-ae33-55cbde01bbea" name="PixM - Code 400"><con:description>TestSuite generated for REST Service [http://qualification.ihe-europe.net]</con:description><con:settings/><con:runType>SEQUENTIAL</con:runType><con:testCase id="6cb2bee4-3d20-40f6-9b61-c58440ba620c" failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="TestCase" searchProperties="true"><con:description>TestCase generated for REST Resource [] located at [/{resource}{operation}]</con:description><con:settings/><con:testStep type="transfer" name="Property Transfer 400" id="b1f85dac-008d-477c-a678-e7e5b2dd3ff6"><con:settings/><con:config xsi:type="con:PropertyTransfersStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:transfers setNullOnMissingSource="true" transferTextContent="true" failOnError="true" ignoreEmpty="false" transferToAll="false" entitize="false" transferChildNodes="false"><con:name>sourceIdentifier</con:name><con:sourceType>sourceIdentifier</con:sourceType><con:sourceStep>#TestSuite#</con:sourceStep><con:targetType>sourceIdentifier</con:targetType><con:targetStep>code 400</con:targetStep><con:upgraded>true</con:upgraded></con:transfers><con:transfers setNullOnMissingSource="true" transferTextContent="true" failOnError="true" ignoreEmpty="false" transferToAll="false" entitize="false" transferChildNodes="false"><con:name>targetSystem</con:name><con:sourceType>targetSystem</con:sourceType><con:sourceStep>#TestSuite#</con:sourceStep><con:targetType>targetSystem</con:targetType><con:targetStep>code 400</con:targetStep><con:upgraded>true</con:upgraded></con:transfers><con:transfers setNullOnMissingSource="true" transferTextContent="true" failOnError="true" ignoreEmpty="false" transferToAll="false" entitize="false" transferChildNodes="false"><con:name>_format</con:name><con:sourceType>_format</con:sourceType><con:sourceStep>#TestSuite#</con:sourceStep><con:targetType>_format</con:targetType><con:targetStep>code 400</con:targetStep><con:upgraded>true</con:upgraded></con:transfers></con:config></con:testStep><con:testStep type="restrequest" name="code 400" id="ef0eb5bd-cd75-4804-b094-600c16de753f"><con:settings/><con:config service="http://qualification.ihe-europe.net" resourcePath="/{resource}{operation}" methodName="GET from sourceIdentifier" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="code 400" id="79fc74bf-5277-4aef-8f00-744072264e5e" mediaType="application/json" multiValueDelimiter=","><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers"><xml-fragment/></con:setting><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@remove_empty_content">false</con:setting></con:settings><con:endpoint>http://localhost:8089/</con:endpoint><con:request/><con:originalUri>http://qualification.ihe-europe.net/Patient%2F%24ihe-pix</con:originalUri><con:assertion type="GroovyScriptAssertion" id="92a5155f-cd74-43fb-bc66-9402e5fb602c" name="Script Assertion"><con:configuration><scriptText>String sourceIdentifier = context.testCase.testSteps['code 400'].getPropertyValue('sourceIdentifier') +</con:parameters><con:parameterOrder><con:entry>resource</con:entry><con:entry>operation</con:entry><con:entry>sourceIdentifier</con:entry><con:entry>targetSystem</con:entry><con:entry>_format</con:entry></con:parameterOrder></con:restRequest></con:config></con:testStep><con:properties/></con:testCase><con:properties><con:property><con:name>Endpoint</con:name><con:value>http://localhost:8580/pixm_fhir_server/fhir_ihe</con:value></con:property><con:property><con:name>resource</con:name><con:value>Patient</con:value></con:property><con:property><con:name>operation</con:name><con:value>/$ihe-pix</con:value></con:property><con:property><con:name>sourceIdentifier</con:name><con:value>urn:oid:1.3.6.1.4.1.21367.2010.1.2.300|NA5404</con:value></con:property><con:property><con:name>targetSystem</con:name><con:value>domain1</con:value></con:property><con:property><con:name>_format</con:name><con:value>json</con:value></con:property></con:properties></con:testSuite><con:testSuite id="6de478cb-4400-4297-ae33-55cbde01bbea" name="PixM - Code 400"><con:description>TestSuite generated for REST Service [http://qualification.ihe-europe.net]</con:description><con:settings/><con:runType>SEQUENTIAL</con:runType><con:testCase id="6cb2bee4-3d20-40f6-9b61-c58440ba620c" failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="TestCase" searchProperties="true"><con:description>TestCase generated for REST Resource [] located at [/{resource}{operation}]</con:description><con:settings/><con:testStep type="transfer" name="Property Transfer 400" id="b1f85dac-008d-477c-a678-e7e5b2dd3ff6"><con:settings/><con:config xsi:type="con:PropertyTransfersStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:transfers setNullOnMissingSource="true" transferTextContent="true" failOnError="true" ignoreEmpty="false" transferToAll="false" entitize="false" transferChildNodes="false"><con:name>sourceIdentifier</con:name><con:sourceType>sourceIdentifier</con:sourceType><con:sourceStep>#TestSuite#</con:sourceStep><con:targetType>sourceIdentifier</con:targetType><con:targetStep>code 400</con:targetStep><con:upgraded>true</con:upgraded></con:transfers><con:transfers setNullOnMissingSource="true" transferTextContent="true" failOnError="true" ignoreEmpty="false" transferToAll="false" entitize="false" transferChildNodes="false"><con:name>targetSystem</con:name><con:sourceType>targetSystem</con:sourceType><con:sourceStep>#TestSuite#</con:sourceStep><con:targetType>targetSystem</con:targetType><con:targetStep>code 400</con:targetStep><con:upgraded>true</con:upgraded></con:transfers><con:transfers setNullOnMissingSource="true" transferTextContent="true" failOnError="true" ignoreEmpty="false" transferToAll="false" entitize="false" transferChildNodes="false"><con:name>_format</con:name><con:sourceType>_format</con:sourceType><con:sourceStep>#TestSuite#</con:sourceStep><con:targetType>_format</con:targetType><con:targetStep>code 400</con:targetStep><con:upgraded>true</con:upgraded></con:transfers></con:config></con:testStep><con:testStep type="restrequest" name="code 400" id="ef0eb5bd-cd75-4804-b094-600c16de753f"><con:settings/><con:config service="http://qualification.ihe-europe.net" resourcePath="/{resource}/{operation}" methodName="GET from sourceIdentifier" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="code 400" id="79fc74bf-5277-4aef-8f00-744072264e5e" mediaType="application/json" multiValueDelimiter=","><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers"><xml-fragment/></con:setting><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@remove_empty_content">false</con:setting></con:settings><con:endpoint>http://localhost:8580/pixm_fhir_server/fhir_ihe</con:endpoint><con:request/><con:originalUri>http://qualification.ihe-europe.net/Patient%2F%24ihe-pix</con:originalUri><con:assertion type="GroovyScriptAssertion" id="92a5155f-cd74-43fb-bc66-9402e5fb602c" name="Script Assertion"><con:configuration><scriptText>String sourceIdentifier = context.testCase.testSteps['code 400'].getPropertyValue('sourceIdentifier') assert !(sourceIdentifier ==~ /urn:oid:([0-9]*)(\.[0-9]*){10}\|([0-9A-Z])*/)</scriptText></con:configuration></con:assertion><con:assertion type="Valid HTTP Status Codes" id="1661d742-bcb2-4e22-ae22-deb68f175e4b" name="Valid HTTP Status Codes"><con:configuration><codes>400</codes></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters> - <con:entry key="sourceIdentifier" value="urn:oid:1.3.6.1.4.1.21367.2010.1.2|NA5404"/> + <con:entry key="sourceIdentifier" value="urn:oid:1.3.6.1.4.1.21367.13.20.3000%7CIHEBLUE-998"/> <con:entry key="resource" value="Patient"/> <con:entry key="_format" value="json"/> <con:entry key="operation" value="/$ihe-pix"/> <con:entry key="targetSystem" value="domain1"/> -</con:parameters><con:parameterOrder><con:entry>resource</con:entry><con:entry>operation</con:entry><con:entry>sourceIdentifier</con:entry><con:entry>targetSystem</con:entry><con:entry>_format</con:entry></con:parameterOrder></con:restRequest></con:config></con:testStep><con:properties/></con:testCase><con:properties><con:property><con:name>Endpoint</con:name><con:value>http://localhost:8089</con:value></con:property><con:property><con:name>resource</con:name><con:value>Patient</con:value></con:property><con:property><con:name>operation</con:name><con:value>/$ihe-pix</con:value></con:property><con:property><con:name>sourceIdentifier</con:name><con:value>urn:oid:1.3.6.1.4.1.21367.2010.1.2|NA5404</con:value></con:property><con:property><con:name>targetSystem</con:name><con:value>domain1</con:value></con:property><con:property><con:name>_format</con:name><con:value>json</con:value></con:property></con:properties></con:testSuite><con:testSuite id="d5f31f17-d59f-4cbd-9107-44cc8015c0e0" name="PixM - Code 403"><con:description>TestSuite generated for REST Service [http://qualification.ihe-europe.net]</con:description><con:settings/><con:runType>SEQUENTIAL</con:runType><con:testCase id="206c3c04-8afe-4947-83f6-24ad0976216d" failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="TestCase" searchProperties="true"><con:description>TestCase generated for REST Resource [] located at [/{resource}{operation}]</con:description><con:settings/><con:testStep type="transfer" name="Property Transfer 403" id="f7a14909-71cf-4e8c-a2c9-6cf571a0b533"><con:settings/><con:config xsi:type="con:PropertyTransfersStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:transfers setNullOnMissingSource="true" transferTextContent="true" failOnError="true" ignoreEmpty="false" transferToAll="false" entitize="false" transferChildNodes="false"><con:name>sourceIdentifier</con:name><con:sourceType>sourceIdentifier</con:sourceType><con:sourceStep>#TestSuite#</con:sourceStep><con:targetType>sourceIdentifier</con:targetType><con:targetStep>code 403</con:targetStep><con:upgraded>true</con:upgraded></con:transfers><con:transfers setNullOnMissingSource="true" transferTextContent="true" failOnError="true" ignoreEmpty="false" transferToAll="false" entitize="false" transferChildNodes="false"><con:name>targetSystem</con:name><con:sourceType>targetSystem</con:sourceType><con:sourceStep>#TestSuite#</con:sourceStep><con:targetType>targetSystem</con:targetType><con:targetStep>code 403</con:targetStep><con:upgraded>true</con:upgraded></con:transfers><con:transfers setNullOnMissingSource="true" transferTextContent="true" failOnError="true" ignoreEmpty="false" transferToAll="false" entitize="false" transferChildNodes="false"><con:name>_format</con:name><con:sourceType>_format</con:sourceType><con:sourceStep>#TestSuite#</con:sourceStep><con:targetType>_format</con:targetType><con:targetStep>code 403</con:targetStep><con:upgraded>true</con:upgraded></con:transfers></con:config></con:testStep><con:testStep type="restrequest" name="code 403" id="b2d62938-5129-4372-ba8a-75d5e518f30f"><con:settings/><con:config service="http://qualification.ihe-europe.net" resourcePath="/{resource}{operation}" methodName="GET from sourceIdentifier" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="code 403" id="79fc74bf-5277-4aef-8f00-744072264e5e" mediaType="application/json" multiValueDelimiter=","><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers"><xml-fragment/></con:setting><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@remove_empty_content">false</con:setting></con:settings><con:endpoint>http://localhost:8089/</con:endpoint><con:request/><con:originalUri>http://qualification.ihe-europe.net/Patient%2F%24ihe-pix</con:originalUri><con:assertion type="GroovyScriptAssertion" id="9b29c838-e6b9-4627-adb1-5c5f7fb1adae" name="Script Assertion"><con:configuration><scriptText>String sourceIdentifier = context.testCase.testSteps['code 403'].getPropertyValue('sourceIdentifier') +</con:parameters><con:parameterOrder><con:entry>resource</con:entry><con:entry>operation</con:entry><con:entry>sourceIdentifier</con:entry><con:entry>targetSystem</con:entry><con:entry>_format</con:entry></con:parameterOrder></con:restRequest></con:config></con:testStep><con:properties/></con:testCase><con:properties><con:property><con:name>Endpoint</con:name><con:value>http://localhost:8089</con:value></con:property><con:property><con:name>resource</con:name><con:value>Patient</con:value></con:property><con:property><con:name>operation</con:name><con:value>/$ihe-pix</con:value></con:property><con:property><con:name>sourceIdentifier</con:name><con:value>urn:oid:1.3.6.1.4.1.21367.2010.1.2|NA5404</con:value></con:property><con:property><con:name>targetSystem</con:name><con:value>domain1</con:value></con:property><con:property><con:name>_format</con:name><con:value>json</con:value></con:property></con:properties></con:testSuite><con:testSuite id="d5f31f17-d59f-4cbd-9107-44cc8015c0e0" name="PixM - Code 403"><con:description>TestSuite generated for REST Service [http://qualification.ihe-europe.net]</con:description><con:settings/><con:runType>SEQUENTIAL</con:runType><con:testCase id="206c3c04-8afe-4947-83f6-24ad0976216d" failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="TestCase" searchProperties="true"><con:description>TestCase generated for REST Resource [] located at [/{resource}{operation}]</con:description><con:settings/><con:testStep type="transfer" name="Property Transfer 403" id="f7a14909-71cf-4e8c-a2c9-6cf571a0b533"><con:settings/><con:config xsi:type="con:PropertyTransfersStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:transfers setNullOnMissingSource="true" transferTextContent="true" failOnError="true" ignoreEmpty="false" transferToAll="false" entitize="false" transferChildNodes="false"><con:name>sourceIdentifier</con:name><con:sourceType>sourceIdentifier</con:sourceType><con:sourceStep>#TestSuite#</con:sourceStep><con:targetType>sourceIdentifier</con:targetType><con:targetStep>code 403</con:targetStep><con:upgraded>true</con:upgraded></con:transfers><con:transfers setNullOnMissingSource="true" transferTextContent="true" failOnError="true" ignoreEmpty="false" transferToAll="false" entitize="false" transferChildNodes="false"><con:name>targetSystem</con:name><con:sourceType>targetSystem</con:sourceType><con:sourceStep>#TestSuite#</con:sourceStep><con:targetType>targetSystem</con:targetType><con:targetStep>code 403</con:targetStep><con:upgraded>true</con:upgraded></con:transfers><con:transfers setNullOnMissingSource="true" transferTextContent="true" failOnError="true" ignoreEmpty="false" transferToAll="false" entitize="false" transferChildNodes="false"><con:name>_format</con:name><con:sourceType>_format</con:sourceType><con:sourceStep>#TestSuite#</con:sourceStep><con:targetType>_format</con:targetType><con:targetStep>code 403</con:targetStep><con:upgraded>true</con:upgraded></con:transfers></con:config></con:testStep><con:testStep type="restrequest" name="code 403" id="b2d62938-5129-4372-ba8a-75d5e518f30f"><con:settings/><con:config service="http://qualification.ihe-europe.net" resourcePath="/{resource}/{operation}" methodName="GET from sourceIdentifier" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="code 403" id="79fc74bf-5277-4aef-8f00-744072264e5e" mediaType="application/json" multiValueDelimiter=","><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers"><xml-fragment/></con:setting><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@remove_empty_content">false</con:setting></con:settings><con:endpoint>http://localhost:8089/</con:endpoint><con:request/><con:originalUri>http://qualification.ihe-europe.net/Patient%2F%24ihe-pix</con:originalUri><con:assertion type="GroovyScriptAssertion" id="9b29c838-e6b9-4627-adb1-5c5f7fb1adae" name="Script Assertion"><con:configuration><scriptText>String sourceIdentifier = context.testCase.testSteps['code 403'].getPropertyValue('sourceIdentifier') assert (sourceIdentifier ==~ /urn:oid:([0-9]*)(\.[0-9]*){10}\|([0-9A-Z])*/)</scriptText></con:configuration></con:assertion><con:assertion type="Valid HTTP Status Codes" id="c04ae33e-63c1-47e3-aae2-a8bf46f30048" name="Valid HTTP Status Codes"><con:configuration><codes>403</codes></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters> <con:entry key="sourceIdentifier" value="urn:oid:1.3.6.1.4.1.21367.2010.1.2.300|NA5404"/> <con:entry key="resource" value="Patient"/> <con:entry key="_format" value="json"/> <con:entry key="operation" value="/$ihe-pix"/> <con:entry key="targetSystem" value="domain4"/> -</con:parameters><con:parameterOrder><con:entry>resource</con:entry><con:entry>operation</con:entry><con:entry>sourceIdentifier</con:entry><con:entry>targetSystem</con:entry><con:entry>_format</con:entry></con:parameterOrder></con:restRequest></con:config></con:testStep><con:properties/></con:testCase><con:properties><con:property><con:name>Endpoint</con:name><con:value>http://localhost:8089</con:value></con:property><con:property><con:name>resource</con:name><con:value>Patient</con:value></con:property><con:property><con:name>operation</con:name><con:value>/$ihe-pix</con:value></con:property><con:property><con:name>sourceIdentifier</con:name><con:value>urn:oid:1.3.6.1.4.1.21367.2010.1.2.300|NA5404</con:value></con:property><con:property><con:name>targetSystem</con:name><con:value>domain4</con:value></con:property><con:property><con:name>_format</con:name><con:value>json</con:value></con:property></con:properties></con:testSuite><con:testSuite id="b6325bf6-8648-4734-be8b-d30dfd6319c7" name="PixM - Code 404"><con:description>TestSuite generated for REST Service [http://qualification.ihe-europe.net]</con:description><con:settings/><con:runType>SEQUENTIAL</con:runType><con:testCase id="8c2a2ef4-00d7-4f85-8138-93863d113c1e" failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="TestCase" searchProperties="true"><con:description>TestCase generated for REST Resource [] located at [/{resource}{operation}]</con:description><con:settings/><con:testStep type="transfer" name="Property Transfer 404" id="3939b84b-910b-4e9a-9632-ff0e1474a2f4"><con:settings/><con:config xsi:type="con:PropertyTransfersStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:transfers setNullOnMissingSource="true" transferTextContent="true" failOnError="true" ignoreEmpty="false" transferToAll="false" entitize="false" transferChildNodes="false"><con:name>sourceIdentifier</con:name><con:sourceType>sourceIdentifier</con:sourceType><con:sourceStep>#TestSuite#</con:sourceStep><con:targetType>sourceIdentifier</con:targetType><con:targetStep>code 404</con:targetStep><con:upgraded>true</con:upgraded></con:transfers><con:transfers setNullOnMissingSource="true" transferTextContent="true" failOnError="true" ignoreEmpty="false" transferToAll="false" entitize="false" transferChildNodes="false"><con:name>targetSystem</con:name><con:sourceType>targetSystem</con:sourceType><con:sourceStep>#TestSuite#</con:sourceStep><con:targetType>targetSystem</con:targetType><con:targetStep>code 404</con:targetStep><con:upgraded>true</con:upgraded></con:transfers><con:transfers setNullOnMissingSource="true" transferTextContent="true" failOnError="true" ignoreEmpty="false" transferToAll="false" entitize="false" transferChildNodes="false"><con:name>_format</con:name><con:sourceType>_format</con:sourceType><con:sourceStep>#TestSuite#</con:sourceStep><con:targetType>_format</con:targetType><con:targetStep>code 404</con:targetStep><con:upgraded>true</con:upgraded></con:transfers></con:config></con:testStep><con:testStep type="restrequest" name="code 404" id="e13bc6cd-1799-4521-8fe1-639565d1affe"><con:settings/><con:config service="http://qualification.ihe-europe.net" resourcePath="/{resource}{operation}" methodName="GET from sourceIdentifier" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="code 404" id="79fc74bf-5277-4aef-8f00-744072264e5e" mediaType="application/json" multiValueDelimiter=","><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers"><xml-fragment/></con:setting><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@remove_empty_content">false</con:setting></con:settings><con:endpoint>http://localhost:8089/</con:endpoint><con:request/><con:originalUri>http://qualification.ihe-europe.net/Patient%2F%24ihe-pix</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="5e3da6e1-9f94-48f1-af24-f9ee0ca899cc" name="Valid HTTP Status Codes"><con:configuration><codes>404</codes></con:configuration></con:assertion><con:assertion type="GroovyScriptAssertion" id="42c5b179-978b-4d0d-a279-fbb44cd81f41" name="Script Assertion"><con:configuration><scriptText>String sourceIdentifier = context.testCase.testSteps['code 404'].getPropertyValue('sourceIdentifier') +</con:parameters><con:parameterOrder><con:entry>resource</con:entry><con:entry>operation</con:entry><con:entry>sourceIdentifier</con:entry><con:entry>targetSystem</con:entry><con:entry>_format</con:entry></con:parameterOrder></con:restRequest></con:config></con:testStep><con:properties/></con:testCase><con:properties><con:property><con:name>Endpoint</con:name><con:value>http://localhost:8089</con:value></con:property><con:property><con:name>resource</con:name><con:value>Patient</con:value></con:property><con:property><con:name>operation</con:name><con:value>/$ihe-pix</con:value></con:property><con:property><con:name>sourceIdentifier</con:name><con:value>urn:oid:1.3.6.1.4.1.21367.2010.1.2.300|NA5404</con:value></con:property><con:property><con:name>targetSystem</con:name><con:value>domain4</con:value></con:property><con:property><con:name>_format</con:name><con:value>json</con:value></con:property></con:properties></con:testSuite><con:testSuite id="b6325bf6-8648-4734-be8b-d30dfd6319c7" name="PixM - Code 404"><con:description>TestSuite generated for REST Service [http://qualification.ihe-europe.net]</con:description><con:settings/><con:runType>SEQUENTIAL</con:runType><con:testCase id="8c2a2ef4-00d7-4f85-8138-93863d113c1e" failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="TestCase" searchProperties="true"><con:description>TestCase generated for REST Resource [] located at [/{resource}{operation}]</con:description><con:settings/><con:testStep type="transfer" name="Property Transfer 404" id="3939b84b-910b-4e9a-9632-ff0e1474a2f4"><con:settings/><con:config xsi:type="con:PropertyTransfersStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:transfers setNullOnMissingSource="true" transferTextContent="true" failOnError="true" ignoreEmpty="false" transferToAll="false" entitize="false" transferChildNodes="false"><con:name>sourceIdentifier</con:name><con:sourceType>sourceIdentifier</con:sourceType><con:sourceStep>#TestSuite#</con:sourceStep><con:targetType>sourceIdentifier</con:targetType><con:targetStep>code 404</con:targetStep><con:upgraded>true</con:upgraded></con:transfers><con:transfers setNullOnMissingSource="true" transferTextContent="true" failOnError="true" ignoreEmpty="false" transferToAll="false" entitize="false" transferChildNodes="false"><con:name>targetSystem</con:name><con:sourceType>targetSystem</con:sourceType><con:sourceStep>#TestSuite#</con:sourceStep><con:targetType>targetSystem</con:targetType><con:targetStep>code 404</con:targetStep><con:upgraded>true</con:upgraded></con:transfers><con:transfers setNullOnMissingSource="true" transferTextContent="true" failOnError="true" ignoreEmpty="false" transferToAll="false" entitize="false" transferChildNodes="false"><con:name>_format</con:name><con:sourceType>_format</con:sourceType><con:sourceStep>#TestSuite#</con:sourceStep><con:targetType>_format</con:targetType><con:targetStep>code 404</con:targetStep><con:upgraded>true</con:upgraded></con:transfers></con:config></con:testStep><con:testStep type="restrequest" name="code 404" id="e13bc6cd-1799-4521-8fe1-639565d1affe"><con:settings/><con:config service="http://qualification.ihe-europe.net" resourcePath="/{resource}/{operation}" methodName="GET from sourceIdentifier" xsi:type="con:RestRequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:restRequest name="code 404" id="79fc74bf-5277-4aef-8f00-744072264e5e" mediaType="application/json" multiValueDelimiter=","><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers"><xml-fragment/></con:setting><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@remove_empty_content">false</con:setting></con:settings><con:endpoint>http://qualification.ihe-europe.net/pixm_fhir_server/fhir_ihe</con:endpoint><con:request/><con:originalUri>http://qualification.ihe-europe.net/Patient%2F%24ihe-pix</con:originalUri><con:assertion type="Valid HTTP Status Codes" id="5e3da6e1-9f94-48f1-af24-f9ee0ca899cc" name="Valid HTTP Status Codes"><con:configuration><codes>404</codes></con:configuration></con:assertion><con:assertion type="GroovyScriptAssertion" id="42c5b179-978b-4d0d-a279-fbb44cd81f41" name="Script Assertion"><con:configuration><scriptText>String sourceIdentifier = context.testCase.testSteps['code 404'].getPropertyValue('sourceIdentifier') assert (sourceIdentifier ==~ /urn:oid:([0-9]*)(\.[0-9]*){10}\|([0-9A-Z])*/)</scriptText></con:configuration></con:assertion><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:parameters> - <con:entry key="sourceIdentifier" value="urn:oid:1.3.6.1.4.1.21367.2010.1.2.301|NA5404"/> + <con:entry key="sourceIdentifier" value=" "/> <con:entry key="resource" value="Patient"/> <con:entry key="_format" value="json"/> - <con:entry key="operation" value="/$ihe-pix"/> + <con:entry key="operation" value="$ihe-pix"/> <con:entry key="targetSystem" value="domain1"/> </con:parameters><con:parameterOrder><con:entry>resource</con:entry><con:entry>operation</con:entry><con:entry>sourceIdentifier</con:entry><con:entry>targetSystem</con:entry><con:entry>_format</con:entry></con:parameterOrder></con:restRequest></con:config></con:testStep><con:properties/></con:testCase><con:properties><con:property><con:name>Endpoint</con:name><con:value>http://localhost:8089</con:value></con:property><con:property><con:name>resource</con:name><con:value>Patient</con:value></con:property><con:property><con:name>operation</con:name><con:value>/$ihe-pix</con:value></con:property><con:property><con:name>sourceIdentifier</con:name><con:value>urn:oid:1.3.6.1.4.1.21367.2010.1.2.301|NA5404</con:value></con:property><con:property><con:name>targetSystem</con:name><con:value>domain1</con:value></con:property><con:property><con:name>_format</con:name><con:value>json</con:value></con:property></con:properties></con:testSuite><con:properties><con:property><con:name>resource</con:name><con:value>Patient</con:value></con:property><con:property><con:name>operation</con:name><con:value>/$ihe-pix</con:value></con:property></con:properties><con:wssContainer/><con:oAuth2ProfileContainer/><con:oAuth1ProfileContainer/><con:sensitiveInformation/></con:soapui-project> \ No newline at end of file diff --git a/src/test/java/net/ihe/gazelle/provider/ProviderTestClass.java b/src/test/java/net/ihe/gazelle/provider/ProviderTestClass.java index 2442f611b4a53140310708b89c0250b9ce47d0a2..68cf22fa0c27a157f73d3cb075b12179bd1ca051 100644 --- a/src/test/java/net/ihe/gazelle/provider/ProviderTestClass.java +++ b/src/test/java/net/ihe/gazelle/provider/ProviderTestClass.java @@ -1,39 +1,36 @@ package net.ihe.gazelle.provider; +import net.ihe.gazelle.business.provider.IhePatientResourceProvider; +import net.ihe.gazelle.business.provider.PatientResourceProviderException; import org.hl7.fhir.r4.model.IdType; -import org.hl7.fhir.r4.model.Patient; -import org.hl7.fhir.r4.model.StringType; import org.junit.Assert; import org.junit.jupiter.api.Test; -import ca.uhn.fhir.rest.api.MethodOutcome; import ca.uhn.fhir.rest.param.StringAndListParam; import ca.uhn.fhir.rest.param.StringOrListParam; import ca.uhn.fhir.rest.param.StringParam; import ca.uhn.fhir.rest.param.TokenParam; import ca.uhn.fhir.rest.server.exceptions.ForbiddenOperationException; -import net.ihe.gazelle.provider.IhePatientResourceProvider; -import net.ihe.gazelle.provider.PatientResourceProviderException; public class ProviderTestClass { public static final IhePatientResourceProvider provider = new IhePatientResourceProvider(); - @Test - public void createPatientTest() { - Patient pat = new Patient(); - MethodOutcome ret = provider.createPatient(pat); - Assert.assertNotNull(ret); - } - +// @Test +// public void createPatientTest() { +// Patient pat = new Patient(); +// MethodOutcome ret = provider.createPatient(pat); +// Assert.assertNotNull(ret); +// } - @Test - public void findPatientsByNameTest() { - StringType param = new StringType("WALTERS"); - Assert.assertNotNull(provider.findPatientsByName(param)); - } +// @Test +// public void findPatientsByNameTest() { +// StringType param = new StringType("WALTERS"); +// Assert.assertNotNull(provider.findPatientsByName(param)); +// } +// @Test public void findPatientsByIdentifierTest() { TokenParam sourceIdentifier = new TokenParam(); @@ -60,14 +57,14 @@ public class ProviderTestClass { Assert.assertNotNull(provider.findPatientsUsingArbitraryCriteria()); } - @Test - public void readPatientTest() { - IdType param = new IdType(); - param.setId("3"); - - Assert.assertNotNull(provider.readPatient(param)); - } - +// @Test +// public void readPatientTest() { +// IdType param = new IdType(); +// param.setId("3"); +// +// Assert.assertNotNull(provider.readPatient(param)); +// } +// @Test public void updatePatientTest() { IdType idParam = new IdType();