Precision Healthcare Solutions
CLINICAL OFFICE MPAGE SUITE DEVELOPER REPORTS DESIGNER shopping_cart mail
SALES CONTACT US
Getting StartedCerner SetupDeveloper PC SetupGitHub Project TemplatesFull Page DeploymentWorkflow ComponentsComponents & DirectivesButtonConfirm DialogDate Range PickerDrop-DownIconInputLogOptional TitlePatient SearchRadio ButtonsRemaining Screen SpaceScroll BarSelectTabbed MenuTableTreeModels & ServicesAddressAllergyCerner FunctionsCode ValueConfigCustomDiagnosisDialogEncounterMPageOrganizationPersonPersonnelPhoneProblemReferenceUtility

Models & Services

Overview

MPage Developer models offer several utility functions designed to make writing MPages easier. Functions found in the Cerner Functions Model are wrappers that offer simplified access to existing Cerner methods for tasks such as opening PowerForms. Functions found in the Utility Model offer ways to handle common tasks that occur during MPage development such as generating random strings or encoding a string as base 64.

The services available in MPage Developer is how you communicate with CCL. Task specific services such as the Allergy Service and Person Service all inherit functionality from the MPage Service. The MPage Service is where you initialize your MPage and execute CCL scripts.

Except the MPage Service, all services in MPage Developer offer a load method to perform executing a CCL script. These load methods ultimately call the MPage Service executeCCL method.

Payload

Communication with CCL is performed by passing a payload object to either a service load method or the MPage service executeCCL method. One or more tasks can be assigned to the same payload and will run together and return results at the same time.

The payload shown below will load patients, related persons, allergies, address, phone numbers and personnel records in a single execution.

payload: {
    patientSource: [{personId: 0, encntrId: 0}],
    person: {
        aliases: true,
        prsnlReltn: true,
        loadExtendedPersons: true
    },
    allergies: true,
    address: true,
    phone: true,
    prsnl: {
        aliases: true
    }
}

Queue Management

You won't always want to bundle your payload requests together in a single call. If you need to run multiple simultaneous CCL scripts, you can do so without worrying about using too many server instances. When initialized with the setMaxInstances method in the MPage Service, the first parameter set is the number of CCL scripts that can be run at one time. The default value is two (2) which should be fine for the majority of MPages you write. You can set this value higher as needed.

Attempting to run more CCL scripts than available queues will force CCL payload requests to be held until a queue has finished running. When the first queue is available, the next payload entry to be run will be executed next. Management of finding the next available queue is automatic and requires no effort on your part.

Note Clients Using Previous Versions of Clinical Office

In previous versions of MPage Developer, services that contained a .get() method would automatically load records if not previously loaded. This functionality was introduced in version 1 of Clinical Office: MPage Edition, and up to now has been available in every version through version 4. With version 5, we have made the decision to remove this functionality and make it a requirement that your MPages have specific code for loading information.

This change greatly reduces the potential number of load calls your MPage might make to Cerner. For example, if you had the following HTML on a component, three separate CCL calls would be made at once.

<h1>{{ personService.get().nameFullFormatted }}</h1>
<p>Phone: {{ apoService.getPhone('HOME').phoneNumber }}</p>
<p>Allergies: {{ allergyService.toString() }}</p>

The .get() methods will now return a value of undefined or an empty array depending on the output type of the service if data has not been loaded. To populate your services, you must either use the executeCCL method in the MPage service or the appropriate .load() method in the service you wish to load data from.

<< Prev: Tree
Next: Address >>
Copyright © 2026 Precision Healthcare Solutions