Details
-
Type: Task
-
Status: Resolved
-
Priority: High
-
Resolution: Cancelled
-
Affects Version/s: None
-
Fix Version/s: PIXmConnector 2.0.1
-
Component/s: None
-
Labels:
-
Sprint:
-
Account:eHealth Suisse 2021 - OP3 - Extensions (EHSUISSE2021OP3)
-
Epic Link:
-
Program Increment:PI-54
-
Targeted team:Development
-
Teams:
Description
User Task :
The aim is to implement the @Merge method in a new provider.
###########################################################################
The parameters :
Bundle type ITI-93 ( see example attached below) :
MessageHeader : shall contains
eventUri [1..1]: urn:ihe:iti:pmir:2019:patient-feed
focus [1..1]: shall reference the url of Bundle
sourceEndpoint [1..1]: Actual message source address or id.
destination [1..*] : The destination(s) of this feed.
Bundle
type [1..1] : should be History
entry [1..*] : the same Patient Resource shall not appear twice in this Bundle
entry.request.method [1..1] : POST | PUT | DELETE
entry.request.url [1..1] : The URL for this entry, relative to the root (the address to which the request is posted).
entry.response.status [1..1] : The response status shall be an HTTP response status of 200
When a merge is needed, the Patient Resource to be deprecated shall be included in the history
Bundle and shall be constrained as this :
entry.resource.active : false
entry.resource.link.type : replaced-by
entry.resource.link.other : Shall be a reference to the surviving Patient Resource
entry.request.method : PUT
Example of url :
http://yourServer.com/fhir/Patient?formerSourceIdentifier={systemId}|{patientid}&newSourceIdentifier={systemId}|{patientid}
###########################################################################
Error :
400 Bad Request - resource could not be parsed or failed basic FHIR validation rules (or multiple matches were found for conditional criteria)
404 Not Found - resource type not supported, or not a FHIR end-point
405 Method Not allowed - the resource did not exist prior to the update, and the server does not allow client defined ids
422 Unprocessable Entity - the proposed resource violated applicable FHIR profiles or server business rules
############################################################################
The response :
Bundle :
The patient Endpoint : http://yourServer.com/Fhir/Patient?sourceIdentifier={system|value}
############################################################################
AcceptanceCriteria :
- a Patient Identifier is mandatory [1..*]
- On the GWT, I can choose a project {projectName} and select the Merge Test Suite and modify : the endpoint, the formerSourceIdentifier I want to deprecate, the newSourceIdentifier I want for my Patient.
- 200 status is returned if the patient is merged
- 400 status is returned if I provided malformed Bundle Json
- 404 status is returned if I provided well-formed sourceIdentifier but not exist in PatReg
- 405 status is returned if I provide a sourceIdentifier for a deactivated patient
- 422 status is returned if I provide a malformed sourceIdentifier
###########################################################################
Technical Analysis :
- Create a converter between an ITI-93 type Bundle and a PatientAliases for Patient Registry.
- Add a PatientRegistryClient class with a merge method to handle the Patient Registry API and thrown errors.
- Add a method in PatientResourceProvider to call the client with the merge method.
- Create a method to convert the Patient Aliases returned from PatientRegistry into the expected bundle.
- Mock classes and TUs
###########################################################################
Tests :
As a USER I can :
1 - Go on https://qualification.ihe-europe.net/gazelle-webservice-tester/home.seam
2 - Log in CAS to have the privilegie to perform tests
3 - Go to "Executer" tab and choose the project "CH:ITI-93" (temporary name)
4 - Select the TestSuite "Merge" and select one of the TestCase presented :
- "Test case 200" if I provide
endpoint : http://example.com/fhir/Patient
formerSourceIdentifier : {sourceIdentifer1} (well formed & exists)
newSourceIdentifier : {sourceDIentifier2} (well formed & exists)
And click on Validate, GWT redirect me on "Resultat execution" and having a Statut Global "Passed"
I should except a 200 code HTTP and a message response described as below with the merged Patient
- "Test case 400" if I provide
endpoint : http://example.com/fhir/Patient
formerSourceIdentifier : {sourceIdentifer1} (well formed & exists)
newSourceIdentifier : {sourceDIentifier2} (well formed & exists)
And click on Validate, GWT redirect me on "Resultat execution" and having a Statut Global "Passed" (the body will be not well formed)
I should except a 400 code HTTP and a message " Body is malformed "
- "Test case 404" if I provide
endpoint : http://example.com/fhir/Patient
formerSourceIdentifier : {sourceIdentifer1} ( well-formed & NOT exist)
newSourceIdentifier : {sourceDIentifier2} (well-formed & exists)
And click on Validate, GWT redirect me on "Resultat execution" and having a Statut Global "Passed"
I should except a 404 code HTTP and a message "formerSourceIdentifier not exists"
- "Test case 404" if I provide
endpoint : http://example.com/fhir/Patient
formerSourceIdentifier : {sourceIdentifer1} (well-formed & exists)
newSourceIdentifier : {sourceIdentifier2} ( well-formed & NOT exist)
And click on Validate, GWT redirect me on "Resultat execution" and having a Statut Global "Passed"
I should except a 404 code HTTP and a message "newSourceIdentifier not exists"
- "Test case 405" if I provide
endpoint : http://example.com/fhir/Patient
formerSourceIdentifier : {sourceIdentifer1} (deactivated)
newSourceIdentifier : {sourceDIentifier2}
And click on Validate, GWT redirect me on "Resultat execution" and having a Statut Global "Passed"
I should except a 405 code HTTP and a message "formerSourceIdentifier is deactivated"
- "Test case 405" if I provide
endpoint : http://example.com/fhir/Patient
formerSourceIdentifier : {sourceIdentifer1}
newSourceIdentifier : {sourceDIentifier2} (deactivated)
And click on Validate, GWT redirect me on "Resultat execution" and having a Statut Global "Passed"
I should except a 405 code HTTP and a message "newSourceIdentifier is deactivated"
- "Test case 422" if I provide
endpoint : http://example.com/fhir/Patient
formerSourceIdentifier : {sourceIdentifer1} (malformed)
newSourceIdentifier : {sourceDIentifier2}
And click on Validate, GWT redirect me on "Resultat execution" and having a Statut Global "Passed"
I should except a 422 code HTTP and a message "formerSourceIdentifier is malformed"
- "Test case 422" if I provide
endpoint : http://example.com/fhir/Patient
formerSourceIdentifier : {sourceIdentifer1}
newSourceIdentifier : {sourceDIentifier2} (malformed)
And click on Validate, GWT redirect me on "Resultat execution" and having a Statut Global "Passed"
I should except a 422 code HTTP and a message "newSourceIdentifier is malformed"
############################################################################
Misc :
ITI-44 to explain merge comportment
Header avec Etag
The aim is to implement the @Merge method in a new provider.
###########################################################################
The parameters :
Bundle type ITI-93 ( see example attached below) :
MessageHeader : shall contains
eventUri [1..1]: urn:ihe:iti:pmir:2019:patient-feed
focus [1..1]: shall reference the url of Bundle
sourceEndpoint [1..1]: Actual message source address or id.
destination [1..*] : The destination(s) of this feed.
Bundle
type [1..1] : should be History
entry [1..*] : the same Patient Resource shall not appear twice in this Bundle
entry.request.method [1..1] : POST | PUT | DELETE
entry.request.url [1..1] : The URL for this entry, relative to the root (the address to which the request is posted).
entry.response.status [1..1] : The response status shall be an HTTP response status of 200
When a merge is needed, the Patient Resource to be deprecated shall be included in the history
Bundle and shall be constrained as this :
entry.resource.active : false
entry.resource.link.type : replaced-by
entry.resource.link.other : Shall be a reference to the surviving Patient Resource
entry.request.method : PUT
Example of url :
http://yourServer.com/fhir/Patient?formerSourceIdentifier={systemId}|{patientid}&newSourceIdentifier={systemId}|{patientid}
###########################################################################
Error :
400 Bad Request - resource could not be parsed or failed basic FHIR validation rules (or multiple matches were found for conditional criteria)
404 Not Found - resource type not supported, or not a FHIR end-point
405 Method Not allowed - the resource did not exist prior to the update, and the server does not allow client defined ids
422 Unprocessable Entity - the proposed resource violated applicable FHIR profiles or server business rules
############################################################################
The response :
Bundle :
The patient Endpoint : http://yourServer.com/Fhir/Patient?sourceIdentifier={system|value}
############################################################################
AcceptanceCriteria :
- a Patient Identifier is mandatory [1..*]
- On the GWT, I can choose a project {projectName} and select the Merge Test Suite and modify : the endpoint, the formerSourceIdentifier I want to deprecate, the newSourceIdentifier I want for my Patient.
- 200 status is returned if the patient is merged
- 400 status is returned if I provided malformed Bundle Json
- 404 status is returned if I provided well-formed sourceIdentifier but not exist in PatReg
- 405 status is returned if I provide a sourceIdentifier for a deactivated patient
- 422 status is returned if I provide a malformed sourceIdentifier
###########################################################################
Technical Analysis :
- Create a converter between an ITI-93 type Bundle and a PatientAliases for Patient Registry.
- Add a PatientRegistryClient class with a merge method to handle the Patient Registry API and thrown errors.
- Add a method in PatientResourceProvider to call the client with the merge method.
- Create a method to convert the Patient Aliases returned from PatientRegistry into the expected bundle.
- Mock classes and TUs
###########################################################################
Tests :
As a USER I can :
1 - Go on https://qualification.ihe-europe.net/gazelle-webservice-tester/home.seam
2 - Log in CAS to have the privilegie to perform tests
3 - Go to "Executer" tab and choose the project "CH:ITI-93" (temporary name)
4 - Select the TestSuite "Merge" and select one of the TestCase presented :
- "Test case 200" if I provide
endpoint : http://example.com/fhir/Patient
formerSourceIdentifier : {sourceIdentifer1} (well formed & exists)
newSourceIdentifier : {sourceDIentifier2} (well formed & exists)
And click on Validate, GWT redirect me on "Resultat execution" and having a Statut Global "Passed"
I should except a 200 code HTTP and a message response described as below with the merged Patient
- "Test case 400" if I provide
endpoint : http://example.com/fhir/Patient
formerSourceIdentifier : {sourceIdentifer1} (well formed & exists)
newSourceIdentifier : {sourceDIentifier2} (well formed & exists)
And click on Validate, GWT redirect me on "Resultat execution" and having a Statut Global "Passed" (the body will be not well formed)
I should except a 400 code HTTP and a message " Body is malformed "
- "Test case 404" if I provide
endpoint : http://example.com/fhir/Patient
formerSourceIdentifier : {sourceIdentifer1} ( well-formed & NOT exist)
newSourceIdentifier : {sourceDIentifier2} (well-formed & exists)
And click on Validate, GWT redirect me on "Resultat execution" and having a Statut Global "Passed"
I should except a 404 code HTTP and a message "formerSourceIdentifier not exists"
- "Test case 404" if I provide
endpoint : http://example.com/fhir/Patient
formerSourceIdentifier : {sourceIdentifer1} (well-formed & exists)
newSourceIdentifier : {sourceIdentifier2} ( well-formed & NOT exist)
And click on Validate, GWT redirect me on "Resultat execution" and having a Statut Global "Passed"
I should except a 404 code HTTP and a message "newSourceIdentifier not exists"
- "Test case 405" if I provide
endpoint : http://example.com/fhir/Patient
formerSourceIdentifier : {sourceIdentifer1} (deactivated)
newSourceIdentifier : {sourceDIentifier2}
And click on Validate, GWT redirect me on "Resultat execution" and having a Statut Global "Passed"
I should except a 405 code HTTP and a message "formerSourceIdentifier is deactivated"
- "Test case 405" if I provide
endpoint : http://example.com/fhir/Patient
formerSourceIdentifier : {sourceIdentifer1}
newSourceIdentifier : {sourceDIentifier2} (deactivated)
And click on Validate, GWT redirect me on "Resultat execution" and having a Statut Global "Passed"
I should except a 405 code HTTP and a message "newSourceIdentifier is deactivated"
- "Test case 422" if I provide
endpoint : http://example.com/fhir/Patient
formerSourceIdentifier : {sourceIdentifer1} (malformed)
newSourceIdentifier : {sourceDIentifier2}
And click on Validate, GWT redirect me on "Resultat execution" and having a Statut Global "Passed"
I should except a 422 code HTTP and a message "formerSourceIdentifier is malformed"
- "Test case 422" if I provide
endpoint : http://example.com/fhir/Patient
formerSourceIdentifier : {sourceIdentifer1}
newSourceIdentifier : {sourceDIentifier2} (malformed)
And click on Validate, GWT redirect me on "Resultat execution" and having a Statut Global "Passed"
I should except a 422 code HTTP and a message "newSourceIdentifier is malformed"
############################################################################
Misc :
ITI-44 to explain merge comportment
Header avec Etag
Attachments
Issue Links
- is child of
-
PATREG-169 [Pixm Connector] Implement Feed requests in new provider
- Resolved