health-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Health-dev] Cannot overwrite a previously saved data


From: Sebastián Marró
Subject: Re: [Health-dev] Cannot overwrite a previously saved data
Date: Wed, 3 Apr 2013 01:01:16 -0300

Hi Hannah

2013/4/2 Hannah Sun <address@hidden>

Hi! I would just want to ask whether [1]it is possible for a previous record that is saved to be a read-only (meaning it cannot be written again).

For example, in the patient evaluation, once a doctor was done in evaluating and saved it, it cannot be overwritten again.

Adding a state field and then using the argument states [1] on the other fields you can make the fields readonly. Take a look at [2]

 
Additional question,[2] is it possible that the data is time-bound( meaning those records that are 1 day older cannot be overwritten anymore) but those who are less than a day can still be overwritten?

 This is  to ensure that patient data especially those taken a long time ago would not be easily manipulated.

How can we implement this? Thank you!

Maybe using some PYSON _expression_ [3] in the states argument.

Hope this helps.
 
[1] http://doc.tryton.org/2.6/trytond/doc/ref/models/fields.html#states
[2] http://hg.savannah.gnu.org/hgweb/health/file/8c9e8bc46144/tryton/health_stock/health_stock.py#l143
[3] http://doc.tryton.org/2.6/trytond/doc/topics/pyson.html

--
Sebastián Marró
thymbr@
Converging Ideas for Emerging Realities

www.thymbra.com

reply via email to

[Prev in Thread] Current Thread [Next in Thread]