FHIR Chat · REST API · implementers

Stream: implementers

Topic: REST API


view this post on Zulip Suresh Kumar Mukhiya (Nov 29 2018 at 10:42):

Hi there, I am new to SMART FHIR implementation. Currently my work flow is REST API => COMMUNICATES => UI/UX. All the endoint I have store paitents/users/practictioner using same naming convenstion as FHIR. What I can not see is where in my workflow FHIR / SMART FHIR API comes into play. Any help would really be appreciated?

view this post on Zulip Brian Postlethwaite (Dec 03 2018 at 09:51):

http://hl7.org/fhir/smart-app-launch/

view this post on Zulip Ismel Martínez Díaz (May 10 2019 at 18:07):

Why GET [base]/[type]/_history?_id=<guid> does not work ?

I think it is a better way for use _include in the query string and other search parameters.

view this post on Zulip Lloyd McKenzie (May 10 2019 at 18:32):

It's not a search, it's a reference to a specific record. Search isn't specified to work across historical records, though it's possible some servers might support it.

view this post on Zulip Ismel Martínez Díaz (May 10 2019 at 20:25):

Thanks, I use .Net FireClient that have Search and History methods but History does not suports SearchParameters, maybee it is related with the server Rest API implementation .

view this post on Zulip Ewout Kramer (May 10 2019 at 21:28):

"History does not suports SearchParameters": right, you cannot search within a history, so the API does not provide you with a way to do it. Maybe you are looking for the history of a resource with a given id? In this case you can do just:

client.History("[type]/[id]"), e.g. client.History("Patient/12345")

instead of "12345" you put your <guid>

view this post on Zulip Ismel Martínez Díaz (May 14 2019 at 13:48):

"History does not suports SearchParameters": right, you cannot search within a history, so the API does not provide you with a way to do it. Maybe you are looking for the history of a resource with a given id? In this case you can do just:

client.History("[type]/[id]"), e.g. client.History("Patient/12345")

instead of "12345" you put your <guid>

I want to create, using History method, a Bundle with Resources (like Tasks) related to all versions o a one given Resource. In a Search, I can use SearchParameters with Include and IncludeIterarte, but as you mentioned, History does not soports that.

view this post on Zulip Lloyd McKenzie (May 14 2019 at 14:33):

You can submit a change request for us to consider introducing something like this in R5, but for now you're essentially constrained to using a custom operation.

view this post on Zulip Ismel Martínez Díaz (May 14 2019 at 15:15):

You can submit a change request for us to consider introducing something like this in R5, but for now you're essentially constrained to using a custom operation.

Thanks, How I create a custom operation ? Can I make a join, for example, between Task and DiagnosticReport, for finding all DiagnosticReport related to a Task with GeneratedReport code?

Where I must submit the change request ?

view this post on Zulip Lloyd McKenzie (May 14 2019 at 15:17):

You can submit a change request using the "propose a change" link at the bottom of any page in the spec. (You'll have to register first, but that's free). You can read more about operations here: http://build.fhir.org/operations.html

view this post on Zulip Ismel Martínez Díaz (May 14 2019 at 17:16):

If I have thousands of versions in a bundle obtained by a _history interaction, how I make pagination ?

view this post on Zulip Lloyd McKenzie (May 14 2019 at 17:19):

Pagination for a history operation works the same as for search. I.e. you can specify a _count parameter (or the server can impose one) and you then navigate using the next/previous links.

view this post on Zulip Ismel Martínez Díaz (May 14 2019 at 17:54):

Pagination for a history operation works the same as for search. I.e. you can specify a _count parameter (or the server can impose one) and you then navigate using the next/previous links.

It's works the same as for search but I can't restrict or expand as for search since I can not use search parameters. I.e If I want a pagination over a subset of the total set of versions obtained by _history, the actual type of pagination doesn't work for me. Then I would have to load the complete _history set, filtered for obtained the subset that I want, and finally make the pagination over the subset by myself ?

view this post on Zulip Lloyd McKenzie (May 14 2019 at 18:09):

You can filter by since and at, but history is not a 'search', so you can't filter the same way you would using the search operation.

view this post on Zulip Ismel Martínez Díaz (May 29 2019 at 13:33):

Hello, I try to obtain DiagnosticReports such that none of their related Tasks has not a "requested" status, I used the query get /fhir/DiagnosticReport?_has:Task:based-on:status:not=requested, but this only ensures that at least one of the Tasks meets the condition. Is there any way I can do the query I want?

view this post on Zulip Lloyd McKenzie (May 29 2019 at 13:35):

@Grahame Grieve - can _filter handle this?

view this post on Zulip nicola (RIO/SS) (May 29 2019 at 13:38):

Do not think _filter will be able to do such type of query. SQL on FHIR will. Go backward from Tasks, probably in two steps - 1. get tasks 2. get reports

view this post on Zulip Ismel Martínez Díaz (Jun 20 2019 at 18:50):

I try this get /fhir/Task?_sort=requester:PractitionerRole.practitioner:Practitioner.name but I get the error: No search parameter for Task.requester:PractitionerRole.practitioner:Practitioner.name, I think _sort not supports ChainedParameter. In that case, can I create a SearchParameter that include a path from other related resources?

view this post on Zulip Joakim Antus (Jun 08 2021 at 07:31):

In the documentation (https://www.hl7.org/fhir/http.html#create) it says that the server SHALL return a Location header for successfull create and update requests.
Shouldn't the header be Content-Location instead of Location?
Location is used for redirection and Content-Location is used to access a resource (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Location).

view this post on Zulip Lloyd McKenzie (Jun 08 2021 at 13:35):

"Location" is correct. See https://en.wikipedia.org/wiki/HTTP_location
"To provide information about the location of a newly created resource. In this circumstance, the Location header should be sent with an HTTP status code of 201 or 202.[1]"

view this post on Zulip booma radhakrishnan (Jun 09 2021 at 06:18):

Getting error as when post operaton is done against Observation in EPIC EHR . Not able to understand what i am missing on post parameter. Please provide some detials.

As per the EPIC documentation

59189 Fatal Failed to file the reading. When using FHIR Observation.Create, the API fails to file any readings to the patient's chart.

Request URL: https://fhir.epic.com/interconnect-fhir-oauth/api/FHIR/R4/Observation
Request Method: POST
Status Code: 400 Bad Request

Reponse Error

{
"resourceType": "OperationOutcome",
"issue": [{
"severity": "fatal",
"code": "processing",
"details": {
"coding": [{
"system": "urn:oid:1.2.840.114350.1.13.0.1.7.2.657369",
"code": "59189",
"display": "Failed to file the reading"
}],
"text": "Failed to file the reading"
},
"location": ["/f:subject/code"],
"expression": ["subject/code"]
}]
}

view this post on Zulip Lloyd McKenzie (Jun 09 2021 at 12:57):

Have you reached out to Epic?

view this post on Zulip booma radhakrishnan (Jun 11 2021 at 00:51):

I wanted to retrieve the questionnireReponse data posted with the patient id.
https://fhir.epic.com/interconnect-fhir-oauth/api/FHIR/R4/QuestionnaireResponse?patient=erXuFYUfucBZaryVksYEcMg3
I am getting 403 forbidden error as a response saying insufficient scope.

'scope': 'launch/patient patient/Patient.read DocumentReference.Read (Clinical Notes) Observation.Create(Vitals) Observation.Read(Vitals) questionnaireresponse.Create(Appointment and Series) QuestionnaireResponse.Read (Immunization) QuestionnaireResponse.Read(Appointment and Series) QuestionnaireResponse.Search (Appointment and Series) (R4) openid fhirUser patient/Observation.read profile patient/.',

is anything am i mssing.

view this post on Zulip Lloyd McKenzie (Jun 11 2021 at 03:36):

Same question as before - have you reached out to open@epic.com? This forum provides product support for a few reference implementations (e.g. #hapi), however most commercial solutions have their own separate support process that is managed by paid staff with response time expectations, etc. Your best bet for getting support on such commercial solutions is to reach out to them directly.

view this post on Zulip booma radhakrishnan (Jun 11 2021 at 03:59):

@Lloyd McKenzie Will contact the EPIC support team.

view this post on Zulip Michele Mottini (Jun 11 2021 at 12:43):

(1) Most of those scopes do not look correct - eg DocumentReference.Read Observation.Create(Vitals)
(2) the actual valid scope appears to be patient/*.read that gives access to all resources of the patient in context, but if erXuFYUfucBZaryVksYEcMg3 is the id of a different patient than that explains the 403

view this post on Zulip booma radhakrishnan (Jun 11 2021 at 13:11):

@Michele Mottini

Thanks Very much for the reply. I am using the FHIR user provided by the EPIC users list

FHIR: erXuFYUfucBZaryVksYEcMg3
External: Z6129
MRN: 203713
MyChart Login Username: fhircamila
MyChart Login Password: epicepic1

https://fhir.epic.com/Documentation?docId=testpatients

Do i need to request new user

view this post on Zulip Michele Mottini (Jun 11 2021 at 13:15):

That's the same patient id of the one you are using in the search, so no

view this post on Zulip booma radhakrishnan (Jun 21 2021 at 04:03):

Getting error while doing post in Observation resource in Cerner, Getting error as bleow

{
"resourceType": "OperationOutcome",
"issue": [{
"severity": "error",
"code": "invalid",
"details": {
"coding": [{
"system": "http://terminology.hl7.org/CodeSystem/operation-outcome",
"code": "MSG_PARAM_INVALID",
"display": "Parameter 'Observation.code' content is invalid"
}],
"text": "The value for Observation.code is not supported."
},
"diagnostics": "Observation.code: cannot be blank",
"expression": ["Observation.code"]
}]
}

I am posting the below observation and works fine in Open Fhir, and able to post and cerner returns an error.
{
"resourceType": "Observation",
"status": "final",
"category": [{
"coding": [{
"system": "http://terminology.hl7.org/CodeSystem/observation-category",
"code": "laboratory",
"display": "Laboratory"
}],
"text": "Laboratory"
}],
"code": {
"coding": [{
"system": "http://loinc.org",
"code": "718-7",
"display": "Hemoglobin [Mass/volume] in Blood"
}],
"text": "Hemoglobin"
},
"subject": {
"reference": "Patient/12724065"
},
"valueQuantity": {
"value": 13.2,
"unit": "mg/dL",
"system": "http://unitsofmeasure.org",
"code": "mg/dL"
},
"issued": "2021-06-03T20:42:00.000Z",
"effectiveDateTime": "2021-06-03T20:42:00.000Z",
"interpretation": [{
"coding": [{
"system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation",
"code": "N",
"display": "Normal"
}],
"text": "Normal"
}],
"referenceRange": [{
"low": {
"value": 12.0,
"unit": "g/dL",
"system": "http://unitsofmeasure.org",
"code": "g/dL"
},
"high": {
"value": 15.5,
"unit": "g/dL",
"system": "http://unitsofmeasure.org",
"code": "g/dL"
}
}],
"note": [{
"time": "2021-06-03T20:42:15.000Z",
"text": "test"
}]
}

view this post on Zulip Michele Mottini (Jun 21 2021 at 14:03):

Better asking Cerner support: cerner-fhir-developers@googlegroups.com including the X-request id


Last updated: Apr 12 2022 at 19:14 UTC