HS.FHIRServer.Installer
abstract class HS.FHIRServer.Installer
Method Inventory
- AddPackagesToInstance()
- AddSQLProceduresToRole()
- CSPAppExists()
- DecommissionInstance()
- GetAllPackageSources()
- GetCSPAppRoles()
- InitializeProfileValidator()
- InstallCSPAppInterop()
- InstallInstance()
- InstallMetadataSet()
- InstallNamespace()
- InteropAdapterConfig()
- Reset()
- ResourceExists()
- RoleExists()
- UninstallInstance()
- UninstallMetadataSet()
- UpdateInstance()
- WriteToValidatorLog()
Methods
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
@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:
- Removes the CSP configuration
- Removes the web application
- Flags the ServiceInstance as decommissioned and retains data according to retention policies
- NOTE: a Strategy may have not retention policy and completely delete the service and its data
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.
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:
- Initializes Metadata information into Globals
- Creates the CSP Application for the FHIR endpoint (with url = pAppKey)
- Creates a CSPRESTConfig instance associated with the CSP app. Specifies the OAuth client name (if any)
- Creates a default HS.FHIRServer.API.ConfigData object for this instance
- Delegates to the Strategy object to generate/initialize any storage classes or globals
- Generates a Capabilities statement for the service (based on the MetadataSet and readOnlyCapabilites flag)
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
- All Intersystems-provided MetadataSet descriptors
- The External Language Server for profile validation if it does not already exist
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
@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.
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
@API
This method uninstalls an instance of a FHIR Service in the current namespace
It performs the following operations:
- Removes the CSP configuration
- Removes the web application
- Optionally deletes data associated 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)