Commits

meanmicio  committed 0a264f6

Add Differential Diagnosis / Other hypotheses to presumptive diagnosis
- Fix bug : https://savannah.gnu.org/bugs/index.php?36108

  • Participants
  • Parent commits f982831

Comments (0)

Files changed (2)

File tryton/health/health.py

 PrescriptionLine()
 
 
-# PATIENT DIRECTIONS
+# PATIENT EVALUATION DIRECTIONS
 class Directions(ModelSQL, ModelView):
     'Patient Directions'
     _name = 'gnuhealth.directions'
     _description = __doc__
 
     name = fields.Many2One('gnuhealth.patient', 'Patient', readonly=True)
-    procedure = fields.Many2One('gnuhealth.procedure', 'Procedure')
+    procedure = fields.Many2One('gnuhealth.procedure', 'Procedure',required=True)
     comments = fields.Char('Comments')
 
 Directions()
 
 
+# PATIENT EVALUATION OTHER DIAGNOSTIC HYPOTHESES
+class DiagnosticHypothesis(ModelSQL, ModelView):
+    'Other Diagnostic Hypothesis'
+    _name = 'gnuhealth.diagnostic_hypothesis'
+    _description = __doc__
+
+    evaluation = fields.Many2One('gnuhealth.patient.evaluation', 'Evaluation', readonly=True)
+    pathology = fields.Many2One('gnuhealth.pathology', 'Pathology', required=True)
+    comments = fields.Char('Comments')
+
+DiagnosticHypothesis()
+
 class PatientEvaluation(ModelSQL, ModelView):
     'Patient Evaluation'
     _name = 'gnuhealth.patient.evaluation'
         'movements')
     diagnosis = fields.Many2One('gnuhealth.pathology', 'Presumptive Diagnosis',
         help='Presumptive Diagnosis')
+    diagnostic_hypothesis = fields.One2Many('gnuhealth.diagnostic_hypothesis',
+        'evaluation', 'Hypotheses / DDx', help="Other Diagnostic Hypotheses / Differential Diagnosis (DDx)")
     info_diagnosis = fields.Text('Presumptive Diagnosis: Extra Info')
     directions = fields.Text('Plan')
     actions = fields.One2Many('gnuhealth.directions', 'name', 'Procedures',

File tryton/health/health_view.xml

         </record>
 
 
+<!-- PATIENT EVALUATION OTHER DIAGNOSTIC HYPOTHESIS -->
+
+        <record model="ir.ui.view" id="gnuhealth_diagnostic_hypothesis_form">
+            <field name="model">gnuhealth.diagnostic_hypothesis</field>
+            <field name="type">form</field>
+            <field name="arch" type="xml">
+                <![CDATA[
+                <form string="Diagnostic Hypothesis">
+                    <label name="pathology"/>
+                    <field name="pathology"/>
+                    <newline/>
+                    <label name="comments"/>
+                    <field name="comments"/>
+                </form>
+                ]]>
+            </field>
+        </record>
+
+        <record model="ir.ui.view" id="gnuhealth_diagnostic_hypothesis_tree">
+            <field name="model">gnuhealth.diagnostic_hypothesis</field>
+            <field name="type">tree</field>
+            <field name="arch" type="xml">
+                <![CDATA[
+                <tree string="Patient Evaluation other diagnostic hypotheses">
+                    <field name="pathology"/>
+                    <field name="comments"/>
+                </tree>
+                ]]>
+            </field>
+        </record>
+
 <!-- PATIENT DISEASES -->
 
         <record model="ir.ui.view" id="gnuhealth_patient_diseases_view_form">
                             <label name="diagnosis"/>
                             <field name="diagnosis" colspan="4"/>
                             <newline/>
+                            <field name="diagnostic_hypothesis" colspan="4"/>
+                            <newline/>
                             <separator string="Information on Diagnosis" colspan="2"
                                 id="separator_evaluation_diagnosis_1"/>
                             <separator string="Treatment Plan" colspan="2"