In my application I want to use FHIR Questionnaire resource.
On the server side I am trying to generate questionnaire with different types of questions and send it to the application where user (patient) can fill in answers and send them back.
However in some cases I would like from user to answer only specific questions of the questionnaire and not all of them. For example if questionnaire consists of two questions:
Do you smoke or drink alcohol?
Measure your heart rate.
I would like that user answers second question only if he has answered on the first question with 'yes'. The second question is skipped if he has answered 'no'.
The problem is that I do not know how to add these rules, which will tell which question is next, inside the Questionnaire resource.
I came along to some extensions like ordinalValue, but I couldn't find out how/where to use them and where to define if user's answer must be equal / less / greater than some value.
So I would like to know which extension i need to use (and how) to achieve what I've written before? Is this even possible with existing extensions or I would have to define a new one?
I am adding simple representation (with only relevant data) of mentioned questionnaire in the JSON form:
{
"resourceType": "Questionnaire",
...
"item": [
{
"linkId": "1",
"text": "Do you smoke or drink alcohol?",
"type": "boolean"
<< ??? extension ???>>
},
{
"linkId": "2",
"text": "Measure your heart rate.",
"type": "integer"
}]
}
You could use the Questionnaire.item.enableWhen element for this:
{
"linkId": "2",
"text": "Measure your heart rate.",
"type": "integer"
"enableWhen": [{
"question": "1",
"answerBoolean": "true",
}
],
}
Related
There is no dynamic content you can get from the SurveyMonkey trigger in Power Automate except for the Analyze URL, Created Date, and Link. Is it possible I could retrieve the data with an expression so I could add fields to SharePoint or send emails based on answers to questions?
For instance, here is some JSON data for a county multiple choice field, that I would like to know the county so I can have the email sent to the correct person:
{
"id": "753498214",
"answers": [
{
"choice_id": "4963767255",
"simple_text": "Williamson"
}
],
"family": "single_choice",
"subtype": "menu",
"heading": "County where the problem is occurring:"
}
And basically, a way to create dynamic fields from the content so it would be more usable?
I am a novice so your answer will have to assume I know nothing!
Thanks for considering the question.
Overall, anything I have tried is unsuccessful!
I was able to get an answer on Microsoft Power Users support.
Put this data in compose action:
{
"id": "753498214",
"answers": [
{
"choice_id": "4963767255",
"simple_text": "Williamson"
}
],
"family": "single_choice",
"subtype": "menu",
"heading": "County where the problem is occurring:"
}
Then these expressions in additional compose actions:
To get choice_id:
outputs('Compose')?['answers']?[0]?['choice_id']
To get simple_text:
outputs('Compose')?['answers']?[0]?['simple_text']
Reference link here where I retrieved the answer is here.
https://powerusers.microsoft.com/t5/General-Power-Automate/How-to-write-an-expression-to-retrieve-answer/m-p/1960784#M114215
I apologize for my silly question, but as always being a newbie to some new SW stack it is hard to find an exact answer quickly. So please help.
Question 1:
I have many documents of the following shape. Quite simple, description of a company and some products that a company offers. The question is how to post this document into elasticsearch(ES)? Because nested structures have some important sense, but ES does not eat it as is.
Question 2:
It is about search request itself. I need to search through all such documents looking for appropriate phrase in the field "description" and also looking for particular type of products.
For example, I need to find all companies with description which includes phrase "South Africa", which offer fruits and in the same time offer only onions from vegetable category.
Field "description" is just text. When everything is under products is pre-defined known lists. There are can be many many different categories and names under categories.
What could be search request in such case?
{
"description": "The best goods from Africa",
"products": [
{
"category": "fruits",
"name": [ "oranges", "cocos" ]
},
{
"category": "vegetables",
"name": [ "cabbage", "cucumbers", "onion" ]
},
...
]
}
We have different categories of questions in our questionnaires: goals, observations, etc.. I am wondering what the best way to tag individual questions with these labels is. I am considering using Questionnaire.item.code and inserting something of the form {"display": "observation"}
E.g.
{
..
"item": [
{
"linkId": "LittleInterest",
"code": [
{
"system": "http://loinc.org",
"code": "44250-9"
},
{
"display": "observation"
}
],
"text": "Little interest or pleasure in doing things",
"type": "choice",
"required": true,
"answerValueSet": "http://loinc.org/vs/LL358-3"
},
..
}
Is this bad practice? Is there a better way of capturing the question category at the question level?
Putting 'computable' information in display is bad practice. Display is intended for humans, not computation. Also, item.code represents is supposed to refer to a code that represents the full meaning of the question (and 'display' is the official display name for that code). So the meaning isn't what you want.
There's no "standard" way to categorize Questionnaire items. Your best solution would be to define a custom extension.
i want to create an chat bot which can track packages (and many things more). I'm kinda new to all these intents and entities things. My goal to achive is that if i say to the chatbot "track the package [PACKAGEID]" or "could you please find [PACKAGEID] for me?" and than luis should return the intent and the [PACKAGEID]. Is this possible? Or if not, is there something else i can use (best would be if this is from microsoft, because of business stuff... yay)
kind regards,
me.... hey!
To achieve your requirement, you can try the following steps:
1)Add a simple entity named PackageID
2)Add a phrase list for PackageID(s)
3)Add a intent named FindPackage and add some example utterances, and then label entity in utterance.
4)Train (and publish) the app
Test result:
Note:
I'm kinda new to all these intents and entities things.
You can get more information about key concepts of LUIS app in LUIS documentation.
If you know all possible formats of the "PACKAGEID" then you may use Entity of type "Regex"
1) click at
2) Create Regex definition. Example below matches all PACKAGEID-s
starting by "KQ" then followed by 8 to 10 numbers, ending by "DE"
3) If you try sentence "could you please find kq123456789de for me?" then you get following result
{
"query": "could you please find kq123456789de for me?",
"topScoringIntent": {
"intent": "Status",
"score": 0.9369452
},
"intents": [
{
"intent": "Status",
"score": 0.9369452
},
...
],
"entities": [
{
"entity": "kq123456789de",
"type": "PACKAGEID",
"startIndex": 22,
"endIndex": 34
}
]
}
I may be over thinking this a bit. On my web site, I would like to user certain data from my public google calendar. My plan is to pull it on the server side so I can do things like process it, cache it and format it the way I want.
I've been looking at using the Google Api libraries, but I can't get past any of the authorization hurdles. A service account sounds like what I really want, but I'm having trouble wrapping my head around how that works in this situation.
The old GDATA apis would be ok, but I'm not very keen on using them because they look fairly deprecated at this point by the newer libraries.
Since it is all public data, I'm hoping there is a simpler way to get to the event data that I'm looking for.
In case it matters, my site is Asp.Net (MVC).
Update
Ok, I was definitely way over thinking it. See my answer.
Now that RSS has been removed from Google Calendar, I've been in search of an easy replacement. I dug around and found the following in the Google Calendar API that seems to do the trick: calendar.events.list
Calendar Events List in Google API Explorer is a good place to get started with the different parameters and options - and it'll build you an example request string. You can see that I specified a minimum time of 2/5/2016, sort it by the start time, and show deleted events.
GET https://www.googleapis.com/calendar/v3/calendars/[CALENDAR ID HERE]/events?
orderBy=startTime&showDeleted=true&singleEvents=true&
timeMin=2016-02-05T00%3A00%3A00Z&key={YOUR_API_KEY}
Results are in JSON so you can parse it in your favorite programming language, ASP.NET or whatever. Result looks like:
{
"kind": "calendar#events",
"etag": "\"123456789123456\"",
"summary": "My Public Calendar",
"updated": "2016-01-29T14:38:29.392Z",
"timeZone": "America/New_York",
"accessRole": "reader",
"defaultReminders": [ ],
"items": [ {
"kind": "calendar#event",
"etag": "\"9876543210987654\"",
"id": "sfdljgsdkjgheakrht4sfdjfscd",
"status": "confirmed",
"htmlLink": "https://www.google.com/calendar/event?eid=sdgtukhysrih489759sdkjfhwseihty7934hyt94hdorujt3q95uy689u9yhfdgnbiwe5hy",
"created": "2015-07-06T16:21:59.000Z",
"updated": "2015-07-06T16:21:59.329Z",
"summary": "In-Service Day",
"location": "Maui, HI",
"creator": {
"email": "abra#cadabra.com",
"displayName": "Joe Abra"
},
"organizer": {
"email": "cadabra.com_sejhrgtuiwerghwi4hruh#group.calendar.google.com",
"displayName": "My Public Calendar",
"self": true
},
"start": {
"date": "2016-02-08"
},
"end": {
"date": "2016-02-09"
},
"transparency": "transparent",
"iCalUID": "isdt56y784g78ty86tgsfdgh#google.com",
"sequence": 0
},
{
...
}]
}
One good answer to this (the one I'm going with) is to simply use the calendar's public address to get the data. This is an option that I had forgotten about and it works fine for this particular situation.
You can find the url for the data if you go to the settings for a particular calendar and pick the format you want (I went with xml for this situation.)
The data that you get out of this service is very human-reader optimized, but I can make it work for what I'm doing.