FHIR Chat · Problem with R4 API · finnish PHR

Stream: finnish PHR

Topic: Problem with R4 API


view this post on Zulip Mikael Rinnetmäki (Mar 22 2022 at 15:00):

HI!
I'm testing the R4 endpoint. Trying to post a resource fails there, but the same resource is accepted by the HAPI server UI.

view this post on Zulip Mikael Rinnetmäki (Mar 22 2022 at 15:01):

An example resource is

{
    "resourceType": "MedicationAdministration",
    "meta": {
        "profile": ["http://phr.kanta.fi/StructureDefinition/fiphr-sd-insulindosing-r4"]
    },
    "language": "fi",
    "text": {
        "status": "generated",
        "div": "<div lang=\"fi\" xml:lang=\"fi\" xmlns=\"http://www.w3.org/1999/xhtml\">Insuliinin tyyppi: Lyhytvaikutteinen insuliini<br />Koodi: SNOMED 411531001 (Short-acting insulin (substance)), ins-short-fast (Lyhytvaikutteinen insuliini), SNOMED 67866001 (Insulin (substance))<br />Aika: 19.49:54 - 19.54:54<br />Lyhytvaikutteinen insuliini 0.05 IU (0.641 IU/1.3260530421216847 h)<br />Laite: tandemCIQ1002717740434</div>"
    },
    "identifier": [{
        "system": "urn:ietf:rfc:3986",
        "value": "urn:uuid:e855467f-5f3c-5f3e-adf3-05025969068a"
    }],
    "status": "completed",
    "medicationCodeableConcept": {
        "coding": [{
            "system": "http://snomed.info/sct",
            "code": "411531001",
            "display": "Short-acting insulin (substance)"
        }, {
            "system": "http://phr.kanta.fi/CodeSystem/fiphr-cs-insulincode",
            "code": "ins-short-fast",
            "display": "Lyhytvaikutteinen insuliini"
        }, {
            "system": "http://snomed.info/sct",
            "code": "67866001",
            "display": "Insulin (substance)"
        }],
        "text": "Lyhytvaikutteinen insuliini"
    },
    "subject": {
        "reference": "Patient/e90e0ff6-5a42-4905-b0b4-c8af8c778b88"
    },
    "effectivePeriod": {
        "start": "2021-10-24T19:49:54.000+03:00",
        "end": "2021-10-24T19:54:54.000+03:00"
    },
    "dosage": {
        "dose": {
            "unit": "IU",
            "system": "http://unitsofmeasure.org",
            "code": "[iU]",
            "value": 0.05341666666666667
        },
        "rateRatio": {
            "numerator": {
                "value": 0.641,
                "unit": "IU",
                "system": "http://unitsofmeasure.org",
                "code": "[iU]"
            },
            "denominator": {
                "value": 1.3260530421216847,
                "unit": "h",
                "system": "http://unitsofmeasure.org",
                "code": "h"
            }
        },
        "text": "Lyhytvaikutteinen insuliini 0.05 IU (0.641 IU/1.3260530421216847 h)"
    }
}

view this post on Zulip Mikael Rinnetmäki (Mar 22 2022 at 15:02):

The R4 endpoint responds with HTTP 400

<html><head><title>Request Rejected</title></head><body>The requested URL was rejected. Please consult with your administrator.<br><br>Your support ID is: 8839858361057246123<br><br><a href='javascript:history.back();'>[Go Back]</a></body></html>

view this post on Zulip Mikael Rinnetmäki (Mar 22 2022 at 15:04):

The HAPI UI responds:

HAPI UI:

date: Tue, 22 Mar 2022 14:43:33 GMT
x-request-id: 5Jme1mJHs3bk2jcJ
expires: 0
x-frame-options: DENY
strict-transport-security: max-age=31536000 ; includeSubDomains
pragma: no-cache
set-cookie: KelaAA010e9064=0108ec7f738becbecfd97736d2a4a3824e8fd4c4eca70170f94c54b506e79412cbd24f4e993f5d00a9dfb27452de7fff5c93c26305; Path=/; Domain=.fhirsandbox.kanta.fi; Secure; HTTPOnly
x-xss-protection: 1; mode=block
x-content-type-options: nosniff
content-location: https://fhirsandbox.kanta.fi/phr-resourceserver/baseR4/MedicationAdministration/692e9cbe-7d36-4c8a-9640-7cb28da5649b/_history/1
location: https://fhirsandbox.kanta.fi/phr-resourceserver/baseR4/MedicationAdministration/692e9cbe-7d36-4c8a-9640-7cb28da5649b/_history/1
etag: W/"1"
cache-control: no-cache, no-store, max-age=0, must-revalidate
content-language: en-US

view this post on Zulip Aleksi Aho (Mar 23 2022 at 08:23):

Hi, we have made some changes. However, we weren't able to replicate the problem ourselves, so we weren't able to make sure the issue is fixed. Does it work now?

view this post on Zulip Mikael Rinnetmäki (Mar 23 2022 at 21:23):

Seems to work now, thanks @Aleksi Aho!


Last updated: Apr 12 2022 at 19:14 UTC