Batch macros are used to efficiently and consistently update multiple client records at once, reducing manual effort, and minimizing the risk of data inconsistency. These macros are intended for internal operational use and support large-scale work item processing. Common use cases include new POS, modify POS, and decommission POS activities where bulk creation, modification, or closure of POS, appointments, tasks, referrals, interventions, and care teams is required.
Process Overview
To use batch macros, the following steps are followed:
- Developer pulls the initial report
Query script can be found in the associated work item JIRA
Important: Before pasting SQL query results into an Excel sheet, format all cells as Text to preserve the original data format (for example, to prevent a Dx code like “250.0” from being automatically changed to “250”). After pasting the data, replace any cells containing “NULL” with empty values. - Analyst prepares the report to run the macro against
Performs a test run of the macro using a smaller portion of report
Performs a test run of the macro using full report - Support environment is preferred as it refreshes nightly
Reviews and validates the resulting stored report - Analyst submits a Change Control (CC)
Deployment is typically needs coordination as usually scheduled after hours and completed by SAs - Developer pulls the most recent report
Report is provided to the analyst for final preparation - Analyst completes an additional test run with SAs in Support
Reviews and validates the resulting stored report and run time/duration - SAs deploy the macro to Live
- Developer pulls a post-deployment report for validation
New Macros
| Macro Name | Macro Work Item and Samples | Query | Prep Report Notes |
| CREATEENCOUNTER Create New Encounter | Sample: EMR-10008 | N/A | Text file with PIDs
|
| PARIS_IMPORT Create a FileNum if client does not already exist in Profile EMR (Note: Does not include auto-PARIS Update) | EMR-4880 | N/A | New text file with:
|
| IMPORT_CARETEAM Create New Care Team Rows from Report | EMR-4840 | N/A | New CSV with columns:
Note: RoleCode is from Care Team Roles short code |
| IMPORT_APPTS Create New Appts from Report | EMR-4704 | N/A | New CSV from Outlook, etc. with columns:
|
| IMPORT_REFERRAL Create New Inward Referrals from Report | EMR-4683 | N/A | New CSV with columns:
|
Update Macros
| Macro Name | Macro Work Item and Samples | Query | Prep Report Notes |
| UPDATE_POS Modify/Remove PC and Alt POS | EMR-5497
| IHQ in EMR-5497 | Update IHQ report and four NEW columns at the end:
|
| UPDATE_CARETEAM Modify Open Internal/External Care Teams | EMR-10665 | EMR-10665 Open internal/external care teams where Clinician contains XXX | Update report NEW fields:
When Care Team POS and/or Care Team Clinician are updated, old row is Closed and New row is created with Date Added = Macro Run Date Team Role is from Care Team Roles short code Clinician is code from People & Places (internal) or External Clinician Dictionary (external) |
| UPDATE_APPTS Modify Booked One-Time Appt Fields | EMR-9891 | EMR-9891 | Update report NEW fields:
|
| UPDATE_TASKS Modify Pending Task Fields | EMR-10082 | EMR-10083 Pending tasks where Creator POS = XXX and Holder or Group contains XXX | Update report NEW fields:
|
| UPDATE_REFERRAL Modify Open Inward/Outward Referral Fields | EMR-10084 | EMR-10084 | Update report NEW fields:
|
| UPDATE_IVNS Modify Open Intervention Fields | EMR-8858 | EMR-8858 | Update report NEW fields:
Intervention POS and Clinician may be blanked by entering <EMPTY> in cell |