Search FHIR resource by internal reference - hl7-fhir

DSTU2 documentation does not describe ability to search resources by internal references. Is there any way to find the below resource having contained Practitioner resource and internal reference on it like:
[base]/fhir/Patient?careprovider:Practitioner=ContainedId or
[base]/fhir/Patient?careprovider=ContainedId
{
"resourceType" : "Patient",
"id" : "ContainedTestPatient",
"careProvider" : [{
"reference" : "#ContainedId"
}],
"contained" : [{
"resourceType": "Practitioner",
"id": "ContainedId",
"name": {"text": "Good doctor INC"}
}]
}

Actually DSTU2 documentation does specify how to search for values in contained resources, see http://www.hl7.org/fhir/search.html#contained. It's done with a chained search and looks like this:
[base]/Patient?careprovider._id=ContainedId

Related

document field returns null when querying groups of Prismic Content-Realtionship fields in graphql

Issue:
I am using Prismic to send data through to my website.
In Prismic I have a Type (testimonial_list) that consists of a group of content-relation fields (Prismic Type testimonials).
To query the data on the inner Types I need to access them via the document field in graphql and use inline-fragments.
I have followed as instructed here:
https://github.com/angeloashmore/gatsby-source-prismic#Query-Content-Relation-fields
Inside graphql I have managed to navigate to the testimonial data-fields (on the document field) but the document field returns null, this is where I'm stuck. I can't work out why it would return null as the content exists and the fields are clearly being found in graphql.
Info:
My project is built using Gatsby and I'm using the plugin gatsby-source-prismic v3.1.1
Here you can see I can access the correct field data and I am getting the right number of nodes returned but document is empty:
This is the JSON for the testimonial_list Type on Prismic:
{
"Main" : {
"prismic_title" : {
"type" : "StructuredText",
"config" : {
"single" : "heading6",
"label" : "Title (only used to name entry in Prismic list)",
"placeholder" : "Prismic list title (otherwise \"undefined\")"
}
},
"page" : {
"type" : "Select",
"config" : {
"options" : [ "Homepage", "Option 2", "Option 3" ],
"label" : "Website page to appear on:"
}
},
"testimonial_list" : {
"type" : "Group",
"config" : {
"fields" : {
"testimonial" : {
"type" : "Link",
"config" : {
"select" : "document",
"customtypes" : [ "testimonial" ],
"label" : "testimonial"
}
}
},
"label" : "Testimonial List"
}
}
}
}
Thank you for any help, if there is any more info I can supply to help deduce the issue please let me know.
In the end, the issue turned out to be a typo in my gatsby-config where I was requiring the schema.
It was a daft mistake but stare at something too long and these things happen I guess.
In case anybody else has a similar issue you must ensure the property names of your Prismic schemas inside your gatsby-config are exactly the same as in Prismic.
For example if your Type in Prismic is called "my_type" then you must use that exact syntax - so for example don't use "myType".
Hey it might be something related to the gatsby-source-prismic plugin
I would directly open an issue for it here if I were you: https://github.com/angeloashmore/gatsby-source-prismic/issues

FHIR - Extending a operation parameter (Additional parameters in Patient Resource)

https://www.hl7.org/fhir/parameters.html
is it right to add the additional parameters in extended operation or can we add the add the parameters in patient resource type . because if we have multiple values we are not able to map the patient data with the extended operation parameter.
how to add additional parameters in patient resource type???
Short Answer:
Every element in a resource can have extension child elements to represent additional information that is not part of the basic definition of the resource.
Here is the post on HL7 FHIR with detailed info and samples on Extensibility
Every element in a resource or data type includes an optional "extension" child element that may be present , So we can add the additional parameter with an extension
Eg:
{
"resourceType" : "Patient",
"extension" : [{
"url" : "http://hl7.org/fhir/StructureDefinition/patient-citizenship",
"extension" : [{
"url" : "code",
"valueCodeableConcept" : {
"coding" : [{
"system" : "urn:iso:std:iso:3166",
"code" : "DE"
}]
}
}, {
"url" : "period",
"valuePeriod" : {
"start" : "2009-03-14"
}
}]
}]
}

Google places API - Can I separate out the output?

Hiting the endpoint:
https://maps.googleapis.com/maps/api/place/findplacefromtext/json?input=Hoboken%20NJ&fields=formatted_address,name&inputtype=textquery&key=xxxxxxxxxxxxxxxxxxx
Getting the result:
{
"candidates" : [
{
"formatted_address" : "New Jersey, USA",
"name" : "Hoboken"
}
],
"debug_log" : {
"line" : []
},
"status" : "OK"
}
What bugs me is that I can't find a way to separate out the region and country - Yes, I know I can parse the result myself. But is there an option I get shoot out to Google Places API to have the response separate out city/state(or region)/country in the returned JSON?
Something like:
{
"candidates" : [
{
"state" : "New Jersey",
"country" : "USA",
"name" : "Hoboken"
}
],
"debug_log" : {
"line" : []
},
"status" : "OK"
}
As far as I know, it isn't possible, you'll have to parse it. Places API is designed to search businesses and POIs at first place.
Google does have, however a geocoding API which seems to give out Postal Code, Country, State, Address, separetely.
There are also some free alternatives

Google place api - application specific search

I am trying to do application specific places search with google place api. Here is how I am adding a place:
Request:
{
"location": {
"lat": 37.760538,
"lng": -121.900879
},
"accuracy": 50,
"name": "p2p",
"types": ["other"]
}
I get success response as shown below:
Response:
{
"id" : "dfe583b1ac058750cf524f958afc5e82ade455d7",
"place_id" : "qgYvCi0wMDAwMDBhNWE4OWU4NTMzOjgwOGZlZTBhNjI3OjBjNTU1OTU4M2Q2NDI5YmM",
"reference" : "CkQxAAAAsPE72V-jhHUjj6vPy2HdC__2MhAdXanL6mlFBA4bcayRabKyMlfKFiah7U2vkoCj1P_0w9ESFSv5mfDkyufaZhIQTHBHY_jPGRHEE3EmEAGElhoUXTSylMslwHSTK5tYdstW2rOZKbw",
"scope" : "APP",
"status" : "OK"
}
When I search for this place using radar search, I get ZERO_RESULTS.
Request:
https://maps.googleapis.com/maps/api/place/radarsearch/json?key=key&radius=5000&location=37.761926,-121.891856&keyword=p2p
Response:
{
"html_attributions": [ ],
"results": [ ],
"status": "ZERO_RESULTS"
}
Is there something that I am doing the right way? Please help.
Thanks & Regards,
--Rajani
Your scope is "APP". That means you can access it (via PlaceID) from the application that created the entry only. If the location passes Google's moderation process, then it will gain scope "GOOGLE" and be accessible from the general searches.
scope — Indicates the scope of the place_id. The possible values are:
APP: The place ID is recognised by your application only. This is because your
application added the place, and the place has not yet
passed the moderation process.
GOOGLE: The place ID is available to other applications and on Google Maps.
Note: The scope field is included only in Nearby Search results and
Place Details results. You can only retrieve app-scoped places via the
Nearby Search and the Place Details requests. If the scope field is
not present in a response, it is safe to assume the scope is GOOGLE.
See: https://developers.google.com/places/documentation/search

How to differentiate between stock symbols with same name in Google stock API

I am using the following Google rest API to get stock data for a given symbol SYMBOL.
https://www.google.com/ig/api?stock=<SYMBOL NAME>
But there are certain symbols like "TCS" which has multiple company names in different parts of the world.eg: TECSYS Ltd in TSE and Tata Consultancy Services iN NSE.
How do I alter the query to get the TCS data in NSE stock Exchange.
Also is there any way to get the list of available symbols from Google?
This answer is in regard to #Ashwin 's bounty:
The URL provided by #Rockstart is part of Google's deprecated Finance / iGoogle API. It's been deprecated for several years.
However, as of July 2014, there is another method that still works - though it is also part of the deprecated finance API, so it probably won't stick around forever.
The method to get a specific stock is to add the stock exchange's name to the call:
http://www.google.com/finance/info?q=NYSE:TCS
As of the time I posted this answer, this response is returned:
// [ { "id": "348018767532275" ,"t" : "TCS" ,"e" : "NYSE" ,"l" : "20.67" ,
"l_fix" : "20.67" ,"l_cur" : "20.67" ,"s": "0" ,"ltt":"4:01PM EDT" ,
"lt" : "Jul 25, 4:01PM EDT" ,"lt_dts" : "2014-07-25T16:01:16Z" ,
"c" : "-0.33" ,"c_fix" : "-0.33" ,"cp" : "-1.57" ,"cp_fix" : "-1.57" ,
"ccol" : "chr" ,"pcls_fix" : "21" } ]
Regarding the second question, you may use
https://www.google.com/finance/match?matchtype=matchall&q=tcs
to get a list of symbols with "TCS" in their name, e.g.
{
"matches": [
{
"t": "TCS",
"n": "Tata Consultancy Services Limited",
"e": "NSE",
"id": "784961"
},
{
"t": "TCS",
"n": "Container Store Group Inc",
"e": "NYSE",
"id": "348018767532275"
},
'*snip*...'
]
}
And then you may use #Andy's call to get information about a symbol in a specific exchange.

Resources