How can i create FHIR ValueSet with hierarchical content? - hl7-fhir

I want create ValueSet with link to my CodeSystem.
ValueSet expantion with enclosed contains should be like:
{
...
"expansion": {
"parameter": [
{
"name": "total",
"valueString": "282"
}
],
"contains": [
{
"code": "0",
"display": "asd",
"contains": [
{
"code": "High"
},
{
"code": "Okso",
"display": "1"
}
]
}
]
}
...
}
I tried to create CodeSystem with hierarchical concepts, and ValueSet with compose.include to my CodeSystem. But i getted expantion with 1 level contents like this:
"contains": [
{
"code": "0",
"display": "asd"
}, {
"code": "High"
}, {
"code": "Okso",
"display": "1"
}
]
I tried change different attributes CodeSystem, but this bring me no result.
Help me please with a simple example!

Related

Going from a flat stucture to a hierarchy using jsonata

I am tryig to use jsonata to to transform a flat json result set to something that aggregates some items and creates arrays.
Any advice on how I go from a source like this
`
{
"name": "myname",
"payload": [
{
"role": "Testrole 1",
"permission": "Testpermission 1"
},
{
"role": "Testrole 1",
"permission": "Testpermission 2"
},
{
"role": "Testrole 2",
"permission": "Testpermission 3"
}
]
}
`
to a target like this
`
{
"name": "myname",
"roles": [
{
"rolename": "Testrole 1",
"permissions": [
{
"permissionname": "Testpermission 1"
},
{
"permissionname": "Testpermission 2"
}
]
},
{
"rolename": "Testrole 2",
"permissions": [
{
"permissionname": "Testpermission 3"
}
]
}
]
}
`
I've checked the jsonata documentation but cannot find a good way to achieve this.
You can use the reduce operator to group by a role as described in the Grouping docs here, and then map it to your desired shape:
{
"name": name,
"roles": payload{
role: permission
} ~> $each(function($permissions, $role) {
{
"rolename": $role,
"permissions": $permissions.{ "permissionname": $ }
}
})
}
Live example on the playground: https://stedi.link/WFEPgxp

Google Ads API - Optimize Campaign By Specific Conversion Action(s)

I am using Google Ads PHP library to create Campaign.
I created almost any type of campaigns but didn't manage to optimize them by specific Conversion Actions.
For example:
I have created 3 different Conversion Actions:
customers/[CUSTOMER_ID]/conversionActions/[CONVERSION_ACTION_ID_0]
customers/[CUSTOMER_ID]/conversionActions/[CONVERSION_ACTION_ID_1]
customers/[CUSTOMER_ID]/conversionActions/[CONVERSION_ACTION_ID_2]
Then I created a Campaign:
customers/[CUSTOMER_ID]/campaigns/[CAMPAIGN_ID]
I set bidding strategy to MAXIMIZE_CONVERSIONS and then tried to set Conversion Actions to optimize to.
This is my code snippet:
$campaign->setMaximizeConversions(
new CommonMaximizeConversions([
'target_cpa' => $this->convert()->micros(1)
])
);
$campaign->setSelectiveOptimization(
new SelectiveOptimization([
'conversion_actions' => [
'customers/[CUSTOMER_ID]/conversionActions/[CONVERSION_ACTION_ID_0]',
'customers/[CUSTOMER_ID]/conversionActions/[CONVERSION_ACTION_ID_1]'
]
])
);
It gives me this error:
{
"message": {
"message": "Request contains an invalid argument.",
"code": 3,
"status": "INVALID_ARGUMENT",
"details": [
{
"#type": "type.googleapis.com/google.ads.googleads.v10.errors.GoogleAdsFailure",
"errors": [
{
"errorCode": {
"requestError": "UNKNOWN"
},
"message": "The error code is not in this version.",
"trigger": {
"stringValue": ""
},
"location": {
"fieldPathElements": [
{
"fieldName": "operations",
"index": 0
},
{
"fieldName": "create"
},
{
"fieldName": "selective_optimization"
},
{
"fieldName": "conversion_actions"
}
]
}
}
],
"requestId": "xbgMUFFeP4447GFW_nJrIA"
}
]
},
}
Can you tell me what I am doing wrong? Or suggest any help?.
Thanks.

FHIR to OMOP Mapping Question: Blood pressure systolic and diastolic with unmapped, not valid code (55284-4)

There is a LOINC concept 55284-4 that appears in some FHIR resources, for example:
https://syntheticmass.mitre.org/v1/fhir/Patient/0000aa42-c235-4447-8389-8a2640f44466/$everything
This code is for "Blood pressure systolic and diastolic" and is in the OMOP concept table as shown below.
This concept is not a standard concept, is not a valid concept (from OMOP's perspective) and does not have a mapping to any standard concept in OMOP.
This concept appears in the FHIR resource in the snippet shown below (from the synthmass url shown above).
What records should be created in OMOP to represent the snippet shown below?
"resource": {
"category": [
{
"coding": [
{
"code": "vital-signs",
"display": "vital-signs",
"system": http://hl7.org/fhir/observation-category
}
]
}
],
"code": {
"coding": [
{
"code": "55284-4",
"display": "Blood Pressure",
"system": http://loinc.org
}
],
"text": "Blood Pressure"
},
"component": [
{
"code": {
"coding": [
{
"code": "8462-4",
"display": "Diastolic Blood Pressure",
"system": http://loinc.org
}
],
"text": "Diastolic Blood Pressure"
},
"valueQuantity": {
"code": "mmHg",
"system": http://unitsofmeasure.org,
"unit": "mmHg",
"value": 84.88290301982099
}
},
{
"code": {
"coding": [
{
"code": "8480-6",
"display": "Systolic Blood Pressure",
"system": http://loinc.org
}
],
"text": "Systolic Blood Pressure"
},
"valueQuantity": {
"code": "mmHg",
"system": http://unitsofmeasure.org,
"unit": "mmHg",
"value": 117.69213707496547
}
}
],
"context": {
"reference": "Encounter/52430cb1-a0d3-4d1e-926c-c878c218502e"
},
"effectiveDateTime": "2018-05-06T04:07:24-04:00",
"id": "186e8672-f9ac-4419-8c5d-1e824bf6e536",
"issued": "2018-05-06T04:07:24.278-04:00",
"meta": {
"lastUpdated": "2019-04-09T08:36:08.363897+00:00",
"versionId": "MTU1NDc5ODk2ODM2Mzg5NzAwMA"
},
"resourceType": "Observation",
"status": "final",
"subject": {
"reference": "Patient/0000aa42-c235-4447-8389-8a2640f44466"
}
}
EDIT: ADDITIONAL INFORMATION
It looks like these are probably commonly used concepts for blood pressure in OMOP
select
*
from
concept
where 1=1
and (
lower(concept_name) = 'systolic blood pressure' or
lower(concept_name) = 'diastolic blood pressure')
and domain_id = 'Measurement'
and standard_concept = 'S';
And there are lots of other potential candidates (about 380 of them):
select
*
from
concept
where 1=1
and lower(concept_name) like '%blood pressure%'
and domain_id = 'Measurement'
and standard_concept = 'S';
I would map it the same as if it was LOINC code 85354-9. However, you should file an issue with Synthea because using the code 55284-4 without also having a translation of 85354-9 is non-conformant. (All FHIR conformant systems conveying a combined 'blood pressure' Observation are required to adhere to this profile, which mandates the 85354-9 code.)

Asymmetrik FHIR Server Core support FHIRCast?

I have established a "subscription" to updates on a specific "Bundle". For some reason, the web hook is not firing. Is FHIRCast supported on Asymmetrik's FHIR Server? Here is my "subscription" json payload:
{
"resourceType" : "Subscription",
"status" : "active",
"contact": [
{
"relationship": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0131",
"code": "N"
}
]
}
],
"name": {
"family": "du Marché",
"_family": {
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/humanname-own-prefix",
"valueString": "VV"
}
]
},
"given": [
"Bénédicte"
]
},
"telecom": [
{
"system": "phone",
"value": "+33 (237) 998327"
}
],
"address": {
"use": "home",
"type": "both",
"line": [
"534 Erewhon St"
],
"city": "PleasantVille",
"district": "Rainbow",
"state": "Vic",
"postalCode": "3999",
"period": {
"start": "1974-12-25"
}
},
"gender": "female",
"period": {
"start": "2012"
}
}
],
"end" : "2021-02-07T13:28:17.239+02:00",
"reason" : "FHIR web hook",
"criteria" : "Bundle/af03af555d9eb78229619cfeac8767409fd22f72",
"error" : "error note",
"channel" : {
"type" : "rest-hook",
"endpoint" : "https://localhost:5001/api/FHIRNotification",
"payload" : "application/fhir+json",
"header" : [""]
}
}
Perhaps I am missing an implementation step to add the subscription web hook functionality?
Thanks for the help!
Todd
Currently we do not support FHIRCast out of the box since this is a facade server. To get FHIRCast working properly you would also probably need triggers or something else setup on the database.
Im not super familiar with FHIRCast personally but it does seem like there is some connection to a hub separate of the FHIR server as well.

How to group by Graphql query result

I have a following GraphQL query
query {
Result: querydata {
name
code
description
}
}
that returns me the following data
{
"data": {
"Result": [
{
"name": "Class1",
"code": "ST1",
"description": "Value"
},
{
"name": "Class1",
"code": "ST2",
"description": "Value"
},
{
"name": "Class2",
"code": "FS1",
"description": "Value"
},
{
"name": "Class2",
"code": "FS2",
"description": "Value"
}
]
}
}
In this data, I have a name field that either be "Class1" or "Class2". I wan't to group this data in a way that I can have Class1 and Class2 data separated. Is there any way of doing this. I could have achieved this by running 2 separate queries by providing a name filter but lets say I don't have that option.
I want to transform the result as follow
{
"data": {
"Result": [
"Class1": [
{
"code": "ST1",
"description": "Value"
},
{
"code": "ST2",
"description": "Value"
}
]
"Class2": [
{
"code": "FS1",
"description": "Value"
},
{
"code": "FS2",
"description": "Value"
}
]
]
}
}
What you are describing is something that should either happen on the client side or allow your query type to receive a name option that you use to return the propper class, then the query below would work for what you are needing assuming it was able to lookup the name of the querydata
query {
Class1: querydata(name: "Class1") {
code
description
}
Class2: querydata(name: "Class2") {
code
description
}
}

Resources