Skip to main content

HS.FHIRServer.Management.REST.v1.impl

class HS.FHIRServer.Management.REST.v1.impl extends %REST.Impl

Set of REST APIs for managing all FHIR Server endpoints in a given IRIS instance
Business logic class defined by OpenAPI in HS.FHIRServer.Management.REST.v1.spec
Updated Jul 16, 2024 10:44:27

Method Inventory

Parameters

parameter ExposeServerExceptions = 1;
If ExposeServerExceptions is true, then details of internal errors will be exposed.

Methods

classmethod AddEndpoint(namespace As %String, payloadBody As %DynamicObject) as %DynamicObject
Creates a new FHIRServer endpoint. The endpoint creation can take several minutes, so it will be done async and return a job reference that the client can poll for status.
The method arguments hold values for:
namespace, The IRIS Namespace to perform the operation in.
payloadBody, Request body contents
classmethod AddFile(jobId As %String, file As %Stream.Object) as %DynamicObject
Add a file to the DataLoader jobId.
The method arguments hold values for:
jobId, DataLoader JobId
file, JSON or NDJSON format file
classmethod CancelOrClean(jobId As %String, action As %String) as %DynamicObject
Cancel or Cleanup a DataLoader Job.
The method arguments hold values for:
jobId, DataLoader JobId
action, If 'action=cancel' flags the DataLoader job to exit gracefully. Cancelling a job may take several seconds for the dataloader job to exit. Poll Job status to confirm Job is not running before using the 'action=cleanup'.

If 'action=cleanup' deletes status info for the job.

If 'action=all' then the dataloader job be flagged to exit and will automatically clean up status info after exiting.
classmethod CreateJob() as %DynamicObject
Create a new DataLoader Job. The returned jobId can be used to add files to the Job's directory and then start the job.
classmethod DeleteEndpoint(serviceId As %Integer, namespace As %String, action As %String) as %DynamicObject
Delete, Decommission or Reset an endpoint.
The method arguments hold values for:
serviceId, Server assigned ID for the Endpoint.
namespace, The IRIS Namespace to perform the operation in.
action, Required: can delete, decommission or reset an Endpoint
classmethod DeletePackage(id As %String, namespace As %String) as %DynamicObject
Deletes FHIR Metadata for the specified Package.
The method arguments hold values for:
id, Package ID ( name@version)
namespace, The IRIS Namespace to perform the operation in.
classmethod GetDataLoaderJobs() as %DynamicObject
Returns an array of all DataLoader Jobs and their status information.
classmethod GetEndpointJobs(clear As %Boolean) as %DynamicObject
Gets an array of all async Jobs for FHIR Endpoints in all Namespaces.
The method arguments hold values for:
clear, Will clean up jobs that have finished (competed or errored). Errored jobs will be cleaned up, but will still be returned for this one invocation.
classmethod GetEndpoints(namespace As %String, jobs As %Boolean, metrics As %String) as %DynamicObject
Returns an array of all Endpoint objects for the namespace.
The method arguments hold values for:
namespace, The IRIS Namespace to perform the operation in.
jobs, Include Jobs associated with the Endpoint(s).
metrics, Include additional Endpoint metrics.
classmethod GetFHIRNamespaces(endpoints As %Boolean, jobs As %Boolean, metrics As %String, endpointsetup As %Boolean) as %DynamicObject
Returns an array of FHIR enabled Namespaces and their Endpoint and EndpointSetup info.
The method arguments hold values for:
endpoints, Include Endpoints info with each Namespace.
jobs, Include Jobs associated with the Endpoint(s).
metrics, Include additional Endpoint metrics.
endpoint-setup, Include the EndpointSetup info with each Namespace.
classmethod GetInfo() as %DynamicObject
Returns all the info needed to display our FHIR Server Management UI. Instance and Version info plus all the Namespaces.
classmethod GetOneEndpoint(serviceId As %Integer, namespace As %String, jobs As %Boolean, metrics As %String) as %DynamicObject
Returns an Endpoint by serviceId.
The method arguments hold values for:
serviceId, Server assigned ID for the Endpoint.
namespace, The IRIS Namespace to perform the operation in.
jobs, Include Jobs associated with the Endpoint(s).
metrics, Include additional Endpoint metrics.
classmethod GetOneJob(jobKey As %String) as %DynamicObject
Returns status of one async Endpoint Job by job_key.
The method arguments hold values for:
jobKey
classmethod GetOnePackage(id As %String, namespace As %String) as %DynamicObject
Gets FHIR Metadata Package info by id.
The method arguments hold values for:
id, Package ID ( name@version)
namespace, The IRIS Namespace to perform the operation in.
classmethod GetPackages(namespace As %String) as %DynamicObject
Gets an array of all FHIR Metadata Packages installed in a specified Namespace.
The method arguments hold values for:
namespace, The IRIS Namespace to perform the operation in.
classmethod Start(jobId As %String, namespace As %String, serviceId As %Integer) as %DynamicObject
Start a DataLoader job by jobId.

The files created for this jobId will be cleaned up at the end of processing.

Any errors outside of a malformed request indicate that a cleanup for this jobId should be called and then start over with a new jobId.
The method arguments hold values for:
jobId, DataLoader JobId
namespace, The IRIS Namespace to perform the operation in.
serviceId, FHIR Server ServiceId. This selects which Endpoint data will be loaded into.
classmethod Status(jobId As %String) as %DynamicObject
Returns the status of the DataLoader Job.

Status data is persisted in IRISTEMP and will be available for a given jobId until it is cleaned up or the instance is restarted.

The method arguments hold values for:
jobId, DataLoader JobId
classmethod UpdateEndpoint(serviceId As %Integer, namespace As %String, payloadBody As %DynamicObject) as %DynamicObject
Update an existing Endpoint. ServiceId in request URL must match serviceId in request body. When a new package is added this becomes an async request and returns a job object. Otherwise it will synchronously update the endpoint and return the Endpoint object after being updated.
The method arguments hold values for:
serviceId, Server assigned ID for the Endpoint.
namespace, The IRIS Namespace to perform the operation in.
payloadBody, Request body contents
classmethod UploadPackage(namespace As %String, body As %DynamicArray) as %DynamicObject
Upload a FHIR Metadata package. Must convert all files into the JSON body
The method arguments hold values for:
namespace, The IRIS Namespace to perform the operation in.
body, Each file in the FHIR Metadata package needs to be converted to an object in the array where the filename is the 'name' and the file contents are the 'data'.

Inherited Members

Inherited Methods

FeedbackOpens in a new tab