TestSuite description GetLaboratoryOrderOutcome

This testsuite is designed to verify the GetLaboratoryOrderOutcome contract prior to integration with the national platform.

Global variables used
  • webServiceUrl

Tools

SoapUI

The testsuite uses SoapUI to verify the implementation. Documentation of SoapUI can be found at http://www.soapui.org
Link to download site: http://sourceforge.net/projects/soapui/files/soapui/
Install SoapUI according to the documentation.

Setup instructions

  1. Locate the test-suite/[contractName]-directory in your distribution.
  2. Copy the jar-file ‘soapui-support.jar’ to <SoapUI install dir>/bin/ext
  3. Open SoapUI and import the SoapUI project from the above directory, choose ‘Import Project’ from the File-menu.
  4. If your WebService endpoint requires a SSL Certificate, this can be configured from the Preferences (in the File menu). In the Preferences window open the ‘SSL Settings’ tab and import the Keystore containing the Client Certificate.
  5. Update test-data in data.xml to match the contents in your system.
  6. You should now be able to run the test suite!

Testcases

BasicTestcase

Verifies that the response is schema- and schematron- valid and contains data for the requested patient only.
The only requirement on test data is that there is some data for the given patientId. It might be a good idea to start by executing this testcase for a patient with a very simple response and when that works switch to a patient with more complex data.

Variables used
  • httpHeaderHsaId
  • logicalAddress
  • patientId
  • patientIdType

DateBoundaries

Verifies that the result only contains information within the date boundaries for the given patient. The rule is

"Begränsning av sökningen i tid. Begränsningen sker genom att resultatet innehåller de poster vars, av förekommande tidfält analys/analysisTime , bildade tidsintervall till någon del överlappar med det tidsintervall som anges i begäran. Ändpunkterna inkluderas i respektive intervall."

Additional information about failed assertions can be found in the script log. The LaboratoryOutcome-elements below are recommended for the test, but you may skip those that are not applicable, e.g if the tested system does not support start AND end time. You may also supply several elements of the same type, e.g. to test dates exactly on the boundary.

  1. Record-1: A laboratoryOutcome with an Analysis where AnalysisTime is within the given range.
  2. Record-2: A laboratoryOutcome with an Analysis where AnalysisTime is before the given range.
  3. Record-3: A laboratoryOutcome with an Analysis where AnalysisTime is after the given range.
  4. Record-4: A laboratoryOutcome with two Analysis where one AnalysisTime is outside of the given range and one is within given range.
  5. Record-5: A laboratoryOutcome without any Analysis.
The expected DocumentId's, case 1 and 4 above, must be added as a comma-separated list in the expectedDocumentIds field.
The unexpected DocumentId's, case 2,3 and 5 above, must be added as a comma-separated list in the unexpectedDocumentIds field.
The fields httpHeaderHsaId and logicalAddress must contain values that do not limit the response.

Variables used
  • httpHeaderHsaId
  • logicalAddress
  • patientId
  • patientIdType
  • timePeriodStart
  • timePeriodEnd
  • timeBeforeGivenRange
  • timeAfterGivenRange
  • timeWithinGivenRange
  • expectedDocumentIds
  • unexpectedDocumentIds

CareContactIdFilter

Verifies that the result only contains information for a single CareContactId.
Enter a PatientId, CareContactId and sourceSystemHSAid that exist in the source system.
The fields httpHeaderHsaId and logicalAddress must contain values that do not affect the returned list.

Variables used
  • httpHeaderHsaId
  • logicalAddress
  • patientId
  • patientIdType
  • careContactId
  • sourceSystemHSAId
  • expectedDocumentIds

CareUnitIdFilter

Verifies that the result only contains information for the requested CareUnitIds.
Enter a PatientId and CareUnitId that exist in the source system.
The fields httpHeaderHsaId and logicalAddress must contain values that do not affect the returned list.

Variables used
  • httpHeaderHsaId
  • logicalAddress
  • patientId
  • patientIdType
  • careUnitId
  • expectedDocumentIds

NonExistentPatientId

Verifies that the service returns an empty result instead of a Soap Fault if a nonexistent PatientId is given.
Enter a PatientId that is not found in the source system and valid values for httpHeaderHsaId and logical adress.

Variables used
  • httpHeaderHsaId
  • logicalAddress
  • patientId
  • patientIdType

NonExistentCareContactId

Verifies that the service returns an empty result instead of a Soap Fault if a nonexistent CareContactId is given.
Enter a PatientId that exists in the source system and a CareContactId and sourceSystemHSAid that is not found in the source system.
The fields httpHeaderHsaId and logicalAddress must contain values that do not affect the returned list.

Variables used
  • httpHeaderHsaId
  • logicalAddress
  • patientId
  • patientIdType
  • careContactId
  • sourceSystemHSAId

HttpHeaderFilter

Verifies that the result only contains information with correct PatientId, and that the source system filters returned data based on the HttpHeader 'x-rivta-original-serviceconsumer-hsaid'.
This testcase can be recorded as not applicable if this kind of filtering does not take place in the tested system.
Enter a PatientId that has more than one LaboratoryorderOutcome-record in the source system.
Add one or more CareUnitIds that must be included in the response based on the filtering rules to the field 'expectedCareUnitIds'.
Add one or more CareUnitIds of records that must not be included in the response based on the filtering rules to the field 'unexpectedCareUnitIds'.
The field logicalAddress must contain a value that does not affect the list.

Variables used
  • httpHeaderHsaId
  • logicalAddress
  • patientId
  • patientIdType
  • expectedCareUnitIds
  • unexpectedCareUnitIds

CareContactIdWithoutSourceSystemHSAId

The test verifies that the source system returns a Soap Fault if careContactId has a value and sourceSystemHSAid is empty or not supplied.
Enter a PatientId/CareContactId-combination that exists in the source system and valid values for httpHeaderHsaId and logicalAddress.

Variables used
  • httpHeaderHsaId
  • logicalAddress
  • patientId
  • patientIdType
  • careContactId

SourceSystemHSAIdAndLogicalAddress

The test verifies that the source system returns a Soap Fault if the logicalAddress and sourceSystemHSAId are not the same.
Enter PatientId and a CareContactId and the correct SourceSystemHSAId of a CareContact that is found in the source system.
The field logicalAddress must NOT match SourceSystemHSAid.
The field httpHeaderHsaId must contain a valid value.

Variables used
  • httpHeaderHsaId
  • logicalAddress
  • careUnitHSAid
  • patientId
  • patientIdType
  • careContactId
  • sourceSystemHSAId