Class SystemDataProvider

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object createInstance​(java.lang.String typeName)
      Create an instance of the model object that corresponds to the specified type.
      java.lang.Object getContextPath​(java.lang.String contextType, java.lang.String targetType)
      Get the path expression that expresses the relationship between the targetType and the given contextType.
      java.lang.String getPackageName()  
      java.lang.Boolean objectEqual​(java.lang.Object left, java.lang.Object right)
      Compare two objects for equality
      java.lang.Boolean objectEquivalent​(java.lang.Object left, java.lang.Object right)
      Compare two objects for equivalence
      java.lang.Object resolvePath​(java.lang.Object target, java.lang.String path)
      Resolve the provided path expression for the provided target.
      java.lang.Class<?> resolveType​(java.lang.Object value)
      Resolve the Java class that corresponds to the given model object instance.
      java.lang.Class<?> resolveType​(java.lang.String typeName)
      Resolve the Java class that corresponds to the given model type
      java.lang.Iterable<java.lang.Object> retrieve​(java.lang.String context, java.lang.String contextPath, java.lang.Object contextValue, java.lang.String dataType, java.lang.String templateId, java.lang.String codePath, java.lang.Iterable<Code> codes, java.lang.String valueSet, java.lang.String datePath, java.lang.String dateLowPath, java.lang.String dateHighPath, Interval dateRange)  
      void setPackageName​(java.lang.String packageName)  
      void setValue​(java.lang.Object target, java.lang.String path, java.lang.Object value)
      Set the value of a particular property on the given model object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SystemDataProvider

        public SystemDataProvider()
    • Method Detail

      • retrieve

        public java.lang.Iterable<java.lang.Object> retrieve​(java.lang.String context,
                                                             java.lang.String contextPath,
                                                             java.lang.Object contextValue,
                                                             java.lang.String dataType,
                                                             java.lang.String templateId,
                                                             java.lang.String codePath,
                                                             java.lang.Iterable<Code> codes,
                                                             java.lang.String valueSet,
                                                             java.lang.String datePath,
                                                             java.lang.String dateLowPath,
                                                             java.lang.String dateHighPath,
                                                             Interval dateRange)
        Specified by:
        retrieve in interface RetrieveProvider
      • setPackageName

        public void setPackageName​(java.lang.String packageName)
        Specified by:
        setPackageName in interface ModelResolver
      • resolvePath

        public java.lang.Object resolvePath​(java.lang.Object target,
                                            java.lang.String path)
        Description copied from interface: ModelResolver
        Resolve 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:
        resolvePath in interface ModelResolver
        Returns:
        result of the provided expression. Null is expected whenever a path doesn't exist on the target.
      • setValue

        public void setValue​(java.lang.Object target,
                             java.lang.String path,
                             java.lang.Object value)
        Description copied from interface: ModelResolver
        Set the value of a particular property on the given model object.
        Specified by:
        setValue in interface ModelResolver
        Parameters:
        target - model object
        path - path to the property that will be set
        value - value to set to the property indicated by the path expression
      • resolveType

        public java.lang.Class<?> resolveType​(java.lang.Object value)
        Description copied from interface: ModelResolver
        Resolve the Java class that corresponds to the given model object instance.
        Specified by:
        resolveType in interface ModelResolver
        Parameters:
        value - Object instance
        Returns:
        Class object that represents the specified value
      • resolveType

        public java.lang.Class<?> resolveType​(java.lang.String typeName)
        Description copied from interface: ModelResolver
        Resolve the Java class that corresponds to the given model type
        Specified by:
        resolveType in interface ModelResolver
        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

        public java.lang.Object createInstance​(java.lang.String typeName)
        Description copied from interface: ModelResolver
        Create an instance of the model object that corresponds to the specified type.
        Specified by:
        createInstance in interface ModelResolver
        Parameters:
        typeName - Model type to create
        Returns:
        new instance of the specified model type
      • objectEqual

        public java.lang.Boolean objectEqual​(java.lang.Object left,
                                             java.lang.Object right)
        Description copied from interface: ModelResolver
        Compare two objects for equality
        Specified by:
        objectEqual in interface ModelResolver
        Parameters:
        left - left hand side of the equality expression
        right - right hand side of the equality expression
        Returns:
        flag indicating whether the objects are equal
      • objectEquivalent

        public java.lang.Boolean objectEquivalent​(java.lang.Object left,
                                                  java.lang.Object right)
        Description copied from interface: ModelResolver
        Compare two objects for equivalence
        Specified by:
        objectEquivalent in interface ModelResolver
        Parameters:
        left - left hand side of the equivalence expression
        right - right hand side of the equivalence expression
        Returns:
        flag indicating whether the objects are equal
      • getContextPath

        public java.lang.Object getContextPath​(java.lang.String contextType,
                                               java.lang.String targetType)
        Description copied from interface: ModelResolver
        Get the path expression that expresses the relationship between the targetType and the given contextType. For example, in a FHIR model, with context type Patient and targetType Condition, the resulting path is subject because that is the model property on the Condition object that links the Condition to the Patient.
        Specified by:
        getContextPath in interface ModelResolver