HS.FHIR.Utils

deprecated class HS.FHIR.Utils

THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
Helpful utilities

Method Inventory

Parameters

parameter CONTENTTYPEANY = */*;
parameter CONTENTTYPEJSON = application/json+fhir;
parameter CONTENTTYPETEXTPLAIN = text/plain;
parameter CONTENTTYPEXML = application/xml+fhir;
parameter HTTP200OK = 200 OK;
parameter HTTP400BADREQUEST = 400 Bad Request;
parameter HTTP404NOTFOUND = 404 Not Found;
parameter HTTP406NOTACCEPTABLE = 406 Not Acceptable;
parameter HTTP500INTERNALSERVERERROR = 500 Internal Server Error;
parameter HTTP502BADGATEWAY = 502 Bad Gateway;
parameter HTTP503SERVICEUNAVAILABLE = 503 Service Unavailable;
parameter HTTPACCEPT = Accept;
parameter HTTPCONTENTLOCATION = Content-Location;
parameter HTTPLOCATION = Location;
parameter INTERACTIONMETDATACLASS = HS.FHIR.InteractionMetadata;

Methods

deprecated classmethod AddBundleEntryToStream(pContentType As %String, ByRef pBundleStream As %Stream.Object, pFullUrl As %String = "", pResourceStream As %Stream.Object = $$$NULLOREF, ByRef pSearch As %String, ByRef pRequest As %String, ByRef pResponse As %String, pOutcomeStream As %Stream.Object = $$$NULLOREF, pIsFirstEntry As %Boolean = 0, pWriteComma As %Boolean = 0, pIsLastEntry As %Boolean = 0) as %Status
THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
API AddBundleEntryToStream adds a Bundle entry to an existing JSON or XML Bundle stream.
This method is intended to be used in conjunction with the methods StartBundleStream and EndBundleStream.
Input:
  • pContentType : (required) May be the ContentType from a FHIR request, or even just "json" or "xml".
  • pBundleStream : (required) Existing Bundle stream object.
  • pFullUrl : Bundle entry fullUrl value.
  • pResourceStream : Stream object for FHIR resource to include in the entry.
  • pSearch() : Array of Bundle entry search object properties. pSearch(property_name) = value, where property name can be "mode" or "score".
  • pRequest() : Array of Bundle entry request object properties. pRequest(property_name) = value, where property name can be "method", "url", "ifNoneMatch", "ifModifiedSince", "ifMatch", or "ifNoneExist".
  • pResponse() : Array of Bundle entry response object properties. pSearch(property_name) = value, where property name can be "status", "location", "etag", or "lastModified".
  • pOutcomeStream : Stream object for OperationOutcome resource for entry response outcome property.
  • pIsFirstEntry : If true, then for JSON the entry collection start ("entry":[) is written.
  • pWriteComma : If true, then for JSON write a comma after writing out the entry object.
  • pIsLastEntry : If true, then for JSON the entry collection end (]) is written.
  • deprecated classmethod AddOutcomeIssueStream(pContentType As %String, ByRef pStream As %Stream.Object, pSeverity As %String, pCode As %String, pDetailsText As %String = "", pDetailsCode As %String = "", pDetailsDescription As %String = "", pDiagnostics As %String = "", pLocation As %String = "", pExpression As %String = "", pWriteComma As %Boolean = 0, pFormatFHIROutput As %Boolean = 0) as %Status
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    API AddOutcomeIssueStream adds a FHIR OperationOutcome issue to an existing OperationOutcome resource stream, using the specified inputs. This method is intended to be used in conjunction with StartOutcomeStream and EndOutcomeStream.
    Input:
  • pContentType : (required) May be the ContentType from a FHIR request, or even just "json" or "xml".
  • pStream : (required) OperationOutcome resource stream object, which is under construction.
  • pSeverity : (required) Error severity code, should be an IssueSeverity code (http://hl7.org/fhir/issue-severity).
  • pCode : (required) Error type code, should be an IssueType code (http://hl7.org/fhir/issue-type).
  • pDetailsText : Brief text description of the error.
  • pDetailsCode : Code for more detailed categorization of the error. Examples are the operation outcome codes from HL7 (http://hl7.org/fhir/operation-outcome).
  • pDetailsDescription : Text description associated with the DetailsCode.
  • pDiagnostics : Additional diagnostic information about the issue.
  • pLocation : Error location, as an XPath expression.
  • pExpression : Error location, as a FHIRPath expression.
  • pFormatFHIROutput : 0 = No indent or line end formatting on the output stream. 1 = Add indent or line end formatting on the output stream.
  • deprecated classmethod BadRequest(pFHIRRequest As HS.Message.FHIR.Request, ByRef pFHIRResponse As HS.Message.FHIR.Response, pCode As %String, pText As %String) as %Status
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    API BadRequest constructs a FHIR response message with Status = 400 and an OperationOutcome for the specified code and text.
    If pFHIRResponse is not passed in, then it will be created here, and the OperationOutcome stream will be placed in a QuickStream, and the response object QuickStreamId property will be updated. If pFHIRResponse is passed in, then this method will figure out where the response Payload is to be held - in the Payload property or in a QuickStream - and place the OperationOutcome stream accordingly.
    deprecated classmethod BuildQueryString(pRequest As HS.Message.FHIR.Request, ByRef pUrl As %String) as %Status
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    API Construct the URL query string from the array of parameters in the request.
    deprecated classmethod ConvertToUTC(pDateTime As %String) as %String
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    API ConvertToUTC takes a date time value and converts it to UTC time. Expected input format is YYYY-MM-DDTHH:MM:SS[.ssss][(+/-)HH:MM]/[Z]. A date-only input value is returned unchanged. A date time input value with the "Z" time zone appended is returned unchanged.
    deprecated classmethod CreateOperationOutcomeObject(pSeverity As %String, pCode As %String, pText As %String, Output pOperationOutcome) as %Status
    Deprecated.
    deprecated classmethod CreateOperationOutcomeStream(pSeverity As %String, pText As %String, ByRef pOutputStream As %Stream.Object, pContentType As %String, pCode As %String = "", pFormatFHIROutput As %Boolean = 0) as %Status
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    CreateOperationOutcomeStream creates a FHIR OperationOutcome resource stream using the specified inputs.
    deprecated classmethod CreateOutcomeSingleIssueStream(pContentType As %String, ByRef pStream As %Stream.Object, pSeverity As %String, pCode As %String, pDetailsText As %String = "", pDetailsCode As %String = "", pDetailsDescription As %String = "", pDiagnostics As %String = "", pLocation As %String = "", pExpression As %String = "", pFormatFHIROutput As %Boolean = 0) as %Status
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    API CreateOutcomeSingleIssueStream uses methods StartOutcomeStream(), AddOutcomeIssueStream() and EndOutcomeStream() to create an OperationOutcome resource stream that has only one issue object included.

    Input:
  • pContentType : (required) May be the ContentType from a FHIR request, or even just "json" or "xml".
  • pSeverity : (required) Error severity code, should be an IssueSeverity code (http://hl7.org/fhir/issue-severity).
  • pCode : (required) Error type code, should be an IssueType code (http://hl7.org/fhir/issue-type).
  • pDetailsText : Brief text description of the error.
  • pDetailsCode : Code for more detailed categorization of the error. Examples are the operation outcome codes from HL7 (http://hl7.org/fhir/operation-outcome).
  • pDetailsDescription : Text description associated with the DetailsCode.
  • pDiagnostics : Additional diagnostic information about the issue.
  • pLocation : Error location, as an XPath expression.
  • pExpression : Error location, as a FHIRPath expression.
  • pFormatFHIROutput : 0 = No indent or line end formatting on the output stream. 1 = Add indent or line end formatting on the output stream.
    Output:
  • pStream : OperationOutcome resource stream object. This object may be passed in as a new stream object. Otherwise it will be initialized as a %Stream.TmpCharacter object.
  • deprecated classmethod CreateResourceObject(pContentType As %String, pResourceStream, ByRef pResourceObject) as %Status
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    API CreateResourceObject uses the specified FHIR resource stream and content type to create either a %DynamicObject or %XML.Document object representation of the resource.

    Input:
  • pContentType : (required) May be the ContentType from a FHIR request, or even just "json" or "xml".
  • pResourceStream : (required) FHIR resource JSON or XML stream object.

    Output:
  • pResourceObject : The FHIR resource object that is created by this method call. If pContentType indicates FHIR JSON then this will be a %DynamicObject, or if pContentType indicates FHIR XML then this will be an %XML.Document object.
  • deprecated classmethod DOMResultToNameAndAtts(pReader As %XML.XPATH.DOMResult, Output pName As %String, Output pValue As %String, Output pUrl As %String, Output pId As %String)
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    deprecated classmethod EndBundleStream(pContentType As %String, ByRef pBundleStream As %Stream.Object, pSignatureStream As %Stream.Object = $$$NULLOREF) as %Status
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    API EndBundleStream adds the ending to an existing under-construction FHIR Bundle stream.
    This method is intended to be used in conjunction with the methods StartBundleStream and AddBundleEntryToStream.
    Input:
  • pContentType : (required) May be the ContentType from a FHIR request, or even just "json" or "xml".
  • pBundleStream : (required) Existing Bundle stream object.
  • pSignatureStream : Stream object for Signature property.
  • deprecated classmethod EndOutcomeStream(pContentType As %String, ByRef pStream As %Stream.Object, pFormatFHIROutput As %Boolean = 0) as %Status
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    API EndOutcomeStream adds the closing tags on an existing FHIR OperationOutcome resource stream. This method is intended to be used in conjunction with StartOutcomeStream and AddOutcomeIssueStream.
    Input:
  • pContentType : (required) May be the ContentType from a FHIR request, or even just "json" or "xml".
  • pStream : (required) OperationOutcome resource stream object, which is under construction.
  • pFormatFHIROutput : 0 = No indent or line end formatting on the output stream. 1 = Add indent or line end formatting on the output stream.
  • deprecated classmethod EvaluateXPathExpression(pXPATHDocument As %XML.XPATH.Document, pExpression As %String, pResourceSchema As %String, Output pType, Output pResults As %Library.ListOfDataTypes) as %Status
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    API EvaluateXPathExpression evaluates the specified XPath expression against the specified %XML.XPATH.Document object. The results are always returned as a %ListOfDataTypes. However, the nature of the results that are returned depends on the nature of the expression. If the expression indicates a specific attribute at the end (e.g., "f:Patient/f:gender/@value") then the results will each be strings. If the expression does not indicate an attribute at the end, then the results will each be an object. In either case, the FHIR property type of the rightmost element in the XPath expression is returned as a separate data item.

    Input:
  • pXPATHDocument : (required) %XML.XPATH.Document object representation of a FHIR resource.
  • pExpression : (required) The XPath expression to evaluate.
  • pResourceSchema : (required) Class package to use as the schema. Example is "HS.FHIR.vSTU3.Model.Resource".

    Output:
  • pType : FHIR property data type of the rightmost element in pExpression.
  • pResults : %ListOfDataTypes collection of the results. If pExpression specifies an attribute at its end, then each item in the pResults collection is a string. Otherwise, each item in the pResults collection is an object.
  • deprecated classmethod FHIRToHSFHIR(pContentType As %String, pFHIRStreamOrString, ByRef pHSFHIRObj As %RegisteredObject, pResourceSchemaRoot As %String = "HS.FHIR.Model.Resource", pNoLongerUsed As %String) as %Status
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    API FHIRToHSFHIR creates an HS FHIR data model object from a FHIR XML or JSON stream or string. Input:
  • pContentType : (required) May be the ContentType from a FHIR request, or even just "json" or "xml".
  • pFHIRStreamOrString : (required) FHIR stream object or string.
  • pResourceSchemaRoot : (required) Class package to use as the schema. Example is "HS.FHIR.vSTU3.Model.Resource".
    Output::
  • pHSFHIRObj : HS FHIR data model object instance. NOT a %DynamicObject or %XML.Document object.
  • deprecated classmethod FormatFHIR(pContentType As %String, pFHIRStreamOrString="", ByRef pFHIRStreamOut As %Stream.Object, pJSONIndentChars As %String = "", pJSONLineTerminator As %String = "", ByRef pXMLTransformer="", pXMLFormatOption As %Integer = 0) as %Status
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    API FormatFHIR takes a FHIR stream object or string as input, calls either FormatJSON or FormatXML, depending on pContentType input parameter, and returns the result as a FHIR stream object.

    Input:
  • pContentType : (required) May be the ContentType from a FHIR request, or even just "json" or "xml".
  • pFHIRStreamOrString : (required) FHIR stream object or string.
  • pJSONIndentChars : Indent character(s) for JSON formatting. May be specified as blank.
  • pJSONLineTerminator : Line terminator character(s) for JSON formatting. May be specified as blank.
  • pTransformer : HS.Util.XSLTTransformer object to use for the XSLT transformation. If this object is not passed in, then a local transformer object will be created for this call. Please note that the transformer object create incurs a performance impact. Therefore if this method is being called frequently by a given host or application, then it is prudent for that host or application to instantiate, maintain and pass in its own transformer object.
  • pXMLFormatOption : 0 = No formatting (i.e., strip existing indent and line end formatting). 1 = Add tab indent and line-feed-only line end formatting. 2 = Add tab indent and carriage return line feed line end formatting.

    Output:
  • pFHIRStreamOut : Stream object to use for the formatted FHIR output. This object may be passed in as a new stream object. Otherwise it will be initialized as a %Stream.TmpCharacter object.
  • deprecated classmethod FormatJSON(pJSONStreamOrString, ByRef pJSONStreamOut As %Stream.Object, pIndentChars As %String = "", pLineTerminator As %String = "") as %Status
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    API FormatJSON takes a FHIR JSON stream or string as input, applies indent and line end formatting as per the pIndentChars and pLineTerminator input parameters, and returns the result as a FHIR JSON stream. This method can be used for stripping the indent, line terminator, and other unnecessary white space, by passing in pIdentChars and pLineTerminator both as blank, or by simply omitting them from the parameter inputs.

    Input:
  • pJSONStreamOrString : (required) FHIR JSON stream object or string.
  • pIndentChars : Indent character(s).
  • pLineTerminator : Line terminator character(s).

    Output:
  • pJSONStreamOut : Stream object to use for the formatted FHIR JSON output. This object may be passed in as a new stream object. Otherwise this method will initialize it as a %Stream.TmpCharacter.
  • deprecated classmethod FormatXML(pXMLStreamOrString, ByRef pXMLStreamOut As %Stream.Object = "", pTransformer="", pFormatOption As %Integer = 0) as %Status
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    API FormatXML uses XSLT to add or remove indent and line end formatting in a FHIR XML stream object or string, and to return the result in a FHIR XML stream.

    Input:
  • pXMLStreamOrString : (required) FHIR XML resource stream object or string.
  • pTransformer : HS.Util.XSLTTransformer object to use for the XSLT transformation. If this object is not passed in, then a local transformer object will be created for this call. Please note that the transformer object create incurs a performance impact. Therefore if this method is being called frequently by a given host or application, then it is prudent for that host or application to instantiate, maintain and pass in its own transformer object.
  • pFormatOption : 0 = No formatting (i.e., strip existing indent and line end formatting). 1 = Add tab indent and line-feed-only line end formatting. 2 = Add tab indent and carriage return line feed line end formatting.

    Output:
  • pXMLStreamOut : Stream object to use for holding the formatted FHIR XML. This object may be passed in as an new stream object. Otherwise this method will initialize it as a %Stream.TmpCharacter object.
  • deprecated classmethod GetAllValidFormats(ByRef pFormats As %String)
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    This method returns an array of valid formats/mime types. Array format is:
    pFormats(context, value) = formal mime type
    Where context is "Accept" for accept header, "ContentType" for Content-Type header, and "Parameter" for request URL parameter.
    deprecated classmethod GetBundleTypeFromResource(pResourceObject, Output pBundleType As %String) as %Status
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    API GetBundleTypeFromResource takes %DynamicObject or %XML.Document object representation of a FHIR Bundle as input, finds the 'type' property of the Bundle, and returns it.
    deprecated classmethod GetCapabilityStatementFromXData(pContentType As %String, pXDataName As %String, pClassName As %String, pResourceSchemaRoot As %String = "", pResourceId As %String, pBaseURL As %String, pOAuthClient As %String = "", pCORSEnabled As %Boolean = 1, pFormatFHIROutput As %Boolean = 0, ByRef pResourceStream As %Stream.Object) as %Status
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    GetCapabilityStatementFromXData retrieves a FHIR Conformance/CapabilityStatement that is located in a class XData block, as opposed to located in the FHIR resource repository. The data in the XData may be completely static, or may contain some placeholder text that allows for dynamic population of fields based on the current host, web server port, end point base url, end point OAuth definition, and end point CORS handling.

    This is a list of the fields that may be dynamically populated, with the placeholder text to use.
  • resource id value : "resource_id"
  • url value : "url"
  • implementation/url value : "implementation_url"
  • rest/security/extension for oauth-uris : "security_oauth_uris_extension"
  • rest/security/cors value : "security_cors"
  • rest/security/service value : "security_service"

    Input:
  • pContentType : (required) May be the ContentType from a FHIR request, or even just "json" or "xml".
  • pXDataName : (required) Name of the XData block to use.
  • pClassName : (required) Full name of the class that holds the XData block.
  • pResourceSchemaRoot : (required only when pContentType indicates json) Class package to use as the schema. Example is "HS.FHIR.vSTU3.Model.Resource".
  • pResourceId : (required) Resource id to apply to the Conformance/CapabilityStatement.
  • pBaseURL : (required) Base URL (e.g., CSP application name) for the end point.
  • pOAuthClient : OAuth 2.0 client name for this end point.
  • pCORSEnabled : 1 = CORS is enabled for this end point, 0 = CORS is not enabled.
  • pFormatFHIROutput : 1 = Add indent and line end formatting to the FHIR resource output, 0 = Do not add formatting.

    Output:
  • pResourceStream : FHIR resource stream object.
  • deprecated classmethod GetContainedResource(pHSFHIRObj, pId As %String = "", pType As %String = "", Output pResource) as %Status
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    API Get the resource that is contained in the specified resource, given the id, and, optionally, the resource type.

    Input:
  • pHSFHIRObj : (required) HS FHIR resource object.
  • pId : (required) Resource id of the contained resource to find.
  • pType : Resource type of the contained resource to find.

    Output:
  • pResource : FHIR resource object contained in pHSFHIRObj.
  • deprecated classmethod GetFHIRXPathDocFromXMLStream(pXMLStream, ByRef pXPATHDocument As %XML.XPATH.Document) as %Status
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    API GetFHIRXPathDocFromXMLStream returns an %XML.XPATH.Document object for the specified FHIR stream. This method sets the XPATH document PrefixMappings property specifically for use with a FHIR resource.

    Input:
  • pXMLStream : FHIR XML stream object.

    Output:
  • pXPATHDocument : %XML.XPATH.Document object representation of the FHIR XML.
  • deprecated classmethod GetFHIRXPathDocument(pContentType As %String, pResourceSchema As %String, pResourceStream, pResourceObject, ByRef pXPATHDocument As %XML.XPATH.Document) as %Status
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    API GetFHIRXPathDocument returns an %XML.XPATH.Document object for the specified FHIR resource string, stream object, %XML.Document object, or %DynamicObject. If both a string/stream and an object are passed in, this method chooses the most efficent option for obtaining the XPATH document.

    Input:
  • pContentType : (required) May be the ContentType from a FHIR request, or even just "json" or "xml".
  • pResourceSchema : (required if pContentType indicates json) Class package to use as the schema. Example is "HS.FHIR.vSTU3.Model.Resource".
  • pResourceStream : (required if no pResourceObject) FHIR resource string, or stream object.
  • pResourceObject : (required if no pResourceStream) %XML.Document or %DynamicObject representation of the FHIR resource.

    Output:
  • pXPATHDocument : %XML.XPATH.Document object representation of the FHIR resource.
  • deprecated classmethod GetHttpHostPort(pRequest As HS.Message.FHIR.Request) as %String
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    Derive the http[s]://host:port string from the CSP request information. The relevant CSP information was stored in the HS FHIR request message by HS.FHIR.REST.Handler. If the HTTP client accessed the server by specifying an IP address rather than a hostname, then this method will yield a string that includes the IP address as the host. If the request was via https then the port number might be omitted.
    deprecated classmethod GetParameterCount(pParametersArray As %Library.ArrayOfDataTypes, pParameterName As %String) as %Integer
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    API GetParameterCount returns the number of instances of a given parameter within the specified array of parameters.

    Input:
  • pParametersArray : %Library.ArrayOfDataTypes array of $List, indexed by parameter name.
  • pParameterName : Parameter name. If a modifier is included, the modifier is ignored.

    Output:
  • (return value) : Number of instances of the parameter. For example, if the original parameter string was "given=joe&family=smith&family=jones&name:exact=sample" then this method would return 1 for "given", would return 2 for "family" and would would return 1 for "name".
  • deprecated classmethod GetParameterValue(pParametersArray As %Library.ArrayOfDataTypes, pParameterName As %String, pPosition As %Integer = 1, ByRef pModifier As %String) as %String
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    API GetParameterValue returns the value of a specified parameter instance within the specified array of parameters, plus any parameter modifier. This method assumes that all instances instances of a given parameter include a modifier OR all instances do NOT include a modifier. Parameter modifier in FHIR is expressed as a colon-delimited suffix on the parameter name (not value), for example family:exact=jones. GetParameterCount returns the number of instances of a given parameter within the specified array of parameters.

    Input:
  • pParametersArray : %Library.ArrayOfDataTypes array of $List, indexed by parameter name.
  • pParameterName : Parameter name. If a modifier is included, the modifier is ignored.
  • pPosition : Instance of a given parameter. For example if a parameter appears in a URL string twice then specifying pPosition as 2 would get the value of the second instance of that parameter.

    Output:
  • pModifier : If any instances of this parameter include a modifier, this is the modifier.
  • (return value) : Value of the specified parameter instance.
  • deprecated classmethod GetResourceCapabilityItem(pResourceType As %String, pCapabilityItem As %String, pCapabilityStatement, ByRef pValue As %String) as %Status
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    API GetResourceCapabilityItem examines the specified Conformance/CapabilityStatement for the the specified resource type and returns the value for the specified "capability item".

    Input:
  • pResourceType : (required) FHIR resource type.
  • pCapabilityItem : (required) Resource type capability item (examples: "conditionalCreate", "readHistory").
  • pCapabilityStatement : (required) %XML.XPATH.Document representation of a FHIR Conformance/CapabilityStatement resource.

    Output:
  • pValue : Value for the specified capability item. If the item was not found then this will be returned as blank.
  • deprecated classmethod GetResourceFromContainer(pResourceContainer, Output pResource) as %Status
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    API Get the resource that is contained in a ResourceContainer object.

    Input:
  • pResourceContainer : (required) HS FHIR ResourceContainer object. Only one of its resource properties should be populated.

    Output:
  • pResource : FHIR resource object held in the container object.
  • deprecated classmethod GetResourceIdFromResource(pContentType As %String = "", pResourceStream, pResourceObject, Output pResourceId As %String) as %Status
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    API GetResourceIdFromResource retrieves the resource id of a given FHIR resource. The resource may be supplied to this method as a stream object, a string, a %DynamicObject or an %XML.Document object.

    Input:
  • pContentType : (required if not providing pResourceObject) May be the ContentType from a FHIR request, or even just "json" or "xml".
  • pResourceStream : (required if not providing pResourceObject) FHIR resource stream object or string.
  • pResourceObject : (required if not providing pResourceStream) %DynamicObject or %XML.Document object representation of the FHIR resource.

    Output:
  • pResourceId : FHIR resource id.
  • deprecated classmethod GetResourceInfo(pContentType, pResourceStream, pResourceObject, pResourceSchema As %String, ByRef pProperties As %Library.ArrayOfDataTypes) as %Status
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    API GetResourceInfo retrieves specified base information on a given FHIR resource. The resource may be supplied to this method as a stream object, a string, a %DynamicObject or an %XML.Document object. The properties available for retrieval via this method are:
  • resourceType (string)
  • id (string)
  • meta (object)
  • implicitRules (string)
  • language (string)
  • text (object)

    The caller specifies the desired properties by creating entries for them in the pProperties input %ArrayOfDataTypes. GetResourceInfo returns the values in the respective pProperties array entries.

    Usage example - assume a resource stream available in this example:

    Set pContentType = "xml"
    Set pResourceSchema = "HS.FHIR.vSTU3.Model.Resource" Set pProperties = ##class(%Library.ArrayOfDataTypes).%New()
    Do pProperties.SetAt("","resourceType")
    Do pProperties.SetAt("","id")
    Do pProperties.SetAt("","meta")
    Do pProperties.SetAt("","text")
    Set Status = ##class(HS.FHIR.Utils).GetResourceInfo(pContentType, pResourceStream, , pResourceSchema, pProperties)
    Write !,pProperties.GetAt("id")
    Write !,pProperties.GetAt("meta").versionId.value

    Input:
  • pContentType : (required) May be the ContentType from a FHIR request, or even just "json" or "xml".
  • pResourceStream : (required if not providing pResourceObject) FHIR resource stream object or string.
  • pResourceObject : (required if not providing pResourceStream) %DynamicObject or %XML.Document object representation of the FHIR resource.
  • pResourceSchema : (required if requesting "meta" or "text" properties) Class package to use as the resource schema. Example is "HS.FHIR.vSTU3.Model.Resource".
  • pProperties : (required) %ArrayOfDataTypes of properties to retrieve.

    Output:
  • pProperties : This array is returned with the entries populated with the data found.
  • deprecated classmethod GetResourceMetaFromResource(pContentType As %String = "", pResourceStream, pResourceObject, pResourceSchema, Output pResourceMeta) as %Status
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    API GetResourceMetaFromResource retrieves the resource meta property object of a given FHIR resource. The resource may be supplied to this method as a stream object, a string, a %DynamicObject or an %XML.Document object.

    Input:
  • pContentType : (required if not providing pResourceObject) May be the ContentType from a FHIR request, or even just "json" or "xml".
  • pResourceStream : (required if not providing pResourceObject) FHIR resource stream object or string.
  • pResourceObject : (required if not providing pResourceStream) %DynamicObject or %XML.Document object representation of the FHIR resource.
  • pResourceSchema : (required) Class package to use as the resource schema. Example is "HS.FHIR.vSTU3.Model.Resource".

    Output:
  • pResourceMeta : FHIR meta object from the resource.
  • deprecated classmethod GetResourceTypeFromContainer(pResourceContainer, Output pResourceType As %String) as %Status
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    API Get the resource type for the resource contained in a ResourceContainer object.

    Input:
  • pResourceContainer : (required) HS FHIR ResourceContainer object. Only one of its resource properties should be populated.

    Output:
  • pResourceType : Resource type of the resource held in pResourceContainer.
  • deprecated classmethod GetSDATypeList(Output pSDATypeList As %ListOfDataTypes, pVerbose=0) as %Status
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    deprecated classmethod GetSchemaForResourceProperty(pResourceSchema As %String, pResourceType As %String = "", pResourceProp As %String, ByRef pPropSchema As %String) as %Status
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    GetSchemaForResourceProperty finds the schema (currently defined as the class definition) for a given resource property, starting with a given resource schema.

    Input:
  • pResourceSchema : (required) Class package to use as the resource schema. Example is "HS.FHIR.vDSTU2.Model.Resource".
  • pResourceType : (optional) FHIR resource type (e.g., "Patient", "Observation", etc).
  • pResourceProp : (required) FHIR resource property name.

    Output:
  • pPropSchema : Class name that defines the property type.
  • deprecated classmethod GetTypeForXPath(pXPath As %String, pResourceSchemaRoot As %String, Output pType As %String) as %Status
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    API GetTypeForXPath evaluates a given FHIR resource XPath spec against a specified FHIR resource schema and returns the FHIR data model class type for the XPath element.

    Input:
  • pXPath : (required) XPath expression relating to a given FHIR resource type.
  • pResourceSchemaRoot : (required) Class package to use as the schema. Example is "HS.FHIR.vSTU3.Model.Resource".

    Output:
  • pType : FHIR data model class name.
  • deprecated classmethod GetURI(pType As %String, pCode As %String, pMode As %String = "strict", pDefault As %String = "") as %String
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    GetURI wraps the logic for obtaining a URI, based on a specified code and code type.
    deprecated classmethod GetURLBase(pRequest As HS.Message.FHIR.Request, ByRef pSC As %Status) as %String
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    Derive the http[s]://host:port/baseurl string from the CSP request information. The relevant CSP information was stored in the HS FHIR request message by HS.FHIR.REST.Handler.
    deprecated classmethod GetURLWithParams(pRequest As HS.Message.FHIR.Request, ByRef pSC As %Status) as %String
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    Derive the http[s]://host:port/baseurl string from the CSP request information, plus any resource type and/or resource id and/or operation parameters from the HS FHIR request message. The relevant CSP information was stored in the HS FHIR request message by HS.FHIR.REST.Handler.
    deprecated classmethod GetURLWithQuery(pRequest As HS.Message.FHIR.Request, ByRef pSC As %Status) as %String
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    Return the full request URI including the http protocol and host and port. This string is derived from the CSP request information that was stored into the HS FHIR request message by HS.FHIR.REST.Handler and from the current contents of the Parameters collection in the HS FHIR request message. Please note that this implies that some scenarios may remove some items from the Parameters collection before calling this method, due to those parameters being unsupported or invalid.
    deprecated classmethod GetValidFormats(pMode As %String, ByRef pFormats As %String)
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    deprecated classmethod GetValidResourceTypes() as %String
    Deprecated. Use ValidateResourceTypeFHIR() instead.
    deprecated classmethod HSFHIRToFHIR(pContentType As %String, pHSFHIRObj As %RegisteredObject, ByRef pFHIRStream As %Stream.GlobalCharacter, pFormatFHIROutput As %Boolean = 0, pDummy) as %Status
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    API HSFHIRToFHIR creates a FHIR XML or JSON stream from an HS FHIR data model object. Input:
  • pContentType : (required) May be the ContentType from a FHIR request, or even just "json" or "xml".
  • pHSFHIRObj : (required) HS FHIR data model object instance. NOT a %DynamicObject or %XML.Document object.
  • pFormatFHIROutput : 0 = Do not add indent and line terminator formatting to the output stream. 1 = Add indent and line terminator formatting to the output stream.
    Output::
  • pFHIRStream : FHIR stream object. If not passed in, is initialized as %Stream.GlobalCharacter.
  • pErrors : HS.Types.FHIR.Errors object that includes a collection of error information. See HS.Types.FHIR.Errors for more details.
  • deprecated classmethod HttpResponseContentLength(pHttpResponse As %Net.HttpResponse) as %Integer
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    API Helper to determine the amount of content in a %Net.HttpResponse instance
    deprecated classmethod IndexBundle(pBundle, ByRef pBundleIndex As %String)
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    IndexBundle creates some indexes for the specified Bundle. The indexes are held in a local array.
    deprecated classmethod IsOID(pString As %String) as %Boolean
    Deprecated. Please use HS.HC.Util IsOID().
    deprecated classmethod IsUUID(pString As %String) as %Boolean
    Deprecated. Please use HS.HC.Util IsUUID().
    deprecated classmethod IsValidResourceId(pResourceId As %String) as %Boolean
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    API Validate resource id as per http://hl7.org/fhir/datatypes.html#id
    deprecated classmethod IsValidResourceType(pType As %String) as %Boolean
    Deprecated. Use ValidateResourceTypeFHIR() instead.
    deprecated classmethod JSONDynamicObjectToXML(ByRef pJSONObject As %Library.DynamicObject, ByRef pXMLStream, pResourceSchemaRoot As %String = "", pIndentChars As %String = "", pLineTerminator As %String = "") as %Status
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    API JSONDynamicObjectToXML takes a FHIR JSON %DynamicObject as input, and returns a FHIR XML stream. This method needs a class package to be designated as the root of the data model classes to use during this transform. Indent character(s) and line terminator character(s) for the XML output are optional.

    Input:
  • pJSONObject : (required) FHIR JSON %DynamicObject.
  • pResourceSchemaRoot : (required) Class package to use as the schema. Example is "HS.FHIR.vSTU3.Model.Resource".
  • pIndentChars : (optional) Indent character(s) to use for each line in the XML output.
  • pLineTerminator : (optional) Line terminator character(s) to use for the XML output.


    Output:
  • pXMLStream : FHIR XML stream. If this object is not passed in then this method initializes it as a %Stream.TmpCharacter.
  • deprecated classmethod JSONToXML(pJSONStreamOrString, ByRef pXMLStream, pResourceSchemaRoot As %String = "", pIndentChars As %String = "", pLineTerminator As %String = "") as %Status
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    API JSONToXML takes a FHIR JSON stream object or string as input, and returns a FHIR XML stream. This method needs a class package to be designated as the root of the data model classes to use during this transform. Indent character(s) and line terminator character(s) for the XML output are optional.

    Input:
  • pJSONStreamOrString : (required) FHIR JSON stream object or string.
  • pResourceSchemaRoot : (required) Class package to use as the schema. Example is "HS.FHIR.vSTU3.Model.Resource".
  • pIndentChars : (optional) Indent character(s) to use for each line in the XML output.
  • pLineTerminator : (optional) Line terminator character(s) to use for the XML output.


    Output:
  • pXMLStream : FHIR XML stream. If this object is not passed in then this method initializes it as a %Stream.TmpCharacter.
  • deprecated classmethod OperationOutcomeFromStatus(pStatus As %Status, pContentType As %String, ByRef pResponse As HS.Message.FHIR.Response, pFormatFHIROutput As %Boolean = 0) as %Status
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    API Construct a FHIR OperationOutcome structure from a %Status value. Note that depending on the desired content type this structure could be JSON or XML.
    NOTE: The OperationOutcome structure isn't rich enough to capture the "embedded" status values in a %Status.
    Input:
  • pStatus : (required) %Library.Status object.
  • pContentType : (required) May be the ContentType from a FHIR request, or even just "json" or "xml".
  • pResponse : FHIR response object. If it is not passed in then it is created by this method.
  • pFormatFHIROutput : 0 = Do not add indent and line terminator formatting to the response Payload stream. 1 = Add indent and line terminator formatting to the response Payload stream.
  • deprecated classmethod ParseISCURI(pURI As %String, pMode As %String = "strict", Output pType As %String, Output pCode As %String) as %Status
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    GetURI wraps the logic for obtaining a Code, based on a specified URI.
    deprecated classmethod ParseUrlSpec(pUrlSpec As %String, ByRef pPattern As %String, ByRef pArgs As %List, pArgWrapper As %String = "") as %Status
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    Parse a URL spec (i.e. something like /fhir/:Type/:Id) into a regular expression pattern and a list of arg names (e.g. Type, Id) in a $LIST in group order (so the values can be extracted by name from the regular expression matcher). Optionally, the args can be "wrapped" in quotes etc. if needed (e.g. for code generation).
    deprecated classmethod SerializeResourceObject(pResourceObject, pFormatOption As %Integer = 0, pTransformer, pIndentChars As %String = "", pLineTerminator As %String = "", ByRef pResourceStream) as %Status
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    API SerializeResourceObject takes a FHIR %XML.Document object or %DynamicObject as input and serializes it as XML or JSON (depending on the object type) to the specified stream object.

    Input:
  • pResourceObject : (required) FHIR %XML.Document object or %DynamicObject.
  • pFormatOption : (optional) Applies only to XML. 0 = No formatting (i.e., strip existing indent and line end formatting). 1 = Add tab indent and line-feed-only line end formatting. 2 = Add tab indent and carriage return line feed line end formatting.
  • pTransformer : (optional) Applies only to XML, and only when pFormatOption is not 0. Transformer object to use for applying XML tab indent and line end formatting.
  • pIndentChars : (optional) Indent character(s) to use for each line in the XML output.
  • pLineTerminator : (optional) Line terminator character(s) to use for the XML output.


    Output:
  • pResourceStream : FHIR Stream object to use for FHIR output. This object may be passed in as an new stream object. Otherwise this method will initialize it as a %Stream.TmpCharacter.
  • deprecated classmethod SerializeXMLDocument(pXMLDocument As %XML.Document, ByRef pXMLStream, pFormatOption As %Integer = 0, pTransformer) as %Status
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    API SerializeXMLDocument takes an %XML.Document object as input and exports the serialized XML to the specified stream object.
    Input:
  • pXMLDocument : (required) %XML.Document object containing the FHIR resource.
  • pFormatOption : (required) 0 = No formatting (i.e., strip existing indent and line end formatting). 1 = Add tab indent and line-feed-only line end formatting. 2 = Add tab indent and carriage return line feed line end formatting.
  • pTransformer : Required only if pFormatOption is not 0. Transformer object to use for XSLT transformation to apply indent and line end formatting.

    Output:
  • pXMLStream : Stream object to use for FHIR XML output. This object may be passed in as an new stream object. Otherwise this method will initialize it as a %Stream.TmpCharacter.
  • deprecated classmethod SerializeXMLNode(pXMLDocument As %XML.Document, pXMLNode As %XML.Node, ByRef pXMLStream, pFormatOption As %Integer = 0, pTransformer) as %Status
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    API SerializeXMLNode takes an %XML.Document object and a %XML.Node iterator object from that %XML.Document as input. Basically, serialize just a specific tree within the XML document. It exports the serialized XML to the specified stream object.
    Input:
  • pXMLDocument : (required) %XML.Document object containing the FHIR resource.
  • pFormatOption : (required) 0 = No formatting (i.e., strip existing indent and line end formatting). 1 = Add tab indent and line-feed-only line end formatting. 2 = Add tab indent and carriage return line feed line end formatting.
  • pTransformer : Required only if pFormatOption is not 0. Transformer object to use for XSLT transformation to apply indent and line end formatting.

    Output:
  • pXMLStream : Stream object to use for FHIR XML output. This object may be passed in as an new stream object. Otherwise this method will initialize it as a %Stream.TmpCharacter.
  • deprecated classmethod SetParameter(pParamName As %String = "", pParamValue As %String = "", pModifier As %String = "", pParametersArray As %Library.ArrayOfDataTypes) as %Status
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    API SetParameter adds the specified parameter, modifier, and value to the pParametersArray collection.
    deprecated classmethod StartBundleStream(pContentType As %String, pBundleStream As %Stream.Object, pIdentifier="", pType As %String, pTotal As %String = "", pFirstUrl As %String = "", pPrevUrl As %String = "", pSelfUrl As %String = "", pNextUrl As %String = "", pLastUrl As %String = "") as %Status
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    API StartBundleStream writes to a stream object the first standard elements of a FHIR Bundle resource: type, total, link.
    This method is intended to be used in conjunction with the methods AddBundleEntryToStream and EndBundleStream.
    Input:
  • pContentType : (required) May be the ContentType from a FHIR request, or even just "json" or "xml".
  • pBundleStream : Bundle stream object, to be updated by this method. If this object is not passed in, then this method instantiates it as %Stream.TmpCharacter.
  • pIdentifier : Not yet implemented.
  • pType : (required) Bundle type.
  • pTotal : If search, the total number of matches.
  • pFirstUrl : For link, the url for the "first" link (for paging).
  • pPrevUrl : For link, the url for the "previous" link (for paging).
  • pSelfUrl : For link, the url for for "self" link for the url that caused this Bundle.
  • pNextUrl : For link, the url for the "next" link (for paging).
  • pLastUrl : For link, the url for the "last" link (for paging).
  • deprecated classmethod StartOutcomeStream(pContentType As %String, ByRef pStream As %Stream.Object, pFormatFHIROutput As %Boolean = 0) as %Status
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    API StartOutcomeStream starts a FHIR OperationOutcome resource stream. This method is intended to be used in conjunction with AddOutcomeIssueStream and EndOutcomeStream.
    Input:
  • pContentType : (required) May be the ContentType from a FHIR request, or even just "json" or "xml".
  • pFormatFHIROutput : 0 = No indent or line end formatting on the output stream. 1 = Add indent or line end formatting on the output stream.
    Output:
  • pStream : OperationOutcome resource stream object. This object may be passed in as a new stream object. Otherwise it will be initialized as a %Stream.TmpCharacter object.
  • deprecated classmethod StatusToHttp(pStatus As %Status, ByRef pHttpStatus As %String = "") as %Status
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    Convert common %Status values into HTTP status codes. Note: this is not exhaustive
    deprecated classmethod URLParamStringToArray(pParametersString As %String, Output pParametersArray As %Library.ArrayOfDataTypes)
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    API URLParamStringToArray takes a URL parameters string and converts it to an array of $List.

    Input:
  • pParametersString : Parameters string exactly as one would see in a request URL.

    Output:
  • pParametersArray : %Library.ArrayOfDataTypes that is an array of $List, indexed by parameter name. Use the GetParameterCount() and GetParameterValue() methods of this class to extract information from this array.
  • deprecated classmethod URLParameterArrayToString(pParametersArray As %Library.ArrayOfDataTypes) as %String
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    deprecated classmethod UpdateResourceId(ByRef pResourceObject, pResourceId As %String) as %Status
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    API UpdateResourceId updates the FHIR resource id in a previously-established %DynamicObject or %XML.Document representation of the resource.

    Input:
  • pResourceObject : (required) %DynamicObject or %XML.Document representation of the resource.
  • pResourceId : (required) The resource id to set into the resource.

    Output:
  • pResourceObject : The updated resource object.
  • deprecated classmethod UpdateResourceMeta(ByRef pResourceObject, pResourceMeta) as %Status
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    API UpdateResourceMeta updates the FHIR resource meta object property in a previously-established %DynamicObject or %XML.Document representation of the resource.

    Input:
  • pResourceObject : (required) %DynamicObject or %XML.Document representation of the resource.
  • pResourceMeta : The resource meta object to set into the resource.

    Output:
  • pResourceObject : The updated resource object.
  • deprecated classmethod V2ToFHIRDateTime(pTS As %String, pIsUTC As %Boolean = 0, pCvtToLocal As %Boolean = 0) as %String
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    API V2ToFHIRDateTime converts HL7 V2 TS (aka DTM) format YYYYDDMMHHMMSS to FHIR DateTime format.
    Input Parameters:
    - pTS : HL7v2 time stamp.
    - pIsUTC : 0 = pTS is local time, 1 = pTS is UTC time.
    - pCvtToLocal : 0 = Do not convert output to local time zone, 1 = Convert output to local time zone.
    deprecated classmethod V2ToFHIRInstant(pTS As %String, pIsUTC As %Boolean = 0, pCvtToLocal As %Boolean = 0) as %String
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    API V2ToFHIRInstant converts HL7 V2 TS (aka DTM) format YYYYDDMMHHMMSS to FHIR Instant format.
    deprecated classmethod ValidateAudience(pJWTObject As %Library.DynamicAbstractObject) as %Boolean
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    Compares the current audience against the aud value(s), if any, in the access token. This comparison is trailing-slash-insensitive and case-insensitive.
    deprecated classmethod ValidateResourceInteraction(pResourceType As %String, pInteraction As %String, pCapabilityStatement, ByRef pIsValid As %Boolean) as %Status
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    API ValidateResourceInteraction validates the specified interaction on the specified FHIR resource type against the specified Conformance/CapabilityStatement.

    Input:
  • pResourceType : (required) FHIR resource type.
  • pInteraction : (required) FHIR RESTful interaction.
  • pCapabilityStatement : (required) %XML.XPATH.Document representation of a FHIR Conformance/CapabilityStatement resource.

    Output:
  • pIsValid : 0 = Is not a valid or supported interaction on the resource type as per the specified Conformance/CapabilityStatement, 1 = Is valid.
  • deprecated classmethod ValidateResourceTypeCapability(pResourceType As %String, pCapabilityStatement, ByRef pIsValid As %Boolean) as %Status
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    API ValidateResourceTypeCapability validates the specified resource type against the specified Conformance/CapabilityStatement.
    Input:
  • pResourceType : (required) FHIR resource type.
  • pCapabilityStatement : (required) %XML.XPATH.Document representation of a FHIR Conformance/CapabilityStatement resource.

    Output:
  • pIsValid : 0 = Is not a valid resource type as per the specified Conformance/CapabilityStatement, 1 = Is valid.
  • deprecated classmethod ValidateResourceTypeFHIR(pResourceType As %String, pResourceSchemaRoot As %String, ByRef pIsValid As %Boolean) as %Status
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    API ValidateResourceTypeFHIR validates the specified resource type against the specified HS FHIR data model class package.
    Input:
  • pResourceType : (required) FHIR resource type.
  • pResourceSchemaRoot : (required) Class package to use as the schema. Example is "HS.FHIR.vSTU3.Model.Resource".

    Output:
  • pIsValid : 0 = Is not a valid resource type as per the specified schema, 1 = Is valid.
  • deprecated classmethod ValidateSystemInteraction(pInteraction As %String, pCapabilityStatement, ByRef pIsValid As %Boolean) as %Status
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    API ValidateSystemInteraction validates the specified interaction on the Conformance/CapabilityStatement server definition.

    Input:
  • pInteraction : (required) FHIR RESTful interaction.
  • pCapabilityStatement : (required) %XML.XPATH.Document representation of a FHIR Conformance/CapabilityStatement resource.

    Output:
  • pIsValid : 0 = Is not a valid or supported interaction on the system type as per the specified Conformance/CapabilityStatement, 1 = Is valid.
  • deprecated classmethod VerifyWithAccessToken(pJSONWebToken As %String, pFHIRVersion As %String, pResourceType As %String, pResourceId As %String = "", pInteraction As %String, pResourceObj="", pResourceStream As %Stream.Object = "", Output pApproved As %Boolean) as %Status
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    API VerifyWithAccessToken verifies the authorization of a request based on the provided access token and the specified request and/or resource data.
    Input:
  • pJSONWebToken : (required) JSON string representation of the access token.
  • pFHIRVersion : (required) FHIR version (DSTU2, STU3, etc.).
  • pResourceType : (required) Resource type.
  • pResourceId : Resource id.
  • pInteraction : (required) Interaction (e.g., create, update, search, etc.).
  • pResourceObj : Resource %DynamicObject or %XML.Document object.
  • pResourceStream : Resource stream object.
    Output:
  • pApproved : Boolean indicator of whether the item is approved as per the access token.
  • deprecated classmethod XMLDocumentToDynamicObject(pXMLDocument As %XML.Document, pResourceSchemaRoot As %String, Output pDynObj As %Library.DynamicObject) as %Status
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    API XMLDocumentToDynamicObject takes an %XML.Document object representation of a FHIR XML payload as input, and returns a %DynamicObject. This method needs a class package to be designated as the root of the data model classes to use during this transform.

    Input:
  • pXMLDocument : (required) %XML.Document object representation of the FHIR XML.
  • pResourceSchemaRoot : (required) Class package to use as the schema. Example is "HS.FHIR.vSTU3.Model.Resource".

    Output:
  • pDynObj : %DynamicObject representation of the FHIR payload.
  • deprecated classmethod XMLDocumentToJSON(pXMLDocument As %XML.Document, ByRef pJSONStream As %Stream.Object, pResourceSchemaRoot As %String, pIndentChars As %String = "", pLineTerminator As %String = "") as %Status
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    API XMLDocumentToJSON takes an %XML.Document object representation of a FHIR XML payload as input, and returns a FHIR JSON stream. This method needs a class package to be designated as the root of the data model classes to use during this transform. Indent character(s) and line terminator character(s) for the XML output are optional.

    Input:
  • pXMLDocument : (required) %XML.Document object representation of the FHIR XML.
  • pResourceSchemaRoot : (required) Class package to use as the schema. Example is "HS.FHIR.vSTU3.Model.Resource".
  • pIndentChars : (optional) Indent character(s) to use for each line in the XML output.
  • pLineTerminator : (optional) Line terminator character(s) to use for the XML output.


    Output:
  • pJSONStream : FHIR JSON Stream. If this object is not passed in as input then this method initializes it as a %Stream.GlobalCharacter.
  • deprecated classmethod XMLToJSON(pXMLStreamOrString, Output pJSONStream As %Stream.Object, pResourceSchemaRoot As %String, pIndentChars As %String = "", pLineTerminator As %String = "") as %Status
    THIS CLASS IS DEPRECATED Use HS.FHIRServer.* instead.
    API XMLToJSON takes a FHIR XML stream object or string as input, and returns a FHIR JSON stream. This method requires a class package to be designated as the root of the data model classes to use during this transform. Indent character(s) and line terminator character(s) for the JSON output are optional.

    Input:
  • pXMLStreamOrString : (required) FHIR XML stream object or string.
  • pResourceSchemaRoot : (required) Class package to use as the schema. Example is "HS.FHIR.vSTU3.Model.Resource".
  • pIndentChars : (optional) Indent character(s) to use for each line in the XML output.
  • pLineTerminator : (optional) Line terminator character(s) to use for the XML output.

    Output:
  • pJSONStream : FHIR JSON stream. If this object is not passed in as input then this method initializes it as %Stream.TmpCharacter.
  • Feedback