Skip to main content

HS.FHIRServer.Installer

abstract class HS.FHIRServer.Installer

Method Inventory

Methods

classmethod AddPackagesToInstance(pServiceId As %String, pPackageList As %List)
This method updates a service instance (endpoint) to support the specified list of FHIR metadata packages. Each package in the input %List must depend on the core FHIR version supported by the service instance. This method is idempotent, it will only add package that are not already supported.
@Input pServiceId The id of the ServiceInstance
@Input pPackageList A %List of FHIR metadata package Id's to be supported
classmethod AddSQLProceduresToRole(pNamespace As %String, pRole As %String, pSQLProceduresList As %List) as %Status
classmethod CSPAppExists(pCSPApp, ByRef pAppObj, ByRef pSC) as %Boolean
classmethod DecommissionInstance(instanceId As %String)
@API This method decommissions an instance of a FHIR Service in the current namespace It performs the following operations:
  1. Removes the CSP configuration
  2. Removes the web application
  3. Flags the ServiceInstance as decommissioned and retains data according to retention policies
  4. NOTE: a Strategy may have not retention policy and completely delete the service and its data
@Input instanceId Unique key for the endpoint.
classmethod GetAllPackageSources() as %List
For each FHIR enabled namespace loop through all imported packages and add the directories containing the profile information to the list. This allows us to pass in the directory list to the java validator, so that it can use the profiles.
classmethod GetCSPAppRoles(pCSPApp As %String) as %String
classmethod InitializeProfileValidator(Output pErrorMsg As %String = "") as %Status
Create the External Language Server needed for running FHIR profile validation if it doesn't yet exist. Then load profiles from this Instance into the java validator. This is called when creating a new FHIR namespace because it is used by the endpoint to perform profile validation, but we only need one ELS per Instance even if there are multiple endpoints across multiple namespaces.
It is recommended to call this method after a restart of the Intance or External Language Server so that we don't have the performance hit of loading the profiles during the validate operation.
classmethod InstallCSPAppInterop(pAppKey As %String = "")
This method installs a CSP app for a interoperability endpoint It behaves similarly to ..InstallCSPApp @Input pAppKey Unique key for the endpoint.
classmethod InstallInstance(pAppKey As %String = "", pStrategyClass As %String, pPackageList As %String, pOAuthClientName As %String = "", pDesc As %String = "", pCreateDatabases=1, pResourcePath As %String = "", pVersionPath As %String = "", pDisplayName As %String = "")
This method creates a new repo and adds the service to the repo. It installs an instance of a FHIR Service into the current namespace It performs the following operations:
  1. Initializes Metadata information into Globals
  2. Creates the CSP Application for the FHIR endpoint (with url = pAppKey)
  3. Creates a CSPRESTConfig instance associated with the CSP app. Specifies the OAuth client name (if any)
  4. Creates a default HS.FHIRServer.API.ConfigData object for this instance
  5. Delegates to the Strategy object to generate/initialize any storage classes or globals
  6. Generates a Capabilities statement for the service (based on the MetadataSet and readOnlyCapabilites flag)
@Input pAppKey Unique key for the endpoint. @Input pStrategyClass Class that extends HS.FHIRServer.InteractionsStrategy, which defines endpoint strategy @Input pPackageList %List of FHIR Metadata packages. @Input pOAuthClientName (optional) The OAuth 2.0 Client name to be used by the resource server. @Input pDesc (optional) Description of the endpoint that is used for the Web Application. @Input pCreateDatabases (optional) Specifies whether separate databases should be created for the FHIR data. The default value is 1(yes). @Input pResourcePath (optional) Specifies the location of FHIR resource tables and FHIR search tables. The default value is an empty string which means that the database will be created under the mgr directory. @Input pVersionPath (optional) Specifies the location of FHIR version tables. The default value is an empty string which means that the database will be created under the mgr directory. @Input pDisplayName (optional) Endpoint display name when interacting via the FHIR Config UI
deprecated classmethod InstallMetadataSet(key As %String, description As %String, extendsKey As %String, fileData As %List, reloadMetadata As %Boolean)
This method is no longer available, it has been replaced by HS.FHIRMeta.Load.NpmLoader::importPackages
classmethod InstallNamespace(namespace As %String = $namespace)
@API This method installs elements that are required for a FHIR-enabled namespace
  1. All Intersystems-provided MetadataSet descriptors
  2. The External Language Server for profile validation if it does not already exist
@Input namespace Namespace to install the FHIR application.
classmethod InteropAdapterConfig(adapterUrl As %String)
@API This method creates a business service and operation for an interoperability adapter. @Input adapterUrl URL of the interoperability adapter endpoint
classmethod Reset(instanceId As %String = "", pAppKey As %String = "")
@API
Reset the data in a FHIR Server endpoint. This will delete all FHIR Resources in the identified repository.

One of either the 'instanceId' or 'pAppKey' input parameters must be specified and valid. If both are specified only the instanceId will be used.

@Input instanceId - aka the RepoInstance serviceId
@Input pAppKey - the CSP Url of the RepoInstance

Throws an exception if both instanceId and pAppKey are undefined, or if either is invalid.
classmethod ResourceExists(pResource) as %Boolean
classmethod RoleExists(pRole) as %Boolean
classmethod UninstallInstance(pAppKey As %String, deleteData As %Boolean = 1)
@API This method uninstalls an instance of a FHIR Service in the current namespace It performs the following operations:
  1. Removes the CSP configuration
  2. Removes the web application
  3. Optionally deletes data associated with the endpoint
@Input pAppKey Unique key for the endpoint. @Input deleteData (optional) Whether to also delete the data assocaited with the endpoint.
deprecated classmethod UninstallMetadataSet(key As %String)
This method is no longer available, it has been replaced by HS.FHIRMeta.Load.NpmLoader::importPackages
classmethod UpdateInstance(pAppKey As %String, pServiceConfigData As %String, pEnabled As %Boolean, pServiceConfigName As %String, pOAuthClientName As %String, pDisplayName As %String = "")
This method updates an existing service instance. All settings are primitive data types (%String, %Boolean, etc..) so that this method may be called asynchronously (HSMOD.REST.Async requires input parameters to not be objects). All inputs must be provided. The current values can be retrieved from the ServiceInstance object. @Input pAppKey Unique key for the endpoint. @Input pServiceConfigData Serialized json representation of HS.FHIRServer.API.ConfigData. @Input pEnabled Whether the service is enabled. @Input pServiceConfigName The Interop ServiceConfigName for the endpoint. @Input pOAuthClientName The OAuth 2.0 Client name to be used by the resource server. @Input pDisplayName The display name / friendly name for the endpoint. Used in UI display.
classmethod WriteToValidatorLog(pMsgArray As %DynamicArray)
FeedbackOpens in a new tab