Run batches in the following order:
Open swagger Ui for documented REST api:
http://localhost:8081/swagger-ui.html
Registering endpoint managed by organisation:
http://localhost:8081/swagger-ui.html#!/endpoint-controller/saveEndpointUsingPOST
{
"resourceType": "Endpoint",
"managingOrganization": {
"reference": "Organization/ORG1"
},
"address": "http://org1.org/fhir"
}
http://localhost:8081/swagger-ui.html#!/endpoint-controller/findEndpointUsingGET
Should return:
{
"resourceType": "Endpoint",
"managingOrganization": {
"reference": "Organization/ORG1"
},
"address": "http://org1.org/fhir"
}
Registering patient:
http://localhost:8081/swagger-ui.html#!/patient-controller/savePatientUsingPOST
{
"resourceType": "Patient",
"identifier": [
{
"system": "http://www.politsei.ee/",
"use": "usual",
"value": "37804230234"
}
],
"managingOrganization": {
"reference": "Organization/ORG1"
}
}
http://localhost:8081/swagger-ui.html#!/patient-controller/findPatientUsingGET
Should return:
[
{
"resourceType": "Patient",
"identifier": [
{
"use": "usual",
"system": "http://www.politsei.ee/",
"value": "37804230234"
}
],
"managingOrganization": {
"reference": "Organization/ORG1"
}
}
]
Performing Observation query:
http://localhost:8081/swagger-ui.html#!/observation-controller/getObservationsUsingGET
patient.identifier.value: 37804230234
patient.identifier.system: http://www.politsei.ee/
organisation.identifier.value: ORG1
code.code: 8302-2
code.system: http://loinc.org
Will perform subqueries:
http://org1.org/fhir/Observation?patient.identifier.value=37804230234&patient.identifier.system=http://www.politsei.ee/&organisation.identifier.value=ORG1&code.code=8302-2&code.system=http://loinc.org
for each organization managing specified user data (using the registered endpoint for the organization).
Results from different organizations are combined and returned.