Hi, There is an issue when creating a record on icu on validation method. I cannot find a way to create an ICU record without the validation message. This is because the check_patient_admitted_at_icu method, the query section cursor.execute( *table.select( table.name, where=( (table.name == self.name.id) & (table.admitted)))) will catch always a record when the admitted field is True (table.name == self.name.id will always be found)
It think it would be better to have a unique constraint to avoid this issue and create the record without the validation method The version I am using is gnuhealth_icu 4.2.3 Regards Francisco