I think I have authorization working but when I try to send requests to the new endpoint. I am getting an error.
If I don't send an access token I get the following, as I would expect since I am not authorized.
Sending to just the basic endpoint with an access token. results in an error as i am not sending an operation name that being bundle.
{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "This is the base URL of FHIR server. Unable to handle this request, as it does not contain a resource type or operation name."
}
]
}
So i tried sending the request to the bundle endpoint.
The error message i am getting confuses me. This is a Http post request with the json body of the bundle i am trying to post. This is the exact same post that i made to the old endpoint. Why would it be looking for Http parameters? The old endpoint supported ?_format=json&_pretty=true query parms but this endpoint doesn't appear to support them.
{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "not-supported",
"diagnostics": "Invalid request: The FHIR endpoint on this server does not know how to handle POST operation[Bundle] with parameters [[]]"
}
]
}
Tried adding the bundle Id. I am just guessing at this point I cant find anything about parameters for the Post request in the documentation Care Gateway
{
"resourceType": "Bundle",
"id": "TestReport",
"meta": {
"profile": [
http://gateway.kl.dk/1.0/StructureDefinition/klgateway-care-delivery-report
]
},
"type": "collection",
"timestamp": "2021-05-31T12:03:24.280864+02:00",
"entry": [
{
"fullUrl": "Patient/TestPatient001",
"resource": {
"resourceType": "Patient",
"id": "TestPatient001",
"meta": {
"profile": [
http://gateway.kl.dk/1.0/StructureDefinition/klgateway-care-citizen
]
},
"identifier": {
"use": "official",
"system": "urn:oid:1.2.208.176.1.2",
"value": "0101010101"
},
"managingOrganization": {
"identifier": {
"use": "official",
"system": "urn:oid:1.2.208.176.1.1",
"value": "123456789012345"
}
}
}
},
{
"fullUrl": "Encounter/bfa70a76-318d-453d-9abc-76982f8d13ca",
"resource": {
"resourceType": "Encounter",
"id": "bfa70a76-318d-453d-9abc-76982f8d13ca",
"meta": {
"profile": [
http://gateway.kl.dk/1.0/StructureDefinition/klgateway-care-encounter
]
},
"status" :"planned",
"subject": {
"reference": "Patient/TestPatient001"
},
"period": {
"start": "2021-05-31T12:03:24.2828042+02:00"
},
"class": {
"system": http://terminology.hl7.org/CodeSystem/v3-ActCode,
"code": "HH"
},
"type": [
{
"coding": [
{
"system": http://kl.dk/fhir/common/caresocial/CodeSystem/KLCommonCareSocialCodes,
"code": "9f03dfbb-7a97-45a5-94db-d4c3501714a9"
}
]
}
],
"performedDateTime": "0001-01-01T00:00:00"
}
},
{
"fullUrl": "Condition/VaskeSigLetteBegraensninger",
"resource": {
"resourceType": "Condition",
"id": "VaskeSigLetteBegraensninger",
"meta": {
"profile": [
http://gateway.kl.dk/1.0/StructureDefinition/klgateway-care-condition
]
},
"extension": [
{
"url": http://gateway.kl.dk/1.0/StructureDefinition/klgateway-care-follow-up-encounter-extension,
"valueReference": {
"reference": "Encounter/bfa70a76-318d-453d-9abc-76982f8d13ca"
}
}
],
"clinicalStatus": {
"coding": [
{
"system": http://terminology.hl7.org/CodeSystem/condition-clinical,
"code": "active"
}
]
},
"category": {
"coding": [
{
"system": http://terminology.hl7.org/CodeSystem/condition-category,
"code": "problem-list-item"
}
]
},
"code": {
"coding": [
{
"system": http://kl.dk/fhir/common/caresocial/CodeSystem/FSIII,
"code": "J1.1"
}
]
},
"severity": {
"coding": [
{
"system": http://kl.dk/fhir/common/caresocial/CodeSystem/FSIII,
"code": "B2"
}
]
},
"subject": {
"reference": "Patient/TestPatient001"
},
"recordedDate": "2021-05-31T12:03:24.2821854+02:00"
}
},
{
"fullUrl": "Observation/OpleverIkkeBegraensningerMedVaskeSig",
"resource": {
"resourceType": "Observation",
"id": "OpleverIkkeBegraensningerMedVaskeSig",
"meta": {
"profile": [
http://gateway.kl.dk/1.0/StructureDefinition/klgateway-care-citizens-own-observation
]
},
"code": {
"coding": [
{
"system": http://kl.dk/fhir/common/caresocial/CodeSystem/FSIII,
"code": "D"
}
]
},
"subject": {
"reference": "Patient/TestPatient001"
},
"status": "final",
"effectiveDateTime": "2021-05-31T12:03:24.2816811+02:00",
"valueCodeableConcept": {
"coding": [
{
"system": http://kl.dk/fhir/common/caresocial/CodeSystem/FSIII,
"code": "D1"
}]
},
"focus": [
{
"reference": "Condition/VaskeSigLetteBegraensninger"
}
]
}
}
]
}