Comments (1)
/*General notes 1 - search equivalence => test searching by resourceType AND patient & in-patient compartment are equivalent*/
/*General notes 2 - test inclusion based on secondary/less common inclusion elements such as Condition.asserter (vs the obvious Condition.subject)*/
/*General notes 3 - 0 results in both searches isn't enough as it doesn't test inclusion by secondary elements*/
/*General notes 4 - it's ok to test primary and secondary inclusion element for different patients*/
(
/*List resourceTypes and Paths within them that point to Compartment Patient*/
$resourceTypesPathsToPatientCompartment :=
(
/*List all paths relevant for Compartment Patient https://hl7.org/fhir/R4/compartmentdefinition-patient.json*/
$PatientCompartmentResourcesParams := $readFile('compartmentdefinition-patient.json').resource[$exists(param)].param.{'resourceType':%.code, 'SPname':$}
/*SearchParams reousrceTypes and paths ONLY for SPs refering Patient*/
;$SPreousrceTypesPaths := (
$stpA := $readFile('search-parameters.json').entry.resource[
type='reference'
and 'Patient' in target
and $not('Patient' in base)].{'SPname':name, 'expressionSplit':$split(expression,"|")}
/*trim and remove where condition*/
;$stpB := $stpA.expressionSplit.{'expressionSplit':$substringBefore($trim($),'.where('), 'SPname':%.SPname}
/*Extract resourceType*/
;$stpC := $stpB.{'SPpath':$substringAfter(expressionSplit,'.'),'fullSPpath':expressionSplit,'SPname':SPname,'resourceType':$substringBefore(expressionSplit,'.')}
)
/*Inner join defentions from compartmentdefinition-patient.json and search-parameters.json => list resourceTypes and paths to search*/
;$PatientCompartmentResourcesParams@$PCRP.($SPreousrceTypesPaths[$PCRP.resourceType=$.resourceType and $PCRP.SPname = $.SPname].{'resourceType':$.resourceType, 'SPpath':$.SPpath})
)
/*Check in CapStat if server declares support for patient compartment if not => warning and continue (may support w/o declaring)*/
;'http://hl7.org/fhir/CompartmentDefinition/patient' in $capabilities().rest.compartment ? 1 : 0
/*Extract 1 instance per resourceType&inclusion path which is part of the Compartment Patient*/
;$SampledResources := $readFile('SampledResources.json')
;$resourceTypesPathsToPatientCompartment@$RTPTPC.($SampledResources[$RTPTPC.resourceType=$.resourceType and $exists($RTPTPC.SPpath)][0].{
'id':id
,'resourceType':resourceType
,'SPpath':$RTPTPC.SPpath
,'SPpathValue':$eval($RTPTPC.SPpath).reference
,'PatiendID':$substringAfter($eval($RTPTPC.SPpath).reference,'/Patient/')
})
/*Stp0 - variables*/
/* ;$compartments := $capabilities().rest.compartment.$substring(42).($uppercase($substring(0,1)) & $substring($,1))*/
/*;$ServiceBaseURL := 'https://server.fire.ly/r4'$capabilities().implementation.url*/
/*;$endPoint := ($ServiceBaseURL & '/' & $resourceType)*/
/*;$endPointLen := $length($endPoint)*/
/*Stp2 - Check required SearchParameters are supported (based on CS only or also test for un-documented support?)*/
/* ;$capabilities().rest.resource[type='Observation'].searchParam[name='performer' and type='reference']~>$exists()*/
/*?*/
/*: $error('Lacking required searchParam')*/
)
from certificator.
Related Issues (20)
- תמיכה בקריאת HTTP status codes HOT 1
- תמיכה בכתיבה לקבצים HOT 1
- תמיכה בקריאה מקבצים HOT 1
- Map not working as expected HOT 1
- Allow for saving maps and calling between maps HOT 1
- Override root route
- Basic SMART test HOT 1
- Test Patient Compartment - inclusion & exclusion of resources (TestID1)
- Test Patient Compartment - resource aggregation (TestID12) HOT 1
- Performance tests - concurrent requests response time (Test80)
- Support concurrent calls
- Analyse dateTime/Period/date/time elements HOT 3
- Analyse date elements
- Analyse time elements
- Test RI (referential integrity) - check for resolvability (Test34)
- Test for PHI exposure in resource ID - Patient, explicit (Test30)
- Test for PHI exposure in resource ID - All resources, explicit (Test30)
- Test for PHI exposure in resource ID - All resources, explicit (Test30)
- Improve resource validation performance
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from certificator.