Development Guidelines

Local codes
Please click here for instructions on how to use local codes.

Patient focus
This section explains how to code for patient focus, the required code and the different ways of doing.

You can set focus on a patient without having to go through the clinical security (i.e. the logged-in user must have a unit or care network assignment to the patient beign focused). This is important because some windows should only be available if the user has a relationship with the patient while others should not require a relationship and be available to all.

The example below, will set focus without validating the clinical security: is_local_patient_num = gnv_app.inv_patient_focus.of_get_local_patient_num if IsNull(is_local_patient_num) then if gnv_app.inv_patient_focus.of_set_focus <> 1 then this.event pfc_close Return end if end if is_local_patient_num = gnv_app.inv_patient_focus.of_get_local_patient_num

The example below, will only set focus if the logged-in user passes clinical security: IF gnv_app.inv_patient_focus.of_get_local_patient_num(is_local_patient_num) <> 1 THEN MessageBox(is_title, 'You cannot proceed without selecting a patient.', StopSign!) this.event pfc_close return END IF Any patient-focused window which is not response must be registered with the focused patient service. Any registered window will be automatically closed when the focused patient changes, to prevent data being entered to the wrong patient.

The example below shows how to register the window - this code should be added after the patient has been focused. window	lw_parent this.of_GetParentWindow( lw_parent ) gnv_app.inv_patient_focus.of_register_window( lw_parent )

Assessment Tools and Questionnaires
Most assessments and questionnaires will have a form of identifying the person responsible for the record. The person could be labelled as Assessor, Assessed by, Completed by among other forms. The vast majority of assessments will be assessed/completed by a staff member which is a user in the application but some might be completed by an Associated Person or a GP.

For instances where only the staff member can be the responsible for the record, please do:


 * Use the core staff selector (click here for code example);


 * Add a numeric column that holds the USER_ID value;

For instances where more than one person type can be the responsible for the record, please do:
 * Use the person selector;
 * Add a varchar2 column to hold the person ID;
 * Add a numeric column to hold the person type;
 * Use the local code PERSON_TYPE to populate the person type column;

Migrating dynamic windows shortcuts and security role assignment
When creating a new core or dynamic core window to replace a dynamic window, please remember to include a script to redirect the existing security access and shortcuts by using this example. The script should be part of the deployment.