Package org.opencds.cqf.cql.engine.data
Class SystemDataProvider
java.lang.Object
org.opencds.cqf.cql.engine.model.BaseModelResolver
org.opencds.cqf.cql.engine.data.SystemDataProvider
- All Implemented Interfaces:
DataProvider,ModelResolver,RetrieveProvider
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateInstance(String typeName) Create an instance of the model object that corresponds to the specified type.getContextPath(String contextType, String targetType) Get the path expression that expresses the relationship between thetargetTypeand the givencontextType.objectEqual(Object left, Object right) Compare two objects for equalityobjectEquivalent(Object left, Object right) Compare two objects for equivalenceresolvePath(Object target, String path) Resolve the provided path expression for the provided target.Class<?>resolveType(Object value) Resolve the Java class that corresponds to the given model object instance.Class<?>resolveType(String typeName) Resolve the Java class that corresponds to the given model typeretrieve(String context, String contextPath, Object contextValue, String dataType, String templateId, String codePath, Iterable<Code> codes, String valueSet, String datePath, String dateLowPath, String dateHighPath, Interval dateRange) voidsetPackageName(String packageName) voidSet the value of a particular property on the given model object.Methods inherited from class org.opencds.cqf.cql.engine.model.BaseModelResolver
as, isMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opencds.cqf.cql.engine.data.DataProvider
phiObfuscationSupplierMethods inherited from interface org.opencds.cqf.cql.engine.model.ModelResolver
as, getPackageNames, is, setPackageNames
-
Constructor Details
-
SystemDataProvider
public SystemDataProvider()
-
-
Method Details
-
retrieve
public Iterable<Object> retrieve(String context, String contextPath, Object contextValue, String dataType, String templateId, String codePath, Iterable<Code> codes, String valueSet, String datePath, String dateLowPath, String dateHighPath, Interval dateRange) - Specified by:
retrievein interfaceRetrieveProvider
-
getPackageName
- Specified by:
getPackageNamein interfaceModelResolver
-
setPackageName
- Specified by:
setPackageNamein interfaceModelResolver
-
resolvePath
Description copied from interface:ModelResolverResolve the provided path expression for the provided target. Paths can be things like simple dotted property notation (e.g. Patient.id) or more complex things like list indexed property expressions (e.g. Patient.name[0].given). The exact details are configued in the model definition and passed to the ELM file during CQL to ELM translation.- Specified by:
resolvePathin interfaceModelResolver- Returns:
- result of the provided expression. Null is expected whenever a path doesn't exist on the target.
-
setValue
Description copied from interface:ModelResolverSet the value of a particular property on the given model object.- Specified by:
setValuein interfaceModelResolver- Parameters:
target- model objectpath- path to the property that will be setvalue- value to set to the property indicated by the path expression
-
resolveType
Description copied from interface:ModelResolverResolve the Java class that corresponds to the given model object instance.- Specified by:
resolveTypein interfaceModelResolver- Parameters:
value- Object instance- Returns:
- Class object that represents the specified value
-
resolveType
Description copied from interface:ModelResolverResolve the Java class that corresponds to the given model type- Specified by:
resolveTypein interfaceModelResolver- Parameters:
typeName- Model type name. In the ELM, model objects are namespaced (e.g. FHIR.Patient), but the namespace is removed prior to calling this method, so the input would just be Patient.- Returns:
- Class object that represents the specified model type
-
createInstance
Description copied from interface:ModelResolverCreate an instance of the model object that corresponds to the specified type.- Specified by:
createInstancein interfaceModelResolver- Parameters:
typeName- Model type to create- Returns:
- new instance of the specified model type
-
objectEqual
Description copied from interface:ModelResolverCompare two objects for equality- Specified by:
objectEqualin interfaceModelResolver- Parameters:
left- left hand side of the equality expressionright- right hand side of the equality expression- Returns:
- flag indicating whether the objects are equal
-
objectEquivalent
Description copied from interface:ModelResolverCompare two objects for equivalence- Specified by:
objectEquivalentin interfaceModelResolver- Parameters:
left- left hand side of the equivalence expressionright- right hand side of the equivalence expression- Returns:
- flag indicating whether the objects are equal
-
getContextPath
Description copied from interface:ModelResolverGet the path expression that expresses the relationship between thetargetTypeand the givencontextType. For example, in a FHIR model, with context typePatientand targetType Condition, the resulting path issubjectbecause that is the model property on the Condition object that links the Condition to the Patient.- Specified by:
getContextPathin interfaceModelResolver
-