GOAL OBJECT

GOAL OBJECT

Some data recorded for a CASE is susceptible of being compared to a GOAL (a reference value). For example the diastolic pressure of a patient is expected to be higher than a reference value (a GOAL),

The GOAL OBJECT allows to define a GOAL for specific DATA_CODES that are recorded in TASKS for the patients. The characteristics required for a GOAL are:

  • It can be defined at several scopes (GLOBAL, PROGRAM, SUBSCRIPTION, ADMISSION). See GOAL PRECEDENCE to understand how a GOAL is selected
  • It must be bound to a specific DATA_CODE
  • It must be defined for a specific date. In case of GOALS defined at scope SUBSCRIPTION or PROGRAM it is possible to not assign a date. This should be considered as a 'default' GOAL
  • There can be more than one goal at the same scope but at different date, thus allowing to define a dynamic goal
  • It must be possible to determine the type of GOAL:
    • "MAX": the value of the DATA_CODE should be below this GOAL
    • "MIN": the value of the DATA_CODE should be above this GOAL

GOAL PRECEDENCE

Due to the fact that a GOAL can be defined at different scopes, there may happen that a GOAL has been established for the same DATA CODE at different scopes. In this cases, only the GOAL with the highest precedence will be selected.

Given a DATA CODE and a date, the GOAL selected is decided when the first of the following rules is verified :

  1. Exists a GOAL with scope "ADMISSION" in a date equal or prior to the requested date
  2. Exists a GOAL with scope "SUBSCRIPTION" in a date equal or prior to the requested date
  3. Exists a GOAL with scope "SUBSCRIPTION" without date
  4. Exists a GOAL with scope "PROGRAM" in a date equal or prior to the requested date
  5. Exists a GOAL with scope "PROGRAM" without date
  6. Exists a GOAL with scope "GLOBAL" in a date equal or prior to the requested date
  7. Exists a GOAL with scope "GLOBAL" without date

NOTE: when looking for a GOAL for a specific date, it will always be selected the one defined at that date or the immediately prior in time.

NOTE: A GOAL defined at "ADMISSION" scope must always have a date. If a GOAL is created at "ADMISSION" scope and no date is specified, then the ADMISSION creation date will be automatically assigned

LIFETIME

A GOAL can be invalidated or deleted in the following circumstances:

  • If a PROGRAM is deleted, then all the associated GOALS will also be deleted. This includes:
    • GOALS defined at "PROGRAM" scope for the deleted PROGRAM
    • GOALS defined at "SUBSCRIPTION" scope for all the SUBSCRIPTIONS in the deleted PROGRAM
    • GOALS defined at "ADMISSION" scope for all the ADMISSIONS created in SUBSCRIPTIONS of the deleted PROGRAM
  • If a SUBSCRIPTION is deleted, then all the associated GOALS will also be deleted. This includes:
    • GOALS defined at "SUBSCRIPTION" scope for all deleted SUBSCRIPTION
    • GOALS defined at "ADMISSION" scope for all the ADMISSIONS created in the deleted SUBSCRIPTION
  • If an ADMISSION is deleted then all the associated GOALS will also be deleted. This includes:
    • GOALS defined at "ADMISSION" scope for all the deleted ADMISSIONS
  • If a FORM that created a GOAL is deleted, then the GOAL is also deleted
  • If a FORM that created a GOAL is in "OPEN" state, then the GOAL is deleted and recalculated when the FORM is closed

GOAL OBJECT STRUCTURE

PROPERTYTYPEDESCRIPTION

#GOAL:SCOPE

string

Scope at which the goal is defined. The options are:

  • PROGRAM
  • SUBSCRIPTION
  • ADMISSION
#GOAL:SCOPE_REFrefReference to the object in the specified SCOPE
#GOAL:GOAL_TYPEstring"MAX", "MIN"
#GOAL:DATA_CODEstringName of the DATA_CODE o which the GOAL is bound
#GOAL:DATEdateStart date when this goal becomes valid
#GOAL:VALUEnumberValue of the DATA_CODE that must be accomplished to consider that the goal has been reached
#GOAL:CREATORref

Reference to the FORM object who created the GOAL. This is necessary to invalidate the GOAL if the object that created it is invalidated.

For example, if a GOAL is created using a FORMULA "GOAL_SET" from a FORM, it should be invalidated when the FORM is deleted or in an OPEN state.

This field cannot be NULL if the GOAL is defined at "ADMISSION" scope

NOTE: a single DATA_CODE can have only one GOAL with the same SCOPE, SCOPE_REF, GOAL_TYPE, DATA_CODE and DATE