ISProfileForm.MakePreviousObservationLoader

Description

This function creates a special object that allows to load the previous values of the observations into the form controls.

Syntax

object.MakePreviousObservationLoader()

Part Attribute Type Description
object Required
The object always implements the ISProfileForm interface

Return Value

ISProfileFormPreviousObservationLoader

Returns the created object that allows to load the previous values of the observations into the form controls.

Example

Create a special object that allows to load the previous values of the observations into the form controls.

Dim aLoader

Set aLoader = Form.MakePreviousObservationLoader
aLoader.SetPatientID(Form.PatientID).SetCaseID(0).SetLoadEmpty(False)
aLoader.SetPreviousCollectionID(0)   ' 0 = latest values by concept, n>0 = a real HRC ID
aLoader.AddConcept("IH", "z..Ph").AddControlAsText("edtRythm")    
aLoader.AddConcept("IH", "z..DB").AddControlAsValue("edtCervicalScreeningEnrolment") 
aLoader.Load
if aLoader.HasData then 
  aLoader.FillControls    
end if 
  
Profile.MsgBox("HasData: " & aLoader.HasData)  
Note: This macro should be executed in any event handler of the form control.

Version information

Added in v7.11.0