health-dev
[Top][All Lists]
Advanced

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

[Health-dev] [bug #63842] Mismatch between required vs. readonly fields


From: Mathias Behrle
Subject: [Health-dev] [bug #63842] Mismatch between required vs. readonly fields in Imaging Results
Date: Mon, 27 Feb 2023 05:26:16 -0500 (EST)

URL:
  <https://savannah.gnu.org/bugs/?63842>

                 Summary: Mismatch between required vs. readonly fields in
Imaging Results
                   Group: GNU Health
               Submitter: yangoon
               Submitted: Mon 27 Feb 2023 10:26:14 AM UTC
                Category: Programming / Tracebacks
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
                 Release: None
         Discussion Lock: Any
                  Module: health_imaging
               Component: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Mon 27 Feb 2023 10:26:14 AM UTC By: Mathias Behrle <yangoon>
It is possible to create an imaging result without a patient (and a patient
can not be filled in because the field is read-only), which typically results
in 

Traceback (most recent call last):                                            
                                                                              
                                                                              

  File
"/home/mathiasb/projects/gnuhealth4/trytond/trytond/protocols/dispatcher.py",
line 182, in _dispatch                                                        
                                                                         
    result = rpc.result(meth(*c_args, **c_kwargs))                            
                                                                              
                                                                              

                        ^^^^^^^^^^^^^^^^^^^^^^^^^                             
                                                                              
                                                                              

  File "/home/mathiasb/projects/gnuhealth4/trytond/trytond/model/modelsql.py",
line 870, in read                                                             
                                                                              

    getter_results = field.get(                                               
                                                                              
                                                                              

                     ^^^^^^^^^^                                               
                                                                              
                                                                              

  File
"/home/mathiasb/projects/gnuhealth4/trytond/trytond/model/fields/function.py",
line 105, in get                                                              
                                                                        
    return dict((name, call(name)) for name in names)                         
                                                                              
                                                                              

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                         
                                                                              
                                                                              

  File
"/home/mathiasb/projects/gnuhealth4/trytond/trytond/model/fields/function.py",
line 105, in <genexpr>                                                        
                                                                        
    return dict((name, call(name)) for name in names)                         
                                                                              
                                                                              

                       ^^^^^^^^^^                                             
                                                                              
                                                                              

  File
"/home/mathiasb/projects/gnuhealth4/trytond/trytond/model/fields/function.py",
line 100, in call                                                             
                                                                        
    return dict((r.id, method(r, name)) for r in records)                     
                                                                              
                                                                              

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                     
                                                                              
                                                                              

  File
"/home/mathiasb/projects/gnuhealth4/trytond/trytond/model/fields/function.py",
line 100, in <genexpr>                                                        
                                                                        
    return dict((r.id, method(r, name)) for r in records)                     
                                                                              
                                                                              

                       ^^^^^^^^^^^^^^^                                        
                                                                              
                                                                              

  File
"/home/mathiasb/projects/gnuhealth4/trytond/trytond/modules/health_imaging/health_imaging.py",
line 170, in patient_age_at_evaluation  
    if (self.patient.name.dob and self.date):  

So generally  
- def patient_age_at_evaluation should handle this case gracefully with
        if (self.patient and self.patient.name.dob and self.date):
- Input of a patient and request_date should be possible to be able to enter
manual Imaging Results otherwise the form is too workflow dependent (this
would be my preference)
- If OTOH the whole form should only be readable for workflow results then the
whole form should be read-only (currently e.g. Study and Evaluated By are
editable)









    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?63842>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

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