Table of Contents
...
Facilities | ||||||
---|---|---|---|---|---|---|
FacilityId | OrganizationId | Name | Timezone | NFCEnabled | NFCSelfModificationEnabled | BarCodeEnabled |
ACME-PH | ACME | Pearl Harbor | US/Hawaii | true | false | false |
...
SurveyTemplates | |
---|---|
SurveyId | Name |
1 | New Line Report |
2 | Line Maintenance |
3 | Infection Report |
4 | Breast Milk Report |
5 | Patient Demographics |
6 | Patient Discharge |
7 | Patient Open Lines |
8 | Form Open Lines |
9 | Admission Questions |
10 | Patient Final Discharge |
11 | AUDIT |
12 | MDQ |
7. Organization's Alerts
7.1 SurveyAgent
Remember that Alerts are generated by the SurveyAgent. For this scenario we are going to have 2 rules generating alerts: 'New Patient Admission" and "Milk Importance Not Discussed".
...
Once we have the rules and the change-set we need to define a new sub-session for ACME in applicationContext.xml file:
Code Block | ||||
---|---|---|---|---|
| ||||
<bean id="ACME" class="org.drools.mas.core.DroolsAgentConfiguration$SubSessionDescriptor">
<constructor-arg value="subsession-acme"/>
<constructor-arg value="ACME-change-set.xml"/>
<constructor-arg value="${agent.node}"/>
<constructor-arg>
<map>
<entry key="organizationId" value="ACME"/>
</map>
</constructor-arg>
</bean>
...
<bean id="${agent.name}-configuration" class="org.drools.mas.core.DroolsAgentConfiguration">
<property name="agentId" value="${agent.name}"/>
<property name="changeset" value="agent_changeset.xml" />
<!-- by default the mindNodeLocation is local -->
<property name="mindNodeLocation" value="${agent.node}"/>
<property name="subSessions">
<list>
...
<ref local="${agent.name}-unc"/>
</list>
</property>
</bean> |
...
Important notes about the contextApplication.xml file:
- Line #1 defines the new sub-session for ACME organization.
- Line #20 includes this new sub-session as part of the main session of the agent.
The last step is to add the routing statement in agent_cbr.drl:
Code Block | ||||
---|---|---|---|---|
| ||||
rule "Mapping"
when
then
...
insert( new SessionMapping("ACME","subsession-acme") );
RulesLoggerHelper.debug(logger, drools, "Subsession mapping created for 'ACME');
...
end |
7.2 Alerts Configuration
AlertConfiguration | |||||
---|---|---|---|---|---|
Id | Name | Description | AlertKey | WorkspaceId | SendNotification |
1 | New Patient Admission | PH-Nursery | True | ||
2 | Milk Importance Not Discussed | PH-Nursery | True | ||
3 | New Patient Admission | PH-Nicu | True | ||
4 | Milk Importance Not Discussed | PH-Nicu | True |
AlertConfigurationUserRecipient | ||
---|---|---|
Id | AlertConfigurationId | UserId |
1 | 1 | ACME-U1 |
2 | 3 | ACME-U1 |
AlertConfigurationRoleRecipient | ||
---|---|---|
Id | AlertConfigurationId | RoleId |
1 | 2 | 2 |
2 | 4 | 2 |