Epic connector
Epic is a healthcare-related service which handles patient medical records. The Epic connector lets you manage and synchronize accounts between Epic and the IDM managed user objects. An Epic administrator account on the Epic system you wish to connect to is required for this connector to work.
Before you start
Before you configure the connector, log in to your Epic administrator account and note the following:
-
Client ID
-
Username
-
Password
-
Private key (Generate an RSA keypair and convert to PKCS8)
To generate your private key:
-
Generate and download an RSA key pair.
-
Run the following command to convert the RSA private key to PKCS8 format:
openssl pkcs8 -topk8 -nocrypt -in privatekey.pem -out epic_pkcs8_private_key.pem
-
After generating the private key in PKCS8 format, remove
-----BEGIN PRIVATE KEY-----
and-----END PRIVATE KEY-----
from the generated PKCS8 private key file. -
Remove any escape characters such as
\n
or\r
.
-
-
REST endpoint (Optional)
-
SOAP endpoint (Optional)
-
Max records (Optional)
-
User template file path (Optional)
-
User sub template file path (Optional)
-
In Basket classification file path (Optional)
-
Group file path (Optional)
The user template, user sub template, in basket, and group file paths are local paths that are accessible to the IDM or RCS instance. |
Install the Epic connector
Download the connector .jar file from the ForgeRock BackStage download site.
-
If you are running the connector locally, place it in the
/path/to/openidm/connectors
directory, for example:mv ~/Downloads/epic-connector-1.5.20.9.jar /path/to/openidm/connectors/
-
If you are using a remote connector server (RCS), place it in the
/path/to/openicf/connectors
directory on the RCS.
Configure the Epic connector
Create a connector configuration using the admin UI:
-
Select Configure > Connectors and click New Connector.
-
Enter a Connector Name.
-
Select Epic Connector - 1.5.20.9 as the Connector Type.
-
Provide the Base Connector Details.
-
Click Save.
When your connector is configured correctly, the connector displays as Active in the admin UI.
Alternatively, test that the configuration is correct by running the following command:
curl \ --header "X-OpenIDM-Username: openidm-admin" \ --header "X-OpenIDM-Password: openidm-admin" \ --header "Accept-API-Version: resource=1.0" \ --request POST \ "http://localhost:8080/openidm/system/Epic?_action=test" { "name": "Epic", "enabled": true, "config": "config/provisioner.openicf/Epic", "connectorRef": { "bundleVersion": "[1.5.0.0,1.6.0.0)", "bundleName": "org.forgerock.openicf.connectors.epic-connector", "connectorName": "org.forgerock.openicf.connectors.epic.EpicConnector" }, "displayName": "Epic Connector", "objectTypes": [ "__ACCOUNT__", "__ALL__" ], "ok": true }
If the command returns "ok": true
, your connector has been configured correctly, and can authenticate to the Epic server.
Configure connection pooling
The Epic connector supports connection pooling, which can substantially improve the performance of the connector. The basic connection pooling configuration is described in Connection pooling configuration.
Use the Epic connector
The following resources are supported by the Epic connector:
Connector Resource | Epic Resource Type |
---|---|
|
Users |
|
Departments |
|
Groups |
|
Linked Provider |
|
User Template |
|
User Sub Template |
|
In Basket Classifications |
You can use the Epic connector to perform the following actions on an Epic account:
Create an Epic user
The following example creates a user with the minimum required attributes:
curl \ --header "X-OpenIDM-Username: openidm-admin" \ --header "X-OpenIDM-Password: openidm-admin" \ --header "Content-Type: application/json"\ --request POST \ --data '{ "UserID": "8675309”, "__NAME__": "Walter, Taylor" }'\ "http://localhost:8080/openidm/system/Epic/__ACCOUNT__?_action=create" { "_id": "8675309", "UserComplexName": { "FirstName": "Taylor", "GivenNameInitials": "", "MiddleName": "", "LastName": "Walter", "LastNamePrefix": "", "SpouseLastName": "", "SpousePrefix": "", "Suffix": "", "AcademicTitle": "", "PrimaryTitle": "", "SpouseLastNameFirst": false, "FatherName": "", "GrandfatherName": "" }, "BlockStatus": { "IsBlocked": false, "Reason": "", "Comment": "" }, "__GROUP__": [], "ContactComment": "Initial contact created via web service", "UserID": "8675309", "__NAME__": "WALTER, TAYLOR", "UsersManagers": [], "InBasketClassifications": [], "__ENABLE__": true }
|
Query Epic user entries
The following example queries all Epic users:
curl \ --header "X-OpenIDM-Username: openidm-admin" \ --header "X-OpenIDM-Password: openidm-admin" \ --header "Content-Type: application/json" \ --request GET \ "http://localhost:8080/openidm/system/Epic/__ACCOUNT__?_queryId=query-all-ids" { "result": [ { "_id": "dsully" }, { "_id": "999999999" }, { "_id": "admin@ACECompany.com" }, { "_id": "extuser320" }, { "_id": "Achong" }, { "_id": "dsewell" }, { "_id": "8675309" }, { "_id": "atestuser" }, { "_id": "Amaraphornc" }, { "_id": "jocampo" } ], "resultCount": 10, "pagedResultsCookie": null, "totalPagedResultsPolicy": "NONE", "totalPagedResults": -1, "remainingPagedResults": -1 }
The following command queries a specific user by their ID:
curl \ --header "X-OpenIDM-Username: openidm-admin" \ --header "X-OpenIDM-Password: openidm-admin" \ --header "Content-Type: application/json" \ --request GET \ "http://localhost:8080/openidm/system/Epic/__ACCOUNT__/8675309" { "_id": "8675309", "UserComplexName": { "FirstName": "Taylor", "GivenNameInitials": "", "MiddleName": "", "LastName": "Walter", "LastNamePrefix": "", "SpouseLastName": "", "SpousePrefix": "", "Suffix": "", "AcademicTitle": "", "PrimaryTitle": "", "SpouseLastNameFirst": false, "FatherName": "", "GrandfatherName": "" }, "BlockStatus": { "IsBlocked": false, "Reason": "", "Comment": "" }, "__GROUP__": [], "ContactComment": "Initial contact created via web service", "UserID": "8675309", "__NAME__": "WALTER, TAYLOR", "UsersManagers": [], "InBasketClassifications": [], "__ENABLE__": true }
Modify an Epic user entry
You can modify an existing user with a PUT request, including all attributes of the account in the request. You can use the Epic connector to modify the following attributes:
User accounts
-
__ENABLE__
-
__GROUP__
-
__NAME__
(Required) -
__PASSWORD__
-
UserID
-
UserIDType
-
UserAlias
-
UserPhotoPath
-
Sex
-
Notes
-
Provider
-
LinkedProviderID
-
Department
-
ContactComment
-
ContactDate
-
SystemLoginID
-
LDAPOverrideID
-
DefaultLoginDepartmentID
-
ReportGrouper1
-
ReportGrouper2
-
ReportGrouper3
-
CategoryReportGrouper
-
InBasketClassifications
-
UsersManagers
-
PrimaryManager
-
DefaultTemplateID
-
UserTemplate
-
UserSubtemplateIDs
-
UserComplexName
-UserComplexName
has the following sub-attributes:-
FirstName
-
GivenNameInitials
-
MiddleName
-
LastName
-
LastNamePrefix
-
SpouseLastName
-
SpousePrefix
-
SpouseLastNameFirst
-
Suffix
When updating a user, __NAME__
overrides theFirstName
,LastName
andMiddleName
ofUserComplexName
attributes. -
-
IsActive
-
BlockStatus
-BlockStatus
has the following sub-attributes:-
IsBlocked
-
BlockStatus.Comment
-
In Basket Classifications
-
__UID__
-
__NAME__
Groups
-
__UID__
-
__NAME__
-
Type
User Templates
-
__UID__
-
__NAME__
User Sub Templates
-
__UID__
-
__NAME__
Provider
-
__NAME__
-
__UID__
-
ExternalID
-
Title
-
NPI ID
-
Provider Type
-
Specialty
-
Practice Name
-
Street Address
-
Phone
For example, to add a Suffix
to a user:
curl \ --header "X-OpenIDM-Username: openidm-admin" \ --header "X-OpenIDM-Password: openidm-admin" \ --header "Content-Type: application/json" \ --header "if-Match:*" \ --request PUT \ --data '{ "__NAME__": "Walter, Taylor", "UserComplexName": { "Suffix": "Junior" } }' \ "http://localhost:8080/openidm/system/Epic/__ACCOUNT__/8675309" { "_id": "8675309", "UserComplexName": { "FirstName": "Taylor", "GivenNameInitials": "", "MiddleName": "", "LastName": "Walter", "LastNamePrefix": "", "SpouseLastName": "", "SpousePrefix": "", "Suffix": "Jr.", "AcademicTitle": "", "PrimaryTitle": "", "SpouseLastNameFirst": false, "FatherName": "", "GrandfatherName": "" }, "BlockStatus": { "IsBlocked": false, "Reason": "", "Comment": "" }, "__GROUP__": [], "UserID": "8675309", "__NAME__": "WALTER, TAYLOR JR.", "UsersManagers": [], "InBasketClassifications": [], "__ENABLE__": true }
Reset an Epic user account password
To reset the password for Epic user account, you can use the connector to change a user’s password.
curl \ --header "X-OpenIDM-Username: openidm-admin" \ --header "X-OpenIDM-Password: openidm-admin" \ --header "Content-Type: application/json" \ --header "if-Match:*" \ --request PUT \ --data '{ "__PASSWORD__": "Passw0rd@123!", "__NAME__": "Walter, Taylor" }' \ "http://localhost:8080/openidm/system/Epic/__ACCOUNT__/8675309" { "_id": "8675309", "UserComplexName": { "FirstName": "Taylor", "GivenNameInitials": "", "MiddleName": "", "LastName": "Walter", "LastNamePrefix": "", "SpouseLastName": "", "SpousePrefix": "", "Suffix": "", "AcademicTitle": "", "PrimaryTitle": "", "SpouseLastNameFirst": false, "FatherName": "", "GrandfatherName": "" }, "BlockStatus": { "IsBlocked": false, "Reason": "", "Comment": "" }, "__GROUP__": [], "UserID": "8675309", "__NAME__": "WALTER, TAYLOR", "UsersManagers": [], "InBasketClassifications": [], "__ENABLE__": true }
Activate an Epic user
The following example activates a user with the minimum required attributes, and updates their name:
curl \ --header "X-OpenIDM-Username: openidm-admin" \ --header "X-OpenIDM-Password: openidm-admin" \ --header "Content-Type: application/json" \ --header "if-Match:*" \ --request PUT \ --data '{ "__NAME__": "Walter, Taylorupdate", "__ENABLE__": "true" }' \ "http://localhost:8080/openidm/system/Epic/__ACCOUNT__/8675309" { "_id": "8675309", "UserComplexName": { "FirstName": "Taylorupdate", "GivenNameInitials": "", "MiddleName": "", "LastName": "Walter", "LastNamePrefix": "", "SpouseLastName": "", "SpousePrefix": "", "Suffix": "", "AcademicTitle": "", "PrimaryTitle": "", "SpouseLastNameFirst": false, "FatherName": "", "GrandfatherName": "" }, "BlockStatus": { "IsBlocked": false, "Reason": "", "Comment": "" }, "__GROUP__": [], "UserID": "8675309", "__NAME__": "WALTER, TAYLORUPDATE", "UsersManagers": [], "InBasketClassifications": [], "__ENABLE__": true }
Deactivate an Epic user
The following example deactivates a user with the minimum required attributes:
curl \ --header "X-OpenIDM-Username: openidm-admin" \ --header "X-OpenIDM-Password: openidm-admin" \ --header "Content-Type: application/json" \ --header "if-Match:*" \ --request PUT \ --data '{ \ "__NAME__": "TAYLOR, WALTER", "__ENABLE__": false }'\ "http://localhost:8080/openidm/system/Epic/__ACCOUNT__/8675309" { "_id": "8675309", "UserComplexName": { "FirstName": "Taylor", "GivenNameInitials": "", "MiddleName": "", "LastName": "Walter", "LastNamePrefix": "", "SpouseLastName": "", "SpousePrefix": "", "Suffix": "", "AcademicTitle": "", "PrimaryTitle": "", "SpouseLastNameFirst": false, "FatherName": "", "GrandfatherName": "" }, "BlockStatus": { "IsBlocked": false, "Reason": "", "Comment": "" }, "__GROUP__": [], "UserID": "8675309", "__NAME__": "WALTER, TAYLOR", "UsersManagers": [], "InBasketClassifications": [], "__ENABLE__": false }
Close an Epic user account
You can use the Epic connector to delete an account from the Epic repository.
A deleted account technically remains in the Epic repository, but cannot be queried by its ID. |
The following example deletes an Epic account:
curl \ --header "X-OpenIDM-Username: openidm-admin" \ --header "X-OpenIDM-Password: openidm-admin" \ --header "Content-Type: application/json" \ --request DELETE \ "http://localhost:8080/openidm/system/Epic/__ACCOUNT__/8675309" { "_id": "8675309", "UserComplexName": { "FirstName": "Taylor", "GivenNameInitials": "", "MiddleName": "", "LastName": "Walter", "LastNamePrefix": "", "SpouseLastName": "", "SpousePrefix": "", "Suffix": "", "AcademicTitle": "", "PrimaryTitle": "", "SpouseLastNameFirst": false, "FatherName": "", "GrandfatherName": "" }, "BlockStatus": { "IsBlocked": false, "Reason": "", "Comment": "" }, "__GROUP__": [], "UserID": "8675309", "__NAME__": "WALTER, TAYLOR", "UsersManagers": [], "InBasketClassifications": [], "__ENABLE__": false }
You can then confirm the account has been deleted by querying the UserID
:
curl \ --header "X-OpenIDM-Username: openidm-admin" \ --header "X-OpenIDM-Password: openidm-admin" \ --header "Content-Type: application/json" \ --request GET \ "http://localhost:8080/openidm/system/Epic/__ACCOUNT__/8675309" { "code": 404, "reason": "Not Found", "message": "Object 8675309 not found on system/Epic/__ACCOUNT__" }
Additionally, all supported resources can be queried:
Query Epic departments
curl \ --header "X-OpenIDM-Username: openidm-admin" \ --header "X-OpenIDM-Password: openidm-admin" \ --header "Content-Type: application/json" \ --request GET \ "http://localhost:8080/openidm/system/Epic/Department?_queryId=query-all-ids" { "result": [ { "_id": "40" }, { "_id": "56" }, { "_id": "71" }, { "_id": "77" }, { "_id": "58" }, [ ... ] { "_id": "46" }, { "_id": "10120160" }, { "_id": "1002020" }, { "_id": "31" }, { "_id": "83" }, { "_id": "115" } ], "resultCount": 548, "pagedResultsCookie": null, "totalPagedResultsPolicy": "NONE", "totalPagedResults": -1, "remainingPagedResults": -1 }
Query Epic providers
curl \ --header "X-OpenIDM-Username: openidm-admin" \ --header "X-OpenIDM-Password: openidm-admin" \ --header "Content-Type: application/json" \ --request GET \ "http://localhost:8080/openidm/system/Epic/Provider?_queryId=query-all-ids" { "result": [ { "_id": "116" }, { "_id": "E3087" }, { "_id": "E4000" }, { "_id": "E4913" }, { "_id": "E5335" }, { "_id": "E4716" }, { "_id": "E5370" }, [ ... ] { "_id": "E4001" }, { "_id": "E4002" }, { "_id": "E5137" }, { "_id": "E5199" }, { "_id": "E4003" }, { "_id": "E4694" }, { "_id": "E4004" }, { "_id": "E4005" }, { "_id": "E5019" }, { "_id": "E4843" } ], "resultCount": 2560, "pagedResultsCookie": null, "totalPagedResultsPolicy": "NONE", "totalPagedResults": -1, "remainingPagedResults": -1 }
curl \ --header "X-OpenIDM-Username: openidm-admin" \ --header "X-OpenIDM-Password: openidm-admin" \ --header "Content-Type: application/json" \ --request GET \ "http://localhost:8080/openidm/system/Epic/Provider/E4716" { "_id": "E4716", "Specialty": "Family Medicine", "__UID__": "E4716", "Provider Type": "Physician", "__NAME__": "WELLHIVE, PROVIDER" }
Query user templates
curl \ --header "X-OpenIDM-Username: openidm-admin" \ --header "X-OpenIDM-Password: openidm-admin" \ --header "Content-Type: application/json" \ --request GET \ "http://localhost:8080/openidm/system/Epic/UserTemplate?_queryId=query-all-ids" { "result": [ { "_id": "T00004" }, { "_id": "T00024" }, { "_id": "T00033" }, { "_id": "T00038" }, { "_id": "T00076" }, { "_id": "T00077" }, { "_id": "T00078" }, { "_id": "T00088" }, { "_id": "T00089" }, { "_id": "T00090" }, { "_id": "T1000601" }, { "_id": "T1002020" }, { "_id": "T1020101" }, { "_id": "T1020102" }, [ ... ] { "_id": "T8888001" }, { "_id": "T8889901" }, { "_id": "T9998001" } ], "resultCount": 431, "pagedResultsCookie": null, "totalPagedResultsPolicy": "NONE", "totalPagedResults": -1, "remainingPagedResults": -1 }
curl \ --header "X-OpenIDM-Username: openidm-admin" \ --header "X-OpenIDM-Password: openidm-admin" \ --header "Content-Type: application/json" \ --request GET \ "http://localhost:8080/openidm/system/Epic/UserTemplate/T8888001" { "_id": "T8888001", "__UID__": "T8888001", "__NAME__": "RESEARCH ADMINISTRATOR TEMPLATE" }
Query user sub templates
curl \ --header "X-OpenIDM-Username: openidm-admin" \ --header "X-OpenIDM-Password: openidm-admin" \ --header "Content-Type: application/json" \ --request GET \ "http://localhost:8080/openidm/system/Epic/UserSubTemplate?_queryId=query-all-ids" { "result": [ { "_id": "ST00007" }, { "_id": "ST00030" }, { "_id": "ST10200" }, { "_id": "ST10201" }, { "_id": "ST10202" }, { "_id": "ST10203" }, { "_id": "ST10204" }, [ ... ] { "_id": "ST10401" }, { "_id": "ST10402" }, { "_id": "ST10700" }, { "_id": "ST107001" }, { "_id": "T5080002" }, { "_id": "T99901" }, { "_id": "TCVREPSUB" } ], "resultCount": 91, "pagedResultsCookie": null, "totalPagedResultsPolicy": "NONE", "totalPagedResults": -1, "remainingPagedResults": -1 }
curl \ --header "X-OpenIDM-Username: openidm-admin" \ --header "X-OpenIDM-Password: openidm-admin" \ --header "Content-Type: application/json" \ --request GET \ "http://localhost:8080/openidm/system/Epic/UserSubTemplate/T00007" { "_id": "T00007", "__NAME__": "EXCEL MEDICAL", "__UID__": "T00007" }
Query In Basket classifications
curl \ --header "X-OpenIDM-Username: openidm-admin" \ --header "X-OpenIDM-Password: openidm-admin" \ --header "Content-Type: application/json" \ --request GET \ "http://localhost:8080/openidm/system/Epic/InBasketClassifications?_queryId=query-all-ids" { "result": [ { "_id": "1" }, { "_id": "2" }, { "_id": "15" }, { "_id": "29" }, { "_id": "30" }, { "_id": "31" }, { "_id": "84" }, { "_id": "85" }, { "_id": "100" }, { "_id": "140" }, { "_id": "141" }, { "_id": "212" } ], "resultCount": 12, "pagedResultsCookie": null, "totalPagedResultsPolicy": "NONE", "totalPagedResults": -1, "remainingPagedResults": -1 }
curl \ --header "X-OpenIDM-Username: openidm-admin" \ --header "X-OpenIDM-Password: openidm-admin" \ --header "Content-Type: application/json" \ --request GET \ "http://localhost:8080/openidm/system/Epic/InBasketClassifications/140" { "_id": "140", "__NAME__": "Model AP Pt Clinical Msg Pool", "__UID__": "140" }
Query Epic groups
curl \ --header "X-OpenIDM-Username: openidm-admin" \ --header "X-OpenIDM-Password: openidm-admin" \ --header "Content-Type: application/json" \ --request GET \ "http://localhost:8080/openidm/system/Epic/__GROUP__?_queryId=query-all-ids" { "result": [ { "_id": "1" }, { "_id": "2" }, { "_id": "3" }, { "_id": "4" }, { "_id": "5" }, { "_id": "6" }, { "_id": "7" }, { "_id": "1000" }, { "_id": "1001" }, { "_id": "1002" }, { "_id": "1003" }, { "_id": "1004" }, { "_id": "1005" }, { "_id": "1006" } ], "resultCount": 14, "pagedResultsCookie": null, "totalPagedResultsPolicy": "NONE", "totalPagedResults": -1, "remainingPagedResults": -1 }
curl \ --header "X-OpenIDM-Username: openidm-admin" \ --header "X-OpenIDM-Password: openidm-admin" \ --header "Content-Type: application/json" \ --request GET \ "http://localhost:8080/openidm/system/Epic/__GROUP__/1000" { "_id": "1000", "__NAME__": "Community", "__UID__": "1000", "Type": "Community", "Undefined3": "Customer~Epic Customer" }
OpenICF Interfaces Implemented by the Epic Connector
The Epic Connector implements the following OpenICF interfaces. For additional details, see ICF interfaces:
- Create
-
Creates an object and its
uid
. - Delete
-
Deletes an object, referenced by its
uid
. - Schema
-
Describes the object types, operations, and options that the connector supports.
- Script on Connector
-
Enables an application to run a script in the context of the connector.
Any script that runs on the connector has the following characteristics:
-
The script runs in the same execution environment as the connector and has access to all the classes to which the connector has access.
-
The script has access to a
connector
variable that is equivalent to an initialized instance of the connector. At a minimum, the script can access the connector configuration. -
The script has access to any script arguments passed in by the application.
-
- Search
-
Searches the target resource for all objects that match the specified object class and filter.
- Test
-
Tests the connector configuration.
Testing a configuration checks all elements of the environment that are referred to by the configuration are available. For example, the connector might make a physical connection to a host that is specified in the configuration to verify that it exists and that the credentials that are specified in the configuration are valid.
This operation might need to connect to a resource, and, as such, might take some time. Do not invoke this operation too often, such as before every provisioning operation. The test operation is not intended to check that the connector is alive (that is, that its physical connection to the resource has not timed out).
You can invoke the test operation before a connector configuration has been validated.
- Update
-
Updates (modifies or replaces) objects on a target resource.
Epic Connector Configuration
The Epic Connector has the following configurable properties:
Basic configuration properties
Property | Type | Default | Encrypted(1) | Required(2) |
---|---|---|---|---|
|
|
|
|
Yes |
Provide the Client ID to authorize the Epic APIs |
||||
|
|
|
Yes |
Yes |
Provide the Private key in pkcs8 format |
||||
|
|
|
|
Yes |
Provide the Username required for Connection |
||||
|
|
|
Yes |
Yes |
Provide the Password required for Connection |
||||
|
|
|
|
No |
Provide the location of User Template file |
||||
|
|
|
|
No |
Provide the location of User Subtemplate file |
||||
|
|
|
|
No |
Provide the location of In Basket Classifications File |
||||
|
|
|
|
No |
Provide the location of Group File |
||||
|
|
|
|
No |
Provide the Maximum records for search operation |
||||
|
|
|
|
No |
Provide the Maximum connections |
||||
|
|
|
|
No |
Provide the Maximum Connection Timeout in seconds |
||||
|
|
|
Yes |
No |
Provide the Access token to establish connectivity with the target |
||||
|
|
|
|
No |
Provide the Validity period of the token |
||||
|
|
|
|
No |
Provide the HTTP Proxy Host |
||||
|
|
|
|
No |
Provide the HTTP Proxy Port |
||||
|
|
|
|
No |
Provide the HTTP Proxy Username |
||||
|
|
|
Yes |
No |
Provide the HTTP Proxy Password |
||||
|
|
|
No |
|
The HTTP URL for the REST End point (https://myserver.com/service/) |
||||
|
|
|
No |
|
The HTTP URL for the SOAP End point (https://myserver.com/service/) |
(1) Whether the property value is considered confidential, and is therefore encrypted in IDM.
(2) A list of operations in this column indicates that the property is required for those operations.