Closed brianreinhold closed 5 years ago
The official validator, throws an exception when testing this content...
Weird.
Out of memory?
Is the Bundle too large?
Brian
From: Ryan Sainty notifications@github.com Sent: Thursday, April 18, 2019 7:27 AM To: angusmillar/Pyro Cc: Brian Reinhold; Author Subject: Re: [angusmillar/Pyro] Not accepting a transaction bundle (#2)
The official validatorhttp://wiki.hl7.org/index.php?title=Using_the_FHIR_Validator, throws an exception when testing this content...
[image]https://user-images.githubusercontent.com/20519043/56357769-9575d800-61d4-11e9-994e-1978c099247e.png
Weird.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/angusmillar/Pyro/issues/2#issuecomment-484463845, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AJMDO66PNR2O7NLYEPKO22TPRBLJLANCNFSM4HG3KKRA.
The bundle isn't too large; heap is getting blown for some reason.
The device resource maturity is 0 so hasn't likely been tested a whole lot - maybe Angus has an explanation.
Okay,
The message I got from the server said it did not expect a valueQuantity in the property. I actually had quite a bit to do with the Device.property element and it is pretty messy. The server did not seem to have an issue with the coded value element of the property.
To be honest, it is the Device we are most interested in testing as we are working on the PHD IG.
Brian
From: Ryan Sainty notifications@github.com Sent: Thursday, April 18, 2019 8:44 AM To: angusmillar/Pyro Cc: Brian Reinhold; Author Subject: Re: [angusmillar/Pyro] Not accepting a transaction bundle (#2)
The bundle isn't too large; heap is getting blown for some reason.
The device resource maturity is 0 so hasn't likely been tested a whole lot - maybe Angus has an explanation.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/angusmillar/Pyro/issues/2#issuecomment-484490564, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AJMDO6YWRAVMNDKUUT223VLPRBUJFANCNFSM4HG3KKRA.
And if you want, I would be glad to test it with the Device!
Brian
From: Ryan Sainty notifications@github.com Sent: Thursday, April 18, 2019 8:44 AM To: angusmillar/Pyro Cc: Brian Reinhold; Author Subject: Re: [angusmillar/Pyro] Not accepting a transaction bundle (#2)
The bundle isn't too large; heap is getting blown for some reason.
The device resource maturity is 0 so hasn't likely been tested a whole lot - maybe Angus has an explanation.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/angusmillar/Pyro/issues/2#issuecomment-484490564, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AJMDO6YWRAVMNDKUUT223VLPRBUJFANCNFSM4HG3KKRA.
Just saw this guy, can't look now but will try to over the weekend.
Agnus,
Would love to work with you to get either my end or you end solved. There are not too many R4 servers out there. Right now I only work with the HAPI FHIR servers, but they are pretty lenient. I can send a 4.0.0 upload to a 3.1.0 server and it will accept it.
I will be on a bit this weekend (early and late) so if you send anything this way I should see it within a reasonable amount of time. The worse the weather, the more time on the computer!
Will you be at the Montreal Connectathon?
Brian
From: Angus Millar notifications@github.com Sent: Friday, April 19, 2019 12:46 AM To: angusmillar/Pyro Cc: Brian Reinhold; Author Subject: Re: [angusmillar/Pyro] Not accepting a transaction bundle (#2)
Just saw this guy, can't look now but will try to over the weekend.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/angusmillar/Pyro/issues/2#issuecomment-484766250, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AJMDO6552K2367UO6ENWIFTPRFFBXANCNFSM4HG3KKRA.
I've found the issue. The version of the R4 .Net FHIR API that is currently being used in my R4 Pyro server has a bug in that Device.Property.valueQuantity has been miss spelt and that spelling mistake flows right through to the JSON & XML serialization and de-serialization. So the server expects the following spelling of 'valueQuantity':
"valueQuanity": [{"value": 120000000, "code": "us"}]
rather than the correct spelling which would be:
"valueQuantity": [{"value": 120000000, "code": "us"}]
I can see the spelling mistake has been fixed in the FHIR .NET API V1.2.1 (if not earlier) however the public Pyro R4 server is using FHIR .NET API V0.96.1.
So the root resolution is for me to update to the latest FHIR .NET API version V1.2.1. That in its self will have a few knock one effects I will need to work through.
The other short term workaround is for you to change your resources to use the incorrect spelling of "valueQuanity" or to remove that element form your Device resources for the time being. The later would be a better workaround as once the root problem is fixed the server will then struggle to return any misspelt resource it may have consumed before the fix. So my advice in the short term is to not include the Device element "valueQuantity": [{"value": 120000000, "code": "us"}] for the time being until I can update the server.
I will now look into how much work the update will take me.
Agnus,
Ahh, I remember that. That was not your error but an error in the FHIR distribution which got corrected. I set the bug against it. Many use the SD from the fhir build (including HAPI FHIR) for theor implementation and that's how I initially found it. How hard will that be to fix?
Brian
From: Angus Millar notifications@github.com Sent: Saturday, April 20, 2019 12:54 AM To: angusmillar/Pyro Cc: Brian Reinhold; Author Subject: Re: [angusmillar/Pyro] Not accepting a transaction bundle (#2)
I've found the issue. The version of the R4 .Net FHIR API that is currently being used in my R4 Pyro server has a bug in that Device.Property.valueQuantity has been miss spelt and that spelling mistake flows right through to the JSON & XML serialization and de-serialization. So the server expects the following spelling of 'valueQuantity':
"valueQuanity": [{"value": 120000000, "code": "us"}]
rather than the correct spelling which would be:
"valueQuantity": [{"value": 120000000, "code": "us"}]
I can see the spelling mistake has been fixed in the FHIR .NET API V1.2.1 (if not earlier) however the public Pyro R4 server is using FHIR .NET API V0.96.1.
So the root resolution is for me to update to the latest FHIR .NET API version V1.2.1. That in its self will have a few knock one effects I will need to work through.
The other short term workaround is for you to change your resources to use the incorrect spelling of "valueQuanity" or to remove that element form your Device resources for the time being. The later would be a better workaround as once the root problem is fixed the server will then struggle to return any misspelt resource it may have consumed before the fix. So my advice in the short term is to not include the Device element "valueQuantity": [{"value": 120000000, "code": "us"}] for the time being until I can update the server.
I will now look into how much work the update will take me.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/angusmillar/Pyro/issues/2#issuecomment-485058717, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AJMDO622IXHRGIRJTUFJJQDPRKOXJANCNFSM4HG3KKRA.
Agnus,
Any chance that you can fix this?
Thanks,
Brian
From: Angus Millar notifications@github.com Sent: Saturday, April 20, 2019 12:54 AM To: angusmillar/Pyro Cc: Brian Reinhold; Author Subject: Re: [angusmillar/Pyro] Not accepting a transaction bundle (#2)
I've found the issue. The version of the R4 .Net FHIR API that is currently being used in my R4 Pyro server has a bug in that Device.Property.valueQuantity has been miss spelt and that spelling mistake flows right through to the JSON & XML serialization and de-serialization. So the server expects the following spelling of 'valueQuantity':
"valueQuanity": [{"value": 120000000, "code": "us"}]
rather than the correct spelling which would be:
"valueQuantity": [{"value": 120000000, "code": "us"}]
I can see the spelling mistake has been fixed in the FHIR .NET API V1.2.1 (if not earlier) however the public Pyro R4 server is using FHIR .NET API V0.96.1.
So the root resolution is for me to update to the latest FHIR .NET API version V1.2.1. That in its self will have a few knock one effects I will need to work through.
The other short term workaround is for you to change your resources to use the incorrect spelling of "valueQuanity" or to remove that element form your Device resources for the time being. The later would be a better workaround as once the root problem is fixed the server will then struggle to return any misspelt resource it may have consumed before the fix. So my advice in the short term is to not include the Device element "valueQuantity": [{"value": 120000000, "code": "us"}] for the time being until I can update the server.
I will now look into how much work the update will take me.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/angusmillar/Pyro/issues/2#issuecomment-485058717, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AJMDO622IXHRGIRJTUFJJQDPRKOXJANCNFSM4HG3KKRA.
I am working on it. As I said their are knock on effects from upgrading the .Net Fhir api libraries in order to get the fix you require. This introduces changes to the way Fhirpath works with the fhir .net libraries ElementModel which mean work for me to integrate these changes into my existing server implementation. That is what I'm working on. You seem to have some form of deadline, what date are you looking at?
Angus,
It would be nice to have for the FHIR connectathon in May in Montreal.
I looked back at the various published FHIR versions. The error was present from 3.5.0 and was corrected in 4.0.0.
I could also add a change in my code to support the 'valueQuanity'.I am assuming that you are basing the server on some release of FHIR and are using their structure definitions in some way. It probably makes more sense for you to use their 4.0.0 release or keep the 3.5.0 as it is because that is how it is published. You could indicate that on the wiki (that it supports 3.5.0/3.5.0a versus 4.0.0). I could make an if-then-else to handle the pre-4.0.0. In the end, it would probably be less work and at least I know the cause of the rejection.
Brian
From: Angus Millar notifications@github.com Sent: Monday, April 22, 2019 11:33 PM To: angusmillar/Pyro Cc: Brian Reinhold; Author Subject: Re: [angusmillar/Pyro] Not accepting a transaction bundle (#2)
I am working on it. As I said their are knock on effects from upgrading the .Net Fhir api libraries in order to get the fix you require. This introduces changes to the way Fhirpath works with the fhir .net libraries ElementModel which mean work for me to integrate these changes into my existing server implementation. That is what I'm working on. You seem to have some form of deadline, what date are you looking at?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/angusmillar/Pyro/issues/2#issuecomment-485630575, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AJMDO62OYHPWLV5OXOG6SBTPRZ7OZANCNFSM4HG3KKRA.
Angus,
I made a version with the 3.5.0 valueQuanity and it works. So you have a valid 3.5.0 server. Only make the change if you want a 4.0.0 server.
Brian
From: Angus Millar notifications@github.com Sent: Monday, April 22, 2019 11:33 PM To: angusmillar/Pyro Cc: Brian Reinhold; Author Subject: Re: [angusmillar/Pyro] Not accepting a transaction bundle (#2)
I am working on it. As I said their are knock on effects from upgrading the .Net Fhir api libraries in order to get the fix you require. This introduces changes to the way Fhirpath works with the fhir .net libraries ElementModel which mean work for me to integrate these changes into my existing server implementation. That is what I'm working on. You seem to have some form of deadline, what date are you looking at?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/angusmillar/Pyro/issues/2#issuecomment-485630575, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AJMDO62OYHPWLV5OXOG6SBTPRZ7OZANCNFSM4HG3KKRA.
Good to hear Brian, I now have a working V4.0.0 but a little more housekeeping to do before I deploy to the public server. Maybe another 2 days.
Yes, the current server is based on FHIR V3.5.0 as it states in the server's own CapabilityStatement, but point taken I should have said as much in the public server's Wiki page.
And thanks for raising this as it made me do the task I've been ignoring for some time, upgrade the server to V4.0.0 as it is the official R4 release now.
The said issue is now resolved in the new repo branch named release-r4 which now supports V4.0.0 of the FHIR spec and therefore resolves the issue of the spelling of valueQuanity to valueQuantity in the Device resource. I will update the public R4 Pyro server tomorrow.
Angus,
I have support for both versions then. Do you support subscriptions?
Brian
From: Angus Millar notifications@github.com Sent: Saturday, April 27, 2019 8:44 AM To: angusmillar/Pyro Cc: Brian Reinhold; Author Subject: Re: [angusmillar/Pyro] Not accepting a transaction bundle (#2)
The said issue is now resolved in the new repo branch named release-r4 which now supports V4.0.0 of the FHIR spec and therefore resolves the issue of the spelling of valueQuanity to valueQuantity in the Device resource. I will update the public R4 Pyro server tomorrow.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/angusmillar/Pyro/issues/2#issuecomment-487283200, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AJMDO63HSTAFPPYL2FNLOADPSRDCJANCNFSM4HG3KKRA.
I have now as of Sunday 10:50 AM +10:00 deployed the new Pyro FHIR Server that supports FHIR Version 4.0.0. I did not persist the old data stored in the public server, it is a clean database.
Do you support subscriptions? No, not as yet. However, most of the infrastructure parts have been done to support it. Had to implement an out of band processor to service the subscriptions. That is done but I have not done the work to utilise for the FHIR subscriptions as yet.
Angus,
Okay, that explains it. The CapabilityStatement indicates support for subscriptions (as best as I can tell) but I get an empty response from a subscription attempt so I have no subscriptionId.
(Note I am a real greenhorn when it comes to READING/SEARCHING FHIR servers; I have primary concentrated upon uploading. But now I need to write a simple app that consumes the data a PHD IG uploads.)
I did a search on a Patient identifier GET [baseUrl] /Patient?identifier:contains=" + patientIdentifierValue + ",_sort=-date"
It doesn't seem that the sort is ignored by most. But what I got back was all patients. And the 'self' link field in the returned bundle was JUST the /Patient. Is that expected? I did not parse the CapabilityStatement for what mechanisms are supported for the Patient resource so the answer may be there...
Oh, is it the same URL to the server?
Thanks,
Brian
From: Angus Millar notifications@github.com Sent: Saturday, April 27, 2019 9:00 PM To: angusmillar/Pyro Cc: Brian Reinhold; Author Subject: Re: [angusmillar/Pyro] Not accepting a transaction bundle (#2)
I have now as of Sunday 10:50 AM +10:00 deployed the new Pyro FHIR Server that supports FHIR Version 4.0.0. I did not persist the old data stored in the public server, it is a clean database.
Do you support subscriptions? No, not as yet. However, most of the infrastructure parts have been done to support it. Had to implement an out of band processor to service the subscriptions. That is done but I have not done the work to utilise for the FHIR subscriptions as yet.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/angusmillar/Pyro/issues/2#issuecomment-487331051, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AJMDO6Y5L2DC3263BCH54CDPSTZJPANCNFSM4HG3KKRA.
Try this: [BaseUrl]/Patient?identifier=12345678 No doubled quotes, no comma '_sort', no 'contains'. The '_sort' parameter is not supported by the server it just sorts by date by default. I don't understand why you would want to use 'contains' for an identifier. 'contains' is not supported for token search parameters, which 'identifier' is one of. The reason it returns all patients is because the 'contains' is not supported so it ignores that parameter. Also, you used a comma between the patientIdentifierValue and '_sort' therefore the word _sort is treated as an OR. So it says where identifier contains patientIdentifierValue or _sort=date. You should use an ampersand '&'. Although as i said _sort is not supported so no need to use it. Hope this helps. Can we close this issue as resolved? I'm happy to provide more help but best we just do that by email: angusbmillar@gmail.com
Angus,
My bad; I sent you Java code, not the actual search. There are no double quotes in the search (that Java String designation, and there is a comma.. But there is also the 'contains' and no '&'. I am not sure why I used a contains, it was left over from the last connectathon where I was experimenting with reading data and subscribing to data. I am a TOTAL greenhorn when it comes to consuming FHIR data, all I have been doing is uploading.
The actual search is
/Patient?identifier:contains=sisansarahId,_sort=-date
But you say I should have
/Patient?identifier=sisansarahId,&_sort=-date
the sort for those that support sort
Actually a not-so-lazy search in my case should be (I think)
/Patient?identifier=sisansarahId|urn:iso:1.2.3.4.5.6.7.8.10,&_sort=-date
I will give that a try
Brian
From: Angus Millar notifications@github.com Sent: Sunday, April 28, 2019 8:29 AM To: angusmillar/Pyro Cc: Brian Reinhold; Author Subject: Re: [angusmillar/Pyro] Not accepting a transaction bundle (#2)
Try this: [BaseUrl]/Patient?identifier=12345678 No doubled quotes, no comma '_sort', no 'contains'. The '_sort' parameter is not supported by the server it just sorts by date by default. I don't understand why you would want to use 'contains' for an identifier. 'contains' is not supported for token search parameters, which 'identifier' is one of. The reason it returns all patients is because the 'contains' is not supported so it ignores that parameter. Also, you used a comma between the patientIdentifierValue and '_sort' therefore the word _sort is treated as an OR. So it says where identifier contains patientIdentifierValue or _sort=date. You should use an ampersand '&'. Although as i said _sort is not supported so no need to use it. Hope this helps. Can we close this issue as resolved? I'm happy to provide more help but best we just do that by email: angusbmillar@gmail.commailto:angusbmillar@gmail.com
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/angusmillar/Pyro/issues/2#issuecomment-487374758, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AJMDO62WVFQBKQXFRTDTO33PSWKB7ANCNFSM4HG3KKRA.
No, no comma: /Patient?identifier=sisansarahId|urn:iso:1.2.3.4.5.6.7.8.10&_sort=-date
The syntax is: /Patient?identifier=[system]|[value]&_sort=-date
Yet it is also valid to do this: /Patient?identifier=[value]&_sort=-date
Agnus,
Thanks. The comma came from this on the FHIR site
GET [base]/Observation?_sort=status,-date,category
But the example had no parameters. So I tried adding some parameters before and after the sort and it worked if I put it before with the comma. (I didnt try without). It was the HAPI FHIR server which is probably too forgiving. I filed a bug against FHIR yesterday to clarifiy and provide some examples of its use with parameters.
I am getting an okay on this search:
Perform a GET request to URL http://r4.test.pyrohealth.net/fhir/Patient?identifier=sisansarahId,&_sort=-date Response code: 200 Response message: OK Response description: Response to GET request. Response body: {"resourceType":"Bundle","type":"searchset","total":1,"link":[{"relation":"first","url":"http://r4.test.pyrohealth.net/fhir/Patient?identifier=sisansarahId,&_sort=-date&page=1"},{"relation":"last","url":"http://r4.test.pyrohealth.net/fhir/Patient?identifier=sisansarahId,&_sort=-date&page=1"},{"relation":"self","url":"https://r4.test.pyrohealth.net/fhir/Patient"}],"entry":[{"fullUrl":"https://r4.test.pyrohealth.net/fhir/Patient/IHIStatusExample","resource":{"resourceType":"Patient","id":"IHIStatusExample","meta":{"versionId":"1","lastUpdated":"2019-04-28T01:05:51.1216815+00:00"},"text":{"status":"generated","div":"<div xmlns=\"http://www.w3.org/1999/xhtml\"><table class=\"box\">
Angus \t\t\t\t\t\t\t\r\n\r\n\r\n\t\t\t\t\t\t\t\t Millar
even though it is wrong (I will fix)
but an error on this one:
Perform a GET request to URL http://r4.test.pyrohealth.net/fhir/Observation?subject=Patient/IHIStatusExample,&_sort=-date Response code: 400 Response message: Bad Request Response description: Response to GET request. Response body: {"resourceType":"OperationOutcome","text":{"div":"<div xmlns=\"http://www.w3.org/1999/xhtml\">\r\n
\r\n \r\n Severity: \r\n \r\n | \r\n\r\n error\r\n | \r\n
\r\n \r\n Type: \r\n \r\n | \r\n\r\n processing\r\n | \r\n
\r\n \r\n Detail Text: \r\n \r\n | \r\n\r\n The search parameter 'subject' is ambiguous. Additional information: The search parameter 'subject' can referance the following resource types (Group, Device, Patient, Location). To correct this you must prefix the search parameter with a Type modifier, for example: 'subject=Group/' or: 'subject:Group=' If the 'Group' resource was the intended referance for the search parameter 'subject'.\r\n | \r\n
I will fix the comma here too; the logical id came from the above search so that is okay
and an error on this subscription attempt:
Perform a POST request to URL http://r4.test.pyrohealth.net/fhir/Subscription with JSON string {"resourceType":"Subscription","status":"requested","end":"2019-04-28T09:31:35.569-04:00","reason":"Notified of patient measurement","criteria":"Observation?_profile=http://hl7.org/fhir/uv/phd/StructureDefinition/PhdNumericObservation","channel":{"type":"rest-hook","endpoint":"http://r4.test.pyrohealth.net/fhir","payload":"application/fhir+json"}} Response code: 500 Response message: Internal Server Error Response description: Response to POST request. Response body: {"resourceType":"OperationOutcome","text":{"div":"<div xmlns=\"http://www.w3.org/1999/xhtml\">\r\n
\r\n \r\n Severity: \r\n \r\n | \r\n\r\n error\r\n | \r\n
\r\n \r\n Type: \r\n \r\n | \r\n\r\n exception\r\n | \r\n
\r\n \r\n Detail Text: \r\n \r\n | \r\n\r\n Unknown FhirType: 'url' for SearchParameterType: 'Uri'\r\n | \r\n
Here is the input JSON formatted prettier
{ "resourceType": "Subscription", "status": "requested", "end": "2019-04-28T09:13:47.702-04:00", "reason": "Notified of patient measurement", "criteria": "Observation?_profile=http://hl7.org/fhir/uv/phd/StructureDefinition/PhdNumericObservation", "channel": { "type": "rest-hook", "endpoint": "http://r4.test.pyrohealth.net/fhir", "payload": "application/fhir+json" } }
Any idea what the problems are? (I will see if the no comma helps on the other GET
Brian
From: Angus Millar notifications@github.com Sent: Sunday, April 28, 2019 9:04 AM To: angusmillar/Pyro Cc: Brian Reinhold; Author Subject: Re: [angusmillar/Pyro] Not accepting a transaction bundle (#2)
No, no comma: /Patient?identifier=sisansarahId|urn:iso:1.2.3.4.5.6.7.8.10&_sort=-date
The syntax is: /Patient?identifier=[system]|[value]&_sort=-date
Yet it is also valid to do this: /Patient?identifier=[value]&_sort=-date
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/angusmillar/Pyro/issues/2#issuecomment-487377442, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AJMDO62O2KOUXKANQHUZJ33PSWOGRANCNFSM4HG3KKRA.
Angus,
I get conflicting results
Perform a GET request to URL http://r4.test.pyrohealth.net/fhir/Patient?identifier=sisansarahId,&_sort=-date
works and finds one patient
Perform a GET request to URL http://r4.test.pyrohealth.net/fhir/Patient?identifier=sisansarahId&_sort=-date
works but finds no patients
Perform a GET request to URL http://r4.test.pyrohealth.net/fhir/Patient?identifier=sisansarahId
works but finds no patients
This works http://r4.test.pyrohealth.net/fhir/Observation?subject=Patient/IHIStatusExample
but finds no observations ( I am expecting some)
http://r4.test.pyrohealth.net/fhir/Observation?subject=Patient/IHIStatusExample&_sort=-date
fails
http://r4.test.pyrohealth.net/fhir/Observation?subject=Patient/IHIStatusExample,&_sort=-date
fails
But the correct search is WITHOUT the comma, right?
Brian
From: Angus Millar notifications@github.com Sent: Sunday, April 28, 2019 9:04 AM To: angusmillar/Pyro Cc: Brian Reinhold; Author Subject: Re: [angusmillar/Pyro] Not accepting a transaction bundle (#2)
No, no comma: /Patient?identifier=sisansarahId|urn:iso:1.2.3.4.5.6.7.8.10&_sort=-date
The syntax is: /Patient?identifier=[system]|[value]&_sort=-date
Yet it is also valid to do this: /Patient?identifier=[value]&_sort=-date
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/angusmillar/Pyro/issues/2#issuecomment-487377442, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AJMDO62O2KOUXKANQHUZJ33PSWOGRANCNFSM4HG3KKRA.
Hi Brian,
How to use search is documented in the FHIR specification here: http://hl7.org/fhir/R4/search.html, and each of the search parameters that are available for each Resource is found on each resources’ page in the specification. For instance, looking at the Patient resource found here http://hl7.org/fhir/R4/patient.html you can find all the available search parameters at the very bottom of the page under the heading “Search Parameters”.
Let me go through each of your queries and explain what is happening in the Pyro server.
Query 1
http://r4.test.pyrohealth.net/fhir/Patient?identifier=sisansarahId,&_sort=-date
Again the ‘,’ comma after the value of the identifier is the problem. It treats what is after the coma as an OR, so that is identifier=sisansarahId OR
Query 2 http://r4.test.pyrohealth.net/fhir/Observation?subject=Patient/IHIStatusExample,&_sort=-date Again the ‘,’ comma. The error message returned here is correct but not obvious. Because of the comma, it tries to process the second value which is an empty string. It then can not find the leading Resource name and then complains about it not being there. So the correct way to make this query would be: [BaseUrl]/Observation?subject=Patient/IHIStatusExample&_sort=-date. However, I should point out that when I deployed the latest release to the Pyro server to bring in support for Version 4.0.0 of FHIR I also dumped the database. So, the server is empty, there are no Observation resources in the server at present. I will try injecting some for you.
Query 3 http://r4.test.pyrohealth.net/fhir/Subscription with JSON string {"resourceType":"Subscription","status":"requested","end":"2019-04-28T09:31:35.569-04:00","reason":"Notified of patient measurement","criteria":"Observation?_profile=http://hl7.org/fhir/uv/phd/StructureDefinition/PhdNumericObservation","channel":{"type":"rest-hook","endpoint":"http://r4.test.pyrohealth.net/fhir","payload":"application/fhir+json"}} This is a bug in my R4.0.0 server. Between STU3 and R4 they changed the datatype of the property Subscription.channel.endpoint from the type Uri to the type Url. I have just fixed this and uploaded a new release to the GitHub repository. Will try publishing to the public server later. However, as I said earlier the server currently does not support FHIR active Subscriptions. It can consume and return Subscription resources just as it can all the other FHIR resource types. Yet it will not monitor changes in the server and notify subscribers.
Query 4 Perform a GET request to URL http://r4.test.pyrohealth.net/fhir/Patient?identifier=sisansarahId,&_sort=-date works and finds one patient No, it does not work it ignores the parameter ‘identifier=sisansarahId,’ due to the comma and therefore runs then query as http://r4.test.pyrohealth.net/fhir/Patient?_sort=-date which just retunes all Patient resources of which there is only one of as I dumped all the resources on the last release. I then added that single resource as a test.
Query 5 Perform a GET request to URL http://r4.test.pyrohealth.net/fhir/Patient?identifier=sisansarahId&_sort=-date works but finds no patients True because there is no Patient resource in the server with an identifier of ‘sisansarahId’ because I dumped all the resources on the last release.
Query 6 Perform a GET request to URL http://r4.test.pyrohealth.net/fhir/Patient?identifier=sisansarahId works but finds no patients Same as above yet with no parameter _sort. The _sort is always ignored by the server.
Query 7 This works http://r4.test.pyrohealth.net/fhir/Observation?subject=Patient/IHIStatusExample but finds no observations ( I am expecting some) There are no Observation resources in the server at all, I dumped all the resources on the last release.
Query 8 http://r4.test.pyrohealth.net/fhir/Observation?subject=Patient/IHIStatusExample&_sort=-date fails I just cut and paste this query and it worked, although retunes no resources as there are no Observation resources in the server at all, I dumped all the resources on the last release.
Query 9 http://r4.test.pyrohealth.net/fhir/Observation?subject=Patient/IHIStatusExample,&_sort=-date fails Yes, it fails due to the comma on the identifier parameter.
Angus,
Thanks for the detailed response. I am aware of the search docs on the FHIR website and resource pages. There is a lot to consume there and until you test it you are never really sure. I am having issues trying to use the '_profile' search (on all servers) even though FHIR docs say this is supposed to be universal (for all resources). Documented as such
GET [base]/DiagnosticReport?_profile=http://hl7.org/fhir/StructureDefinition/lipid
But never seems to work. In any case:
I did not know you had purged the server. That answers 90% of my confusion; especially getting a response with a comma (which was supposed to be wrong) and not getting one without. I dont print the patient but I do print the observations so I never noticed that the returned patient wasn't the one I had uploaded.
Brian
From: Angus Millar notifications@github.com Sent: Sunday, April 28, 2019 8:42 PM To: angusmillar/Pyro Cc: Brian Reinhold; Author Subject: Re: [angusmillar/Pyro] Not accepting a transaction bundle (#2)
Hi Brian,
How to use search is documented in the FHIR specification here: http://hl7.org/fhir/R4/search.html, and each of the search parameters that are available for each Resource is found on each resources’ page in the specification. For instance, looking at the Patient resource found here http://hl7.org/fhir/R4/patient.html you can find all the available search parameters at the very bottom of the page under the heading “Search Parameters”.
Search - FHIR v4.0.0 - hl7.orghttp://hl7.org/fhir/R4/search.html hl7.org In addition, there is a special search parameters _query and _filter that allow for an alternative method of searching, and the parameters _format and _pretty defined for all interactions.. Also, there is a single page that lists all the search parameters.Note that search parameter names are case sensitive, though this specification never defines different parameters with names that differ ...
Let me go through each of your queries and explain what is happening in the Pyro server.
Query 1 http://r4.test.pyrohealth.net/fhir/Patient?identifier=sisansarahId,&_sort=-date Again the ‘,’ comma after the value of the identifier is the problem. It treats what is after the coma as an OR, so that is identifier=sisansarahId OR . That is an error just as this would be an error. identifier=. Actually, my server ignores ‘identifier=’ but cannot ignore the ‘identifier=sisansarahId OR ’. And again, I don’t support the ‘_sort=-date’ parameter but I do just ignore it so no error on that. Here is a tip. Use this http header ‘Prefer : handling=strict’, as documented in the FHIR spec here: http://hl7.org/fhir/R4/search.html#errors . This will force the server to report on all errors rather than just skipping each parameter that has an error. So, if you were to use this on the query above you would have gotten this message: “Unable to process a search parameter: The search parameter 'identifier' for the resource type 'Patient', was unable to be processed as expected, the whole parameter was : 'identifier=sisansarahId,'.Additional information: Unable to parse the Token search parameter value of '' as there was no Code found.,”
Query 2 http://r4.test.pyrohealth.net/fhir/Observation?subject=Patient/IHIStatusExample,&_sort=-date Again the ‘,’ comma. The error message returned here is correct but not obvious. Because of the comma, it tries to process the second value which is an empty string. It then can not find the leading Resource name and then complains about it not being there. So the correct way to make this query would be: [BaseUrl]/Observation?subject=Patient/IHIStatusExample&_sort=-date. However, I should point out that when I deployed the latest release to the Pyro server to bring in support for Version 4.0.0 of FHIR I also dumped the database. So, the server is empty, there are no Observation resources in the server at present. I will try injecting some for you.
Query 3 http://r4.test.pyrohealth.net/fhir/Subscription with JSON string {"resourceType":"Subscription","status":"requested","end":"2019-04-28T09:31:35.569-04:00","reason":"Notified of patient measurement","criteria":"Observation?_profile=http://hl7.org/fhir/uv/phd/StructureDefinition/PhdNumericObservation","channel":{"type":"rest-hook","endpoint":"http://r4.test.pyrohealth.net/fhir","payload":"application/fhir+json"}}http://hl7.org/fhir/uv/phd/StructureDefinition/PhdNumericObservation%22,%22channel%22:%7B%22type%22:%22rest-hook%22,%22endpoint%22:%22http://r4.test.pyrohealth.net/fhir%22,%22payload%22:%22application/fhir+json%22%7D%7D This is a bug in my R4.0.0 server. Between STU3 and R4 they changed the datatype of the property Subscription.channel.endpoint from the type Uri to the type Url. I have just fixed this and uploaded a new release to the GitHub repository. Will try publishing to the public server later. However, as I said earlier the server currently does not support FHIR active Subscriptions. It can consume and return Subscription resources just as it can all the other FHIR resource types. Yet it will not monitor changes in the server and notify subscribers.
Query 4 Perform a GET request to URL http://r4.test.pyrohealth.net/fhir/Patient?identifier=sisansarahId,&_sort=-date works and finds one patient No, it does not work it ignores the parameter ‘identifier=sisansarahId,’ due to the comma and therefore runs then query as http://r4.test.pyrohealth.net/fhir/Patient?_sort=-date which just retunes all Patient resources of which there is only one of as I dumped all the resources on the last release. I then added that single resource as a test.
Query 5 Perform a GET request to URL http://r4.test.pyrohealth.net/fhir/Patient?identifier=sisansarahId&_sort=-date works but finds no patients True because there is no Patient resource in the server with an identifier of ‘sisansarahId’ because I dumped all the resources on the last release.
Query 6 Perform a GET request to URL http://r4.test.pyrohealth.net/fhir/Patient?identifier=sisansarahId works but finds no patients Same as above yet with no parameter _sort. The _sort is always ignored by the server.
Query 7 This works http://r4.test.pyrohealth.net/fhir/Observation?subject=Patient/IHIStatusExample but finds no observations ( I am expecting some) There are no Observation resources in the server at all, I dumped all the resources on the last release.
Query 8 http://r4.test.pyrohealth.net/fhir/Observation?subject=Patient/IHIStatusExample&_sort=-date fails I just cut and paste this query and it worked, although retunes no resources as there are no Observation resources in the server at all, I dumped all the resources on the last release.
Query 9 http://r4.test.pyrohealth.net/fhir/Observation?subject=Patient/IHIStatusExample,&_sort=-date fails Yes, it fails due to the comma on the identifier parameter.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/angusmillar/Pyro/issues/2#issuecomment-487429243, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AJMDO65FXWW6JMRR5TKSWSDPSY765ANCNFSM4HG3KKRA.
Hi Brian, I looked into the _profile issue and fixed it. The root issue was with the SearchParameter Resource from the base R4.0.0 FHIR specification. The SearchParameter Resource for _profile was changed between STU3 and R4 to be of search parameter type Reference, from Uri in STU3. Yet in making this change no one added the appropriate target Resource element for the reference. So the SearchParameter definition does not say what Resource type the reference is to reference. It needed to state the target as StructureDefinition as all Resource.meta.profile elements must point to StructureDefinition resources.
So without this the search for _profile always failed as it could not match your search's reference Resource type which would have been StructureDefinition. It actually expected no resource type which is just wrong.
For example: [base]/Patient?_profile=https://hl7.org/fhir/uv/phd/StructureDefinition/PhdPatient
This also most likely explains why none of the other FHIR servers work because they all suffer the very same problem. I really need to report this error to the FHIR spec team.
So it is now fixed and your search below now works: [base]/Patient?_profile=https://hl7.org/fhir/uv/phd/StructureDefinition/PhdPatient
I'm going to close this issue now, but feel free to create more as you find them.
Angus,
I am at the HL7 meeting now. Tomorrow is the connectathon. I think you are right; I tried the search on other servers and it did not work.
Brian
From: Angus Millar notifications@github.com Sent: Friday, May 3, 2019 6:43 AM To: angusmillar/Pyro Cc: Brian Reinhold; Author Subject: Re: [angusmillar/Pyro] Not accepting a transaction bundle (#2)
Hi Brian, I looked into the _profile issue and fixed it. The root issue was with the SearchParameter Resource from the base R4.0.0 FHIR specification. The SearchParameter Resource for _profile was changed between STU3 and R4 to be of search parameter type Reference, from Uri in STU3. Yet in making this change no one added the appropriate target Resource element for the reference. So the SearchParameter definition does not say what Resource type the reference is to reference. It needed to state the target as StructureDefinition as all Resource.meta.profile elements must point to StructureDefinition resources.
So without this the search for _profile always failed as it could not match your search's reference Resource type which would have been StructureDefinition. It actually expected no resource type which is just wrong.
For example: [base]/Patient?_profile=https://hl7.org/fhir/uv/phd/StructureDefinition/PhdPatient
This also most likely explains why none of the other FHIR servers work because they all suffer the very same problem. I really need to report this error to the FHIR spec team.
So it is now fixed and your search below now works: [base]/Patient?_profile=https://hl7.org/fhir/uv/phd/StructureDefinition/PhdPatient
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/angusmillar/Pyro/issues/2#issuecomment-489055773, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AJMDO65XMDL74BEQ57B7UKDPTQJNJANCNFSM4HG3KKRA.
Angus,
Just tested your search solution fix for _profile and it works like a charm.
Congrats!
Let me know when you got subscriptions going. Can you support WebSockets?
Brian
I am uploading a transaction bundle containing a Device resource with property elements on the R4 server available publicly. I am getting the error DeSerialisation of a JSON to FHIR Resource failed with the following message: Encountered unknown member 'valueQuantity' while de-serializing (at path 'line 1, pos 2772'
There is no valueQuantity at that point but counting approaches may differ. The closest valueQuantity was in the Device.property element. The transaction bundle is as follows (no pretty print):
{"resourceType":"Bundle","id":"1555578973976","type":"transaction","entry":[{"fullUrl":"urn:oid:1.2.3.0","resource":{"resourceType":"Patient","meta":{"profile":["http://hl7.org/fhir/uv/phd/StructureDefinition/PhdPatient"]},"identifier":[{"type":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v2-0203","code":"MR"}],"text":"Medical record number"},"system":"urn:oid:1.2.3.4.5.6.7.8.10","value":"sisansarahId"}],"name":[{"family":"Piggy","given":["Sisansarah","Lorianthah"]}],"birthDate":"1992-11-10"},"request":{"method":"POST","url":"Patient","ifNoneExist":"identifier=urn:oid:1.2.3.4.5.6.7.8.10|sisansarahId"}},{"fullUrl":"urn:oid:1.2.3.1","resource":{"resourceType":"Device","meta":{"profile":["http://hl7.org/fhir/uv/phd/StructureDefinition/PhgDevice"]},"identifier":[{"type":{"coding":[{"system":"http://hl7.org/fhir/uv/phd/CodeSystem/ContinuaDeviceIdentifiers","code":"SYSID","display":"System Identifier"}]},"system":"urn:oid:1.2.840.10004.1.1.1.0.0.1.0.0.1.2680","value":"EC-DE-3D-4E-58-53-2D-31"}],"type":{"coding":[{"system":"urn:iso:std:iso:11073:10101","code":"531981","display":"MDC_MOC_VMS_MDS_AHD"}],"text":"MDC_MOC_VMS_MDS_AHD: Continua compliant Gateway"},"version":[{"type":{"coding":[{"system":"urn:iso:std:iso:11073:10101","code":"532352"}],"text":"MDC_REG_CERT_DATA_CONTINUA_VERSION: Continua version"},"value":"6.0"}],"property":[{"type":{"coding":[{"system":"urn:iso:std:iso:11073:10101","code":"532353"}],"text":"MDC_REG_CERT_DATA_CONTINUA_CERT_DEV_LIST: Continua certified device list"},"valueCode":[{"coding":[{"system":"http://hl7.org/fhir/uv/phd/CodeSystem/ContinuaPAN","code":"4"}]}]},{"type":{"coding":[{"system":"urn:iso:std:iso:11073:10101","code":"532355"}],"text":"MDC_REG_CERT_DATA_CONTINUA_AHD_CERT_LIST: Continua certified Health&Fitness interfaces list"},"valueCode":[{"coding":[{"system":"http://hl7.org/fhir/uv/phd/CodeSystem/ContinuaHFS","code":"0"}]},{"coding":[{"system":"http://hl7.org/fhir/uv/phd/CodeSystem/ContinuaHFS","code":"3"}]},{"coding":[{"system":"http://hl7.org/fhir/uv/phd/CodeSystem/ContinuaHFS","code":"7"}]},{"coding":[{"system":"http://hl7.org/fhir/uv/phd/CodeSystem/ContinuaHFS","code":"2"}]},{"coding":[{"system":"http://hl7.org/fhir/uv/phd/CodeSystem/ContinuaHFS","code":"6"}]}]},{"type":{"coding":[{"system":"http://hl7.org/fhir/uv/phd/CodeSystem/ASN1ToHL7","code":"532354.0","display":"regulation-status"}]},"valueCode":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v2-0136","code":"Y"}],"text":"Device is Unregulated"}]},{"type":{"coding":[{"system":"urn:iso:std:iso:11073:10101","code":"68220"}],"text":"MDC_TIME_SYNC_PROTOCOL: null"},"valueCode":[{"coding":[{"system":"urn:iso:std:iso:11073:10101","code":"532226"}],"text":"MDC_TIME_SYNC_NTPV4: NTPV4 time synchronization"}]},{"type":{"coding":[{"system":"urn:iso:std:iso:11073:10101","code":"68221"}],"text":"MDC_TIME_SYNC_ACCURACY: null"},"valueQuantity":[{"value":120000000,"code":"us"}]}]},"request":{"method":"POST","url":"Device","ifNoneExist":"identifier=urn:oid:1.2.840.10004.1.1.1.0.0.1.0.0.1.2680|EC-DE-3D-4E-58-53-2D-31"}},{"fullUrl":"urn:oid:1.2.3.2","resource":{"resourceType":"Device","meta":{"profile":["http://hl7.org/fhir/uv/phd/StructureDefinition/PhdDevice"]},"identifier":[{"type":{"coding":[{"system":"http://hl7.org/fhir/uv/phd/CodeSystem/ContinuaDeviceIdentifiers","code":"SYSID","display":"System Identifier"}]},"system":"urn:oid:1.2.840.10004.1.1.1.0.0.1.0.0.1.2680","value":"00-00-00-00-00-00-00-00"}],"type":{"coding":[{"system":"urn:iso:std:iso:11073:10101","code":"65573","display":"MDC_MOC_VMS_MDS_SIMP"}]},"specialization":[{"systemType":{"coding":[{"system":"urn:iso:std:iso:11073:10101","code":"528392"}],"text":"MDC_DEV_SPEC_PROFILE_TEMP: Thermometer"},"version":"1"}],"property":[{"type":{"coding":[{"system":"urn:iso:std:iso:11073:10101","code":"68220"}],"text":"MDC_TIME_SYNC_PROTOCOL: null"},"valueCode":[{"coding":[{"system":"urn:iso:std:iso:11073:10101","code":"532224"}],"text":"MDC_TIME_SYNC_NONE: No time synchronization"}]}]},"request":{"method":"POST","url":"Device","ifNoneExist":"identifier=urn:oid:1.2.840.10004.1.1.1.0.0.1.0.0.1.2680|00-00-00-00-00-00-00-00"}},{"fullUrl":"urn:oid:1.0.0.1","resource":{"resourceType":"Observation","meta":{"profile":["http://hl7.org/fhir/uv/phd/StructureDefinition/PhdNumericObservation"]},"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/observation-gatewayDevice","valueReference":{"reference":"urn:oid:1.2.3.1"}}],"status":"final","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/observation-category","code":"vital-signs","display":"Vital Signs"}]}],"code":{"coding":[{"system":"urn:iso:std:iso:11073:10101","code":"150364"},{"system":"http://loinc.org","code":"8310-5"}],"text":"MDC_TEMP_BODY: Body temp"},"subject":{"reference":"urn:oid:1.2.3.0"},"effectiveDateTime":"2019-04-18T05:16:13.957-04:00","valueQuantity":{"value":99.9,"system":"http://unitsofmeasure.org","code":"Cel"},"device":{"reference":"urn:oid:1.2.3.2"}},"request":{"method":"POST","url":"Observation"}}]}