Cerner Functions Model
Overview
The Cerner functions model represents wrapper functions around standard Cerner MPage PowerChart calls. The functions implemented in this model represent functionality commonly used by our clients and our own development team.
If a function exists on the Cerner MPages Development Wiki Home and you wish to have it added here, please contact us and request the addition. We will also be expanding the wrapper functions in the list as needs arise.
Import
Any function you use in your MPage must be specifically imported into the component or service it is being used in.
e.g.
import { openPowerForm } from '@clinicaloffice/mpage-developer';
Methods
openChart( personId: number, encntrId: number, tabName: string = ''): voidopenChart is responsible for opening a patient chart to a specific tab in PowerChart using Cerner's APPLINK method.
| Parameter | Type | Description |
|---|---|---|
| personId | number | personId of patient. |
| encntrId | number | encntrId of patient. |
| tabName | string | Name of tab in PowerChart to focus on when chart opened. |
openChart(this.customService.MPage.personId, this.customService.MPage.encntrId, 'Provider View');openEvent( personId: number, eventId: number | number[]): void
openEvent will open an event or events in the result viewer using the PVVIEWERMPAGE DiscernObjectFactory and launch the Cerner event viewer.
| Parameter | Type | Description |
|---|---|---|
| personId | number | personId of patient. |
| eventId | number | eventId or eventId(s) you wish to view. |
openEvent(this.customService.MPage.personId, 123456); openEvent(this.customService.MPage.personId, [123456, 7890123]);openNewDynDoc( personId: number, encntrId: number, templateId: number, noteTypeEventCd: number = 0): number
openNewDynDoc is responsible for opening a new DYNDOC for a specific personId, encntrId, templateId and noteTypeEventCd.
if noteTypeEventCd = 0, the DiscernOjectFactory.OpenNewDocumentByReferenceTemplateId method is used. Otherwise, DiscernObjectFactory.OpenNewDocumentByReferenceTemplateIdAndNoteType is used.
| Parameter | Type | Description |
|---|---|---|
| personId | number | personId of patient. |
| encntrId | number | encntrId of patient. |
| templateId | number | DD_REF_TEMPLATE_ID from DD_REF_TEMPLATE table. |
| noteTypeEventCd | number | Code value from code set 72 representing the note type. |
openNewDynDoc(this.customService.MPage.personId, this.customService.MPage.encntrId, this.templateId, this.noteTypeEventCd).then(data =>
this.customService.putLog("Returned from DYNDOC")
);
openPowerForm(
personId: number,
encntrId: number,
formId: number,
activityId: number = 0,
readOnly: boolean = false): number
openPowerForm will open a new or existing PowerForm for an encounter. If a value of 0 is passed for activityId a new form will be created.
| Parameter | Type | Description |
|---|---|---|
| personId | number | personId of patient. |
| encntrId | number | encntrId of patient. |
| formId | number | DCP_FORMS_REF_ID from the DCP_FORMS_REF table. |
| activityId | number | DCP_FORMS_ACTIVITY_ID from the DCP_FORMS_ACTIVITY table for existing PowerForm. |
| readOnly | boolean | Open PowerForm as read-only. |
openPowerForm(this.customService.MPage.personId, this.customService.MPage.encntrId, 123456);