How do you think if we archive data values according to DueDate and Completed property of ProgramStageInstance ?
Use choose interval, the system will check DueDate and the status of ProgramStageInstance, if DueDate is ok and status is completed, then archive all of data values of the instance.
Archiving is good idea. And I would suggest archiving based on the status of the programInstance not programStageInstance. For example, to generate visit plans we will rely on previously completed programStageInstances, therefore better if we could keep completed programStageInstances as long as their parent programInstance is active. If we want to play around with history (within the current programInstance at least), then we will definately need completed programStageInstances of the current programInstance.
If a programInstance is successfully completeed (or terminated for some reason), we will always start a new cycle of programInstance by keepin aside the previous programInstance.
How do you think if we archive data values according to DueDate and Completed property of ProgramStageInstance ?
Use choose interval, the system will check DueDate and the status of ProgramStageInstance, if DueDate is ok and status is completed, then archive all of data values of the instance.
On Fri, Oct 22, 2010 at 3:09 PM, Abyot Gizaw abyota@gmail.com wrote:
Hi Tran,
Archiving is good idea. And I would suggest archiving based on the status of the programInstance not programStageInstance. For example, to generate visit plans we will rely on previously completed programStageInstances, therefore better if we could keep completed programStageInstances as long as their parent programInstance is active. If we want to play around with history (within the current programInstance at least), then we will definately need completed programStageInstances of the current programInstance.
If a programInstance is successfully completeed (or terminated for some reason), we will always start a new cycle of programInstance by keepin aside the previous programInstance.
How do you think if we archive data values according to DueDate and Completed property of ProgramStageInstance ?
Use choose interval, the system will check DueDate and the status of ProgramStageInstance, if DueDate is ok and status is completed, then archive all of data values of the instance.
As your idea, we only archive PatientDataValues with completed ProgramInstances. Is it right, sir ?
Yes, that is what I am suggesting.
But we have interval parameters to choose data values to archive ? And you think what the interval is based on ?
DATA values or DATE value? I suppose you are talking about date values.
Yes we can take date intervals (startDate and endDate). Once we have such an interval, then we can look for programInstances who are completed/terminated within the specified time frame. It is these programInsances that we should archive.
foreach( programStageInstance that got completed/terminated in the given time frame)
On Fri, Oct 22, 2010 at 3:09 PM, Abyot Gizaw abyota@gmail.com wrote:
Hi Tran,
Archiving is good idea. And I would suggest archiving based on the status of the programInstance not programStageInstance. For example, to generate visit plans we will rely on previously completed programStageInstances, therefore better if we could keep completed programStageInstances as long as their parent programInstance is active. If we want to play around with history (within the current programInstance at least), then we will definately need completed programStageInstances of the current programInstance.
If a programInstance is successfully completeed (or terminated for some reason), we will always start a new cycle of programInstance by keepin aside the previous programInstance.
How do you think if we archive data values according to DueDate and Completed property of ProgramStageInstance ?
Use choose interval, the system will check DueDate and the status of ProgramStageInstance, if DueDate is ok and status is completed, then archive all of data values of the instance.