I want to retrieve the procedure having an identifier with value 2266 and type.coding.code of "RI"
The identifier part of the procedure looks like this:
"identifier": [
{
"use": "usual",
"type": {
"coding": [
{
"system": "http://hl7.org/fhir/v2/0203",
"code": "RI"
}
],
"text": "RI"
},
"system": "http://hl7.org/fhir/v2/0203",
"value": "2266"
},
{
"use": "usual",
"type": {
"coding": [
{
"system": "http://hl7.org/fhir/v2/0203",
"code": "PLAC"
}
],
"text": "PLAC"
},
"system": "http://hl7.org/fhir/v2/0203",
"value": "procId69"
}
],
Searching with:
Procedure?identifier=2266
return the procedure, but I cant be sure that it has the correct code.
Referring to the search doc https://www.hl7.org/fhir/search.html#token I tried
Procedure?identifier:of-type=http://hl7.org/fhir/v2/0203|RI|2266
But it doesn't work for me, nothing is returned. Whats the correct syntax for the query ?
Thank you
Your of-type syntax is correct. Are you sure the server in question supports the of-type qualifier? (It's a new capability and not a lot of servers support it yet.)
Related
I am currently using micro soft's speech studio to create a simple chat bot. For all my questions, I need to add a confirmation rule to ask if they need further assistance getting to the location they are looking for. However after it gets to the last part of the speech command it keeps saying the speech 2 times instead of just that once. For example, for this question on where chambers b is for example, it will say the speech response twice instead of just that once that it used to output just 2 days back.
the example sentences page
this is my confirmation command in the speech studio to ask whether they need assistance getting to the location
this is my successful command assuming the user says yes during the confirmation stage
However the issue came about just yesterday when I was testing the chatbot. I got this output during testing: "Sure, please follow me now" twice instead of just once that I needed.
this is what came up during the testing phase. As you can see it said sure please follow me now 2 times instead of just that 1 time that I needed
Thanks for reaching out.
The configuration in the screenshots look OK.
I created a confirmation example to verify the behavior and I was not able to reproduce this with the windows client (same you used in your screenshots).
Here is the sample app you can import to try it out.
{
"entityResolver": {
"searchConfiguration": {
"maxEdits": 0
},
"type": "internal",
"isGenerated": true
},
"minIntentConfidence": 0.4,
"highIntentConfidence": 0.8,
"lgTemplates": [
"# FallbackResponse",
"- Add your fallback message here",
"# TestCommand-MyNumber",
"- what number?",
"# TestCommand-27dfe650040311ebb2dccf4459b3ff8b",
"- confirmed.",
"# TestCommand-3228f4d0040311ebb2dccf4459b3ff8b",
"- denied.",
"# TestCommand-4ea19f40040311ebb2dccf4459b3ff8b",
"- sure?"
],
"type": "BaseLanguage",
"recognizer": {
"application": "",
"isStaging": false,
"versionId": "0.1",
"type": "luis"
},
"speechOutput": {
"font": "Microsoft Server Speech Text to Speech Voice (en-US, Aria24kRUS)",
"locale": "en-US"
},
"webEndpoints": [],
"globalParameters": [],
"commands": [
{
"name": "FallbackCommand",
"completionStrategy": "OnRequiredParameters",
"parameters": [],
"rules": [],
"completionRules": [
{
"name": "DefaultResponse",
"conditions": [
{
"type": "True"
}
],
"actions": [
{
"type": "SpeechResponse",
"response": {
"type": "Template",
"templateName": "# FallbackResponse"
}
}
],
"postExecutionState": "None"
}
],
"triggeringExamples": [
"> - You can start sentences with '>' to add comments.",
"> - You can also use parameters by adding the name of the parameter within curly braces, i.e.",
"> Set an alarm to {YourDateParameterName}",
"> Where YourDateParameterName is the name of a parameter defined in the 'Parameters' section.",
"Help",
"Help me",
"What can you do?",
"How can I start?",
"Hello",
"Hi"
],
"multiTurnExamples": []
},
{
"name": "TestCommand",
"completionStrategy": "OnRequiredParameters",
"parameters": [
{
"name": "MyNumber",
"type": {
"name": "Number"
},
"elicitResponse": {
"type": "Template",
"templateName": "# TestCommand-MyNumber"
}
}
],
"rules": [
{
"name": "Confirm command",
"conditions": [
{
"type": "AllRequiredParameters"
}
],
"actions": [
{
"type": "SpeechResponse",
"response": {
"type": "Template",
"templateName": "# TestCommand-4ea19f40040311ebb2dccf4459b3ff8b"
}
}
],
"nextTurnExpectations": [
{
"type": "Confirmation"
}
],
"postExecutionState": "WaitForInput"
},
{
"name": "Confirmation succeeded",
"conditions": [
{
"type": "SuccessfulConfirmation"
}
],
"actions": [
{
"type": "SpeechResponse",
"response": {
"type": "Template",
"templateName": "# TestCommand-27dfe650040311ebb2dccf4459b3ff8b"
}
}
],
"nextTurnExpectations": [],
"postExecutionState": "ReadyForCompletion"
},
{
"name": "Confirmation denied",
"conditions": [
{
"type": "DeniedConfirmation"
}
],
"actions": [
{
"type": "SpeechResponse",
"response": {
"type": "Template",
"templateName": "# TestCommand-3228f4d0040311ebb2dccf4459b3ff8b"
}
}
],
"nextTurnExpectations": [],
"postExecutionState": "CompleteCommand"
}
],
"completionRules": [
{
"name": "Done",
"conditions": [
{
"type": "True"
}
],
"actions": [],
"nextTurnExpectations": [],
"postExecutionState": "CompleteCommand"
}
],
"triggeringExamples": [
"number {MyNumber}",
"my number is {MyNumber}"
]
}
]
}
And here is a sample output with the windows client.
Sample output
Hope this help! o.w. If you could clone your application and provide a stripped-down version with the failure and we'll be happy to help you troubleshoot further.
Have built an Azure logic app with a HTTP trigger that receives a JSON file, provides a response, then attempts to send the payload to a Service Bus queue. Kept getting an status 400 error, so tried adding a parse JSON step, however am getting an invalid template per shot below.
Azure logic app
parse JSON error
The response is working correctly, with the payload being correctly displayed at the initiating website.
successful response
The JSON data in the schema is as follows. EDIT: Revised schema to include "null" per Rick's suggestion below.
{
"items": {
"properties": {
"Entry Price": {
"type": [
"string",
"null"
]
},
"Exit Price": {
"type": [
"string",
"null"
]
},
"Gain $": {
"type": [
"string",
"null"
]
},
"New Stop": {
"type": [
"string",
"null"
]
},
"ReceivedDate": {
"type": [
"string",
"null"
]
},
"ReceivedTime": {
"type": [
"string",
"null"
]
},
"Status": {
"type": [
"string",
"null"
]
},
"Stop": {
"type": [
"string",
"null"
]
},
"Symbol": {
"type": [
"string",
"null"
]
},
"Tranche": {
"type": [
"string",
"null"
]
}
},
"required": [
"Symbol",
"Status",
"ReceivedDate",
"ReceivedTime"
],
"type": "object"
},
"type": "array"
}
I have spent days looking at forums and trying a number of suggested fixes, however am unable to get the app to execute without error.
Appreciate any ideas or suggestions to fix. Thanks.
It looks like you are passing in a null value for the property content, while the schema has it as a required property.
You can solve this by changing the definition in the schema for content to be as follows:
"content":{
"type":[
"string",
"null"
]
}
More information (and source) here: Parsing JSON with null-able properties in Logic Apps
There is also default values, that could be considered, but everything depends on the context your logic app operates in.
I'm using Microsoft.Skills.Text.EntityRecognitionSkill in my skillset which output "Person", "Location", "Organization".
however I want to only output Location that have a confident level > .5
is there a way to do that?
here is a snap of my code
{
"#odata.type": "#Microsoft.Skills.Text.EntityRecognitionSkill",
"categories": [
"Person",
"Location",
"Organization"
],
"context": "/document/finalText/pages/*",
"inputs": [
{
"name": "text",
"source": "/document/finalText/pages/*"
},
{
"name": "languageCode",
"source": "/document/languageCode"
}
],
"outputs": [
{
"name": "persons",
"targetName": "people"
},
{
"name": "locations"
},
{
"name": "namedEntities",
"targetName": "entities"
}
]
},
[Edited based on Mick's comment]
Yes, this should be possible by setting the minimumPrecision parameter of the entity recognition skill to 0.5, which will result in entities whose confidence is >= 0.5 to be returned.
The documentation for entity recognition skill is here: https://learn.microsoft.com/en-us/azure/search/cognitive-search-skill-entity-recognition
As Mick points out, the documentation says minimumPrecision is unused, however that documentation is out of date and I will fix it soon.
I am trying to get data using elastic search in a python program. Currently I am getting the following data from an elastic search request. I wish to sort the data on rank:type. For example i want to sort data by raw_freq or maybe by score.
What should the query look like?
I believe it will be something using nested query. Help would be very much appreciated.
{
"data": [
{
"customer_id": 108,
"id": "Qrkz-2QBigkG_fmtME8z",
"rank": [
{
"type": "raw_freq",
"value": 2
},
{
"type": "score",
"value": 3
},
{
"type": "pmiii",
"value": 1.584962
}
],
"status": "pending",
"value": "testingFreq2"
},
],
}
Here is a simple example of how you can sort your data:
"query": {
"term": {"status": "pending"}
},
"sort": [
{"rank.type.keyword": {"order" : "desc"}}
]
Is dynamic mapping for geo point still working in Elastic Search 2.x/5.x?
This is the template:
{
"template": "*",
"mappings": {
"_default_": {
"dynamic_templates": [
{
"geo_point_type": {
"match_mapping_type": "string",
"match": "t_gp_*",
"mapping": {
"type": "geo_point"
}
}
}
]
}
}
}
This is the error I get when I query the field:
"reason": "failed to parse [geo_bbox] query. field [t_gp_lat-long#en] is expected to be of type [geo_point], but is of [string] type instead"
I seems to remember that I saw somewhere in the documentation that this doesn't work, but I thought that's only when there is no dynamic template at all.
Any idea?
Update 1
Here's a sample of the document. The actual document is very big so I took the only relevant part of it.
{
"_index": "route",
"_type": "route",
"_id": "583a014edd76239997fca5e4",
"_score": 1,
"_source": {
"t_b_highway#en": false,
"t_n_number-of-floors#en": 33,
"updatedBy#_id": "58059fe368d0a739916f0888",
"updatedOn": 1480196430596,
"t_n_ceiling-height#en": 2.75,
"t_gp_lat-long#en": "13.736248,100.5604997"
}
}
Data looks correct to me since you can also index Geo Point field with lat/long string.
Update 2
Mapping is definitely wrong. That's why I'm wondering if you can dynamically map Geo Point field.
"t_gp_lat-long#en": {
"type": "string",
"fields": {
"english": {
"type": "string",
"analyzer": "english"
},
"raw": {
"type": "string",
"index": "not_analyzed",
"ignore_above": 256
}
}
},