FHIR CodableConcept - All elements must be from ValueSet - Writing Profile Differential - hl7-fhir

I want to create a profile from base Observation, in that all code elements must be from the ValueSet. For example:
{
"resourceType": "Observation",
"id": "example",
"meta": {
"profile": ["http://my.own.profile/StructureDefinition/custom-observation-profile"]
}
...
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "8867-4",
"display": "Body Weight"
},
{
"system": "http://loinc.org",
"code": "9843-4",
"display": "Body Weight"
}
]
},
...
All the elements from code.coding should be from a valueset, lets say http://my.value.set
In the differential, I have the following:
{
"id": "Observation.code",
"path": "Observation.code",
"short": "Body Weight",
"type": [
{
"code": "CodeableConcept"
}
],
"binding": {
"strength": "required",
"description": "All LOINC values whose SCALE is DOC in the LOINC database and the HL7 v3 Code System NullFlavor concept 'unknown'",
"valueSet": "http://my.value.set"
}
},
But this one is validating only the first element in the list. It does not validate the other ones. It ignores even if they are invalid.
The list can be 1..*, and I want all of them should be from the valueSet.
How do I write differential for this one?

The expectation when there's a required binding on a CodeableConcept is that one of the CodeableConcept.coding repetitions must come from the binding. There's no requirement that the others must - and the primary use for additional codings is that you don't want them to be from the same value set. The purpose of additional codings is to convey other codes from other code systems that also convey the same meaning (so that other recipients of the instance who might not necessarily recognize the code preferred by your profile can still find a code they recognize - and also so that the 'original' coding can be retained in cases where that isn't from the bound value set).
If you truly want to force all CodeableConcept.coding repetitions to be from a single value set (strongly discouraged and likely to impede interoperability), you could declare a binding on Observation.code.coding.

Related

Get files from Sharepoint after doing a Filter on Array

The problem I am having is :
Sharepoint Get File Files (Properties Only) can only do one filter for ODATA, not a a second AND clause so I need to use Filter Array to make secondary filter work. And it does work....
But now I need to take my filtered array and somehow get the {FullPath} property and get the file content via passing a path and I get this error...
[ {
"#odata.etag": ""1"",
"ItemInternalId": "120",
"ID": 120,
"Modified": "2022-03-21T15:03:31Z",
"Editor": {
"#odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
"Claims": "i:0#.f|membership|dev#email.com",
"DisplayName": "Bob dole",
"Email": "dev#email.com",
"Picture": "https://company.sharepoint.us/sites/devtest/_layouts/15/UserPhoto.aspx?Size=L&AccountName=dev#email.com",
"Department": "Information Technology",
"JobTitle": "Senior Applications Developer II"
},
"Editor#Claims": "data",
"Created": "2022-03-21T15:03:31Z",
"Author": {
"#odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
"Claims": "i:0#.f|membership|dev#email.com",
"DisplayName": "Bob Dole",
"Email": "dev#email.com",
"Picture": "https://company.sharepoint.us/sites/devtest/_layouts/15/UserPhoto.aspx?Size=L&AccountName=dev#email.com",
"Department": "Information Technology",
"JobTitle": "Senior Applications Developer II"
},
"Author#Claims": "i:0#.f|membership|dev#email.com",
"OData__DisplayName": "",
"{Identifier}": "Shared%2bDocuments%252fSDS%252fFiles%252fA10_NICKEL%2bVANADIUM%2bPRODUCT_PIS-USA_French.pdf",
"{IsFolder}": false,
"{Thumbnail}": ...DATA,
"{Link}": "https://company.sharepoint.us/sites/devtest/Shared%20Documents/SDS/Files/A10_NICKEL%20VANADIUM%20PRODUCT_PIS-USA_French.pdf",
"{Name}": "A10_NICKEL VANADIUM PRODUCT_PIS-USA_French",
"{FilenameWithExtension}": "A10_NICKEL VANADIUM PRODUCT_PIS-USA_French.pdf",
"{Path}": "Shared Documents/SDS/Files/",
"{FullPath}": "Shared Documents/SDS/Files/A10_NICKEL VANADIUM PRODUCT_PIS-USA_French.pdf",
"{IsCheckedOut}": false,
"{VersionNumber}": "1.0" } ]
So from what I can see, I think it's what I thought. Even though you're filtering an array down to a single element, you need to treat it like an array.
I'm going to make an assumption that you're always going to retrieve a single item as a result of your filter step.
I created a variable (SharePoint Documents) to store your "filtered" array so I could then do the work to extract the {FullPath} property.
I then created variable that is initialised with the first (again, I'm making the assumption that your filter will only ever return a single element) and used this expression ...
variables('SharePoint Documents')?[0]['{FullPath}']
This is the result and you can use that in your next step to get the file content from SharePoint ...
If my assumption is wrong and you can have more than one then you'll need to throw it in a loop and do the same sort of thing ...
This is the expression contained within ...
items('For_Each_in_Array')['{FullPath}']
Result ...
I actually ended up doing this and it works.

Search criteria for appointment slots in Epic FHIR

I'm using Epic's FHIR API (with Argonaut) to search for available appointments, in their private sandbox:
POST /api/FHIR/STU3/Appointment/$find
{
"resourceType": "Parameters",
"parameter": [
{
"name": "startTime",
"valueDateTime": "2022-03-22T08:15:00Z"
},
{
"name": "endTime",
"valueDateTime": "2022-04-02T08:15:00Z"
}
]
}
And this gives me some temporary appointments starting at the desired date and time. No problem. However, if I add service-type as a parameter in the body:
POST /api/FHIR/STU3/Appointment/$find
{
"resourceType": "Parameters",
"parameter": [
{
"name": "startTime",
"valueDateTime": "2022-03-23T15:30:00Z"
},
{
"name": "endTime",
"valueDateTime": "2022-04-02T15:30:00Z"
},
{
"name": "service-type",
"valueCodeableConcept": {
"coding": [
{
"system": "urn:oid:1.2.840.114350.1.13.861.1.7.3.808267.11",
"code": "40111223"
}
]
}
}
]
}
I get a slightly different response. I see temporary appointments with the same slot IDs (different appointment IDs of course), but also see an OperationOutcome at the end of the Bundle:
{
"fullUrl": "urn:uuid:00000000-0007-792f-cd9b-f1f44af2c17c",
"resource": {
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "information",
"code": "value",
"details": {
"coding": [
{
"system": "urn:oid:1.2.840.114350.1.13.0.1.7.2.657369",
"code": "59109",
"display": "An element value is invalid."
}
],
"text": "An element value is invalid."
},
"diagnostics": "1.2.840.114350.1.13.861.1.7.3.808267.11",
"location": [
"/f:service-type(oid)"
],
"expression": [
"service-type (oid)"
]
}
]
},
"search": {
"mode": "outcome"
}
}
The service-type system and code I used here were taken right from the example on Epic's page on the $find API. I see similar results when I use service-types from actual Slots in the Epic sandbox. And if I put in a location-reference, it seems to be ignored and appointments at other locations are sometimes returned. The net result of all this is that it seems only the start and end time are honored when finding appointments.
How can I narrow down the results of a $find call using criteria other than the start and end date?
The source of truth for this API should be the fhir.epic.com documentation, but since this is a common question, I'll post some information here:
$find is not a good option for patient open scheduling. I don't know if that is your use case or not, but it is a common question, so I'll address it anyway.
$find invokes a rules engine that is defined by each healthcare organization. The logic of that rules engine is 100% up to the healthcare organization to define. In order for $find to work for you, you'll need very specific pre-coordination to build the logic in that engine.
The Epic sandboxes only have a very basic rules engine built out. It isn't particularly "real-world"-y. And it is probably good that it isn't, as it serves as an early warning that this API may not be the API you are looking for.
The $find API is a way to support cross-organization scheduling. For example, if you want front desk staff to be able to schedule a follow up visit at another organization across town that they have an established business relationship. For example, if a PCP office wants to schedule a dermatology visit for you at an external org. Note that the user in this case is the organization's scheduling staff, not the patient.
Specifically, Epic's $find support is based on Use Case 1 and 2 in the Argonaut Implementation Guide.

Creating Observation FHIR Json using hourly data

I have a data in the following format csv format
where HR is heart rate, O2Sat is Oxygen Saturation, Temp is temperaute, ICULOS as ICU Length of Stay(showing hour number ranges from 1 to 100).
Now, i am trying to convert this to FHIR format. Since All these things come under observation, i am creating an observation template. For each column i am able to find a sample json where i can feed in the value.
I am not really sure how to interpret hourly data in FHIR. EffectiveTime, EffectivePeriod keys are not taking integer values and eventually failing in FHIR validation.
{
"resourceType": "Observation",
"id": "heart-rate",
"meta": {
"profile": [
"http://hl7.org/fhir/StructureDefinition/vitalsigns"
]
},
"status": "registered",
"category": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/observation-category",
"code": "vital-signs",
"display": "Vital Signs"
}
],
"text": "Vital Signs"
}
],
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "8867-4",
"display": "Heart rate"
}
],
"text": "Heart rate"
},
"subject": {
"reference": "Patient/example"
},
"effectiveDateTime": "1999-07-02",
"valueQuantity": {
"value": 0,
"unit": "beats/minute",
"system": "http://unitsofmeasure.org",
"code": "/min"
}
}
Can someone help me with the format to include hourly data and also how the json would be nested with multiple columns present in the figure ?
NOTE: ICULOS - has entry upto 100 hours.. For each hour values are denoted.
You would have a separate Observation for each measurement for each hour (with an appropirate effectiveDateTime indicating the specific time of each measurement). For example, you might have an effectiveDateTime of "1999-07-02T03:57:15" for the first and "1999-07-02T05:01:22" for the next. If you have no clue what time the measurements were made at and just have an hourly list, then simply go with "1999-07-02T00:00:00", "1999-07-02T01:00:00", etc.

Json extract unique data - Jmeter

I am having a set of request in my Thread Group in which first request will feed inputs for the second request. I am using json extractor (match No.0) to extract the value from the list. I want to ensure that same data extracted in the Thread 1 is not been fetched in the subsequent thread runs. Can you please suggest how handle that.
As per JSON Extractor documentation
If the JSON Path query leads to many results, you can choose which one(s) to extract as Variables:
0 : means random (Default Value)
The "random" doesn't guarantee uniqueness so if you need the data to be unique - consider providing an incremented value to this "Match No" field.
Example setup:
Given the following JSON
{
"store": {
"book": [
{
"category": "reference",
"author": "Nigel Rees",
"title": "Sayings of the Century",
"price": 8.95
},
{
"category": "fiction",
"author": "Evelyn Waugh",
"title": "Sword of Honour",
"price": 12.99
},
{
"category": "fiction",
"author": "Herman Melville",
"title": "Moby Dick",
"isbn": "0-553-21311-3",
"price": 8.99
},
{
"category": "fiction",
"author": "J. R. R. Tolkien",
"title": "The Lord of the Rings",
"isbn": "0-395-19395-8",
"price": 22.99
}
],
"bicycle": {
"color": "red",
"price": 19.95
}
},
"expensive": 10
}
Let's assume you want to use unique book title, i.e.
Sayings of the Century - for 1st iteration
Sword of Honour - for 2nd iteration
etc.
Amend "Match No" field value to look like:
${__intSum(${__jm__Thread Group__idx},1,)}
where __jm__Thread Group__idx is a pre-defined variable available since JMeter 4.0 which returns current Thread Group iteration and __intSum() is the JMeter Function which adds 1 to the iteration number (as it's zero-based)
the full JSON Extractor configuration would be something like:
That's basically it, now you have the confidence that the new value is being picked up for each Thread Group iteration, it can be checked using i.e. View Results Tree listener.

Can't get FHIR message to decode

I am trying to integrate with a service that provides FHIR ImageStudy messages in JSON format. Once I have the JSON message I need to convert the message to XML.
I am using the FHIR-net-api found here, https://github.com/ewoutkramer/fhir-net-api I posted earlier and got help using this library to parse standard image study messages. Here is a link to my earlier post, FHIR JSON to XML decoding in BizTalk
The service I am connecting to has added some extensions to the image study message and when I attempt to parse it I get an error that the parser failed line 1 character 1.
My understanding is that if the extension are done correctly the FHIR-net-api library should be able to parse the JSON to XML. Is this correct?
Can anyone identify if the test message below is compliant to the FHIR standard, if not what is wrong with it? I have shortened the message to only contain a single image study but the service returns multiple in a bundle. I have also removed identifying information.
{
"resourceType": "Bundle",
"total": 15,
"entry": [
{"resource": {
"resourceType": "ImagingStudy",
"id": "LALA.e1e6683d-f6d9-e311-ae0e-0050568f64",
"contained": [
{
"resourceType": "Organization",
"text": {"div": "LALA"},
"name": "LALA"
},
{
"resourceType": "Procedure",
"id": "Procedure1",
"code": {"coding": [ {
"code": "RAD-HANB",
"display": "HANDS BIL"
}]}
}
],
"extension": [ {
"url": "https://someplace.org/fhir/extensions/imagingstudy-examstatus",
"valueString": "Finalized"
}],
"started": "2013-12-03T12:30:00-08:00",
"accession": {"value": "A12345BH"},
"procedure": [{"reference": "#Procedure1"}],
"series": [ {
"modality": {
"system": "http://www.dicomlibrary.com/dicom/modality/",
"code": "CR"
},
"bodySite": {"code": "UEX"},
"instance": [
{"title": "DiagnosticReport"},
{
"title": "DiagnosticImage",
"content": [
{
"url": "/fhir/Patient/91111/ImagingStudy?_query=imageUrl&_id=6683d-f6d9-e311-ae0e-0050568f6477&-mrn=12345T&-organization=lala&accession=tester&-status=F",
"title": "Something"
},
{
"url": "/fhir/Patient/9111111/ImagingStudy?_query=html5Url&_id=e1e6683d-f6d9-e311-ae0e-0050568f6&-mrn=123345&-organization=lala&accession=testing&-status=F",
"title": "HTML5"
}
]
}
]
}]
}}
]
}
I suspect that you got a message like this: Error parsing XHTML: Incorrect document syntax. at line 1 row 1. source = " at line 8 col 13
That's what I get once I clean up the instance a little bit to include only the resource and not the wrapper from the Bundle and check it against http://fhir2.healthintersections.com.au/open/.
The first issue is that the narrative inside your div tag is not valid. It needs to look like this:
"div": "<div>LALA</div>"
However there are a bunch of others. The narrative is missing status. Narrative isn't actually allowed on contained resources, you're missing a bunch of mandatory elements, etc. Just go to the link above and paste your JSON into the "upload" box at the bottom of the page and select "validate". That will give you a full report of the issues. (Not all of those will necessarily impact your ability to convert between JSON and XML, but presumably you'll want to fix them regardless.)

Resources