HS.FHIRMeta.API

class HS.FHIRMeta.API extends %Library.RegisteredObject

Property Inventory

Method Inventory

Parameters

parameter ImplementationClass = HS.FHIRMeta.Impl.Impl;

Properties

property FHIRMetadataSetKey as %String [ Calculated ];
The MetadataSet Key for this metadata collection
Property methods: FHIRMetadataSetKeyDisplayToLogical(), FHIRMetadataSetKeyIsValid(), FHIRMetadataSetKeyLogicalToDisplay(), FHIRMetadataSetKeyLogicalToOdbc(), FHIRMetadataSetKeyNormalize()
property FHIRPathAPI as HS.FHIRPath.API [ Calculated ];
A FHIRPath API Instance
property FHIRVersion as %String [ Calculated ];
The FHIR Version supported by this metadata collection
Property methods: FHIRVersionDisplayToLogical(), FHIRVersionIsValid(), FHIRVersionLogicalToDisplay(), FHIRVersionLogicalToOdbc(), FHIRVersionNormalize()
property PackageList as %List [ Calculated ];
The MetadataSet Key for this metadata collection
Property methods: PackageListLogicalToOdbc(), PackageListOdbcToLogical()

Methods

abstract method ExpandValueSet(urlOrValueSet As %String, Output codes)
API
This method returns a multi-dimensional array that contains the code and associated display text for each code in the specified ValueSet
@Input urlOrValueSet This may be the URL for a ValueSet resource, or the ValueSet resource itself
@Output codes A multidimensional array in the form
codes(code-system, code) = display-text
abstract method ExpandValueSetAsList(urlOrValueSet As %String) as %List
API
This method returns a %List that contains the code and associated display text for each code in the specified ValueSet The list is ordered in the sequence that the codes are defined in the ValueSet (which FHIR specifies may be meaningful).
@Input urlOrValueSet This may be the URL for a ValueSet resource, or the ValueSet resource itself
@Return A %List containing a %List for each code-system containing a %List for each code. The result is in the form of $LB(code-system, $LB(code, display-text))
abstract method FindSearchParam(resourceType As %String, pParamName As %String) as HS.FHIRMeta.SearchParam
API
Returns the instance of HS.FHIRMeta.SearchParam for the specified resourceType and parameter code. Query parameters that do not refer to resource content (e.g. _count, etc) are not considered Search Parameters and will not be found.
@Input resourceType - The type of the Resource that the parameter applies to
@Input pParamName - The name of the parameter as used in a FHIR query (the code property)
@Return: If found, the corresponding HS.FHIRMeta.SearchParam, otherwise and empty string (null).
abstract method GetCompartmentsForResource(pResourceObj As %DynamicObject) as %List
API Returns a %List of Compartment names that a specific resource is a member of
abstract method GetMetadataResource(url As %String) as %DynamicObject
API
This method retrieves a specific FHIR Metadata resource based on its URL. If the URL includes a version specifier (ends with "|" followed by the version string), then the specific resource version will be returned. Otherwise, the version associated with this object's package list will be returned.
abstract method GetPropertyFHIRType(fhirType As %String, propName As %String) as %String
API
Returns the FHIR type of the specified property
abstract method GetPropertyJSONType(fhirType As %String, propName As %String) as %String
API
Returns an indicator of how to represent this property in Json.
  • "o" -> A child object
  • "s" -> A string
  • "n" -> A numeric value
  • "b" -> A boolean value
  • "c" -> A Variant root field name
  • "x" -> XHTML formatted string
  • "alias" -> An embedded resource

For variant fields, the base property name is labeled as "c", and the supported specific typed properties are accessed using their type-inclusive names (names that actually appear in a resource). For example in the Patient resource, 'multipleBirth' will return "c", while 'multipleBirthInteger' will return "n", and multipleBirthBoolean will return "b".
abstract method GetPropertyNames(fhirType As %String) as %List
API
Returns a %List of property names for the specified FHIR type.
abstract method GetPropertyOrdinal(fhirType As %String, propName As %String) as %Integer
API
Returns an integer value that reflects the order of the property in the XML form of the resource. Note that the ordinals within a FHIR type may not be sequential. For variant properties, all variations will have the same ordinal. For example in Patient, both multipleBirthBoolean and multipleBirthInteger have the same ordinal value (as does multipleBirth).
abstract method GetPropertyValueList(fhirType As %String, propName As %String) as %List
API
Return a %List of allowed values for the value set associated with the specified property. NOTE: This will return an empty list unless the strength is "required".
abstract method GetPropertyValueSetStrength(fhirType As %String, propName As %String) as %String
API
Returns the strength of the binding of the specified property to the value set ("required", "extensible", "preferred", or "example")
abstract method GetPropertyValueSetURL(fhirType As %String, propName As %String) as %String
API
Returns the URL of the value set associated with the specified property. Properties with FHIR type of code, Coding, and CodeableConcept have associated value sets.
abstract method GetRequiredProperties(fhirType As %String) as %List
API
Returns a %List of the properties that are required by the FHIR schema for the specified resource type.
abstract method GetRsrcIterator(resourceType As %String) as HS.FHIRMeta.RsrcIterator
API
Returns a RsrcIterator object that will iterate through all resources of the specified FHIR metadata resource type. Supported metadata resource types are StructureDefinition, CompartmentDefinition, SearchParameter, CodeSystem, and ValueSet
abstract method GetSuperType(fhirType As %String) as %String

Returns the FHIR type of the superclass for the specified FHIR type.
abstract method GetVariantTypes(fhirType As %String, propName As %String) as %List
API
Returns a list of the allowable FHIR types for a variant property. For example, GetVariantTypes("Patient", "multipleBirth") will return $LB("boolean", "integer")
abstract method HasPropertyName(fhirType As %String, propName As %String) as %String
API
Returns true if the specified fhirType has a property with the specified name
abstract method IsA(pTypeName As %String, pAncestorName As %String)
API IsA Indicates whether a specified type is an instance of an ancestor class
Input:
  • pTypeName : (required) FHIR type.
  • pAncestorName : (required) FHIR type.

    Return: a %Boolean - 1 pTypeName is identical to or a subclass of pAncestorName
  • abstract method IsFHIRType(fhirType As %String) as %Boolean
    API
    Returns true (1) if the specified type is a valid FHIR type, otherwise false (0)
    abstract method IsPropertyArray(fhirType As %String, propName As %String) as %Boolean
    API
    Returns true if the specified property is represented as an Array in JSON.
    abstract method IsPropertyRequired(fhirType As %String, propName As %String) as %Boolean
    API
    Returns true if the specified property is required by the FHIR schema
    abstract method IsSharedResourceType(pResourceType As %String)
    API IsSharedResourceType Indicates whether a resourceType is or can reference a Patient
    Input:
  • pResourceType : (required) FHIR resource type.

    Return: a %Boolean - 1 if shared (no patient references), 0 if unshared
  • abstract method IsValidResourceType(pResourceType As %String) as %Boolean
    API IsValidResourceType validates the specified resource type against this Schema, returning a %Boolean
    Input:
  • pResourceType : (required) FHIR resource type.

    Output:
    Return: a %Boolean - 0 = Is not a valid resource type as per the specified schema, 1 = Is valid.
  • abstract method NextSearchParamForResourceType(resourceType As %String, prevParam As HS.FHIRMeta.SearchParam) as HS.FHIRMeta.SearchParam
    API
    Use this method to enumerate the set of search parameters supported for the specified resource type. If only names of parameters are needed, use the NextSearchParamName instead.
    @Input resourceType - The type of the Resource that the parameter applies to
    @Input prevParam - The parameter previously returned by this method, or "" to obtain the first parameter in the set
    @Return: The next parameter in the set, or "" if the entire set has been traversed.
    abstract method NextSearchParamName(resourceType As %String, prevName As %String) as %String
    API
    Use this method to enumerate the set of search parameter names supported for the specified resource type..
    @Input resourceType - The type of the Resource that the parameter applies to
    @Input prevName - The parameter name previously returned by this method, or "" to obtain the first name in the set
    @Return: The next parameter name in the set, or "" if the entire set has been traversed.
    abstract method NextSearchParamResourceType(prevType As %String) as %String
    API
    Use this method to enumerate the set of resource types support search parameters.
    @Input prevType - The resource type previously returned by this method, or "" to obtain the first resource type in the set
    @Return: The next resource type in the set, or "" if the entire set has been traversed.
    classmethod bootstrapMetadataSets(force As %Boolean = 0)
    API
    This method is intended for use in namespace configuration. It "installs" the packages that are shipped with a HealthShare release (from the disk to the database).
    classmethod getInstance(packageList As %List, globalRoot As %String = "")
    API getInstance returns an instance of the API object that reflects the schem of the specified metadata packages
    Input:
  • packageList : (required) A %List of FHIR metadata packages (on must be a fhir core package). For R4, use $ListBuild("hl7.fhir.r4.core@4.0.1")
  • globalRoot : (optional) The global to use for the backing data. Intended for testing purposes, do not override.

    Output:
    Return: a %Boolean - 0 = Is not a valid resource type as per the specified schema, 1 = Is valid.
  • Inherited Members

    Inherited Methods

    Subclasses

    Feedback