xxxxx
							parent
							
								
									3e44efcbbc
								
							
						
					
					
						commit
						28431a348b
					
				| 
						 | 
					@ -28,6 +28,7 @@
 | 
				
			||||||
            <field name="bp_stop"/>
 | 
					            <field name="bp_stop"/>
 | 
				
			||||||
            <field name="per_bp_stop"/>
 | 
					            <field name="per_bp_stop"/>
 | 
				
			||||||
            <field name="hct" onchange="onchange_hct"/>
 | 
					            <field name="hct" onchange="onchange_hct"/>
 | 
				
			||||||
 | 
					            <field name="pop_txt" nolabel="1"/>
 | 
				
			||||||
            <field name="dialyzers" nolabel="1">
 | 
					            <field name="dialyzers" nolabel="1">
 | 
				
			||||||
                <list>
 | 
					                <list>
 | 
				
			||||||
                    <field name="dialyzer_id" domain="[['patient_id','=',parent.patient_id],['state','=','active']]" onchange="onchange_dialyzer"/>
 | 
					                    <field name="dialyzer_id" domain="[['patient_id','=',parent.patient_id],['state','=','active']]" onchange="onchange_dialyzer"/>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,13 @@
 | 
				
			||||||
<list model="clinic.hd.case">
 | 
					<list model="clinic.hd.case">
 | 
				
			||||||
 | 
					    <search>
 | 
				
			||||||
 | 
					        <field name="number"/>
 | 
				
			||||||
 | 
					        <field name="time_start"/>
 | 
				
			||||||
 | 
					        <field name="time_stop"/>
 | 
				
			||||||
 | 
					        <field name="patient_id"/>
 | 
				
			||||||
 | 
					        <field name="cycle_id"/>
 | 
				
			||||||
 | 
					        <field name="doctor_id"/>
 | 
				
			||||||
 | 
					        <field name="nurse_id"/>
 | 
				
			||||||
 | 
					    </search>
 | 
				
			||||||
    <field name="number"/>
 | 
					    <field name="number"/>
 | 
				
			||||||
    <field name="time_start"/>
 | 
					    <field name="time_start"/>
 | 
				
			||||||
    <field name="time_stop"/>
 | 
					    <field name="time_stop"/>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -13,7 +13,6 @@ from . import patient_cause_line
 | 
				
			||||||
from . import patient_comorbidity_line
 | 
					from . import patient_comorbidity_line
 | 
				
			||||||
from . import patient_morbidity_line
 | 
					from . import patient_morbidity_line
 | 
				
			||||||
from . import race
 | 
					from . import race
 | 
				
			||||||
from . import report_dialyzer_drop
 | 
					 | 
				
			||||||
from . import schedule
 | 
					from . import schedule
 | 
				
			||||||
from . import setting
 | 
					from . import setting
 | 
				
			||||||
from . import visit
 | 
					from . import visit
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -64,6 +64,7 @@ class HDcase(Model):
 | 
				
			||||||
        "fee_total": fields.Float("Total",function="get_gmtotal",readonly=True,function_multi=True),
 | 
					        "fee_total": fields.Float("Total",function="get_gmtotal",readonly=True,function_multi=True),
 | 
				
			||||||
        'note': fields.Text("Note"),
 | 
					        'note': fields.Text("Note"),
 | 
				
			||||||
        "cycle_id": fields.Many2One("clinic.cycle","Cycle"),
 | 
					        "cycle_id": fields.Many2One("clinic.cycle","Cycle"),
 | 
				
			||||||
 | 
					        'pop_txt': fields.Char("POP TEXT", readonly=True),
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def _get_number(self,context={}):
 | 
					    def _get_number(self,context={}):
 | 
				
			||||||
| 
						 | 
					@ -97,6 +98,7 @@ class HDcase(Model):
 | 
				
			||||||
        "number": _get_number,
 | 
					        "number": _get_number,
 | 
				
			||||||
        "company_id": lambda *a: get_active_company(),
 | 
					        "company_id": lambda *a: get_active_company(),
 | 
				
			||||||
        "fee": 1500,
 | 
					        "fee": 1500,
 | 
				
			||||||
 | 
					        'show_pop': False,
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    _order="date desc,number desc"
 | 
					    _order="date desc,number desc"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -175,7 +177,9 @@ class HDcase(Model):
 | 
				
			||||||
        data=context['data']
 | 
					        data=context['data']
 | 
				
			||||||
        hct=data['hct']
 | 
					        hct=data['hct']
 | 
				
			||||||
        if(hct<=39):
 | 
					        if(hct<=39):
 | 
				
			||||||
            data['hct']=0 
 | 
					            data['pop_txt']='xxxxxxxxxxxxxxxxx'
 | 
				
			||||||
 | 
					        else:
 | 
				
			||||||
 | 
					            data['pop_txt']=''
 | 
				
			||||||
        return data
 | 
					        return data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def cancelled(self,ids,context={}):
 | 
					    def cancelled(self,ids,context={}):
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,37 +0,0 @@
 | 
				
			||||||
import time
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
from netforce.model import Model, fields, get_model
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
class DialyzerDrop(Model):
 | 
					 | 
				
			||||||
    _name="report.dialyzer.drop"
 | 
					 | 
				
			||||||
    _string="Dialyzer [Drop]"
 | 
					 | 
				
			||||||
    _transient=True
 | 
					 | 
				
			||||||
    
 | 
					 | 
				
			||||||
    _fields={
 | 
					 | 
				
			||||||
        "date": fields.Date("Date"),
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    _defaults={
 | 
					 | 
				
			||||||
        'date': lambda *a: time.strftime("%Y-%m-%d"),
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    
 | 
					 | 
				
			||||||
    def get_report_data(self,ids,context={}):
 | 
					 | 
				
			||||||
        lines=[]
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        hd_cases=get_model("clinic.dialyzer").search_browse(['state','=','drop'])
 | 
					 | 
				
			||||||
        for dialyzer_ids in hd_cases:            
 | 
					 | 
				
			||||||
            lines.append({
 | 
					 | 
				
			||||||
                'number' : dialyzer_ids.number,
 | 
					 | 
				
			||||||
                'usetime': dialyzer_ids.use_time,
 | 
					 | 
				
			||||||
                'maxuse' : dialyzer_ids.max_use_time,
 | 
					 | 
				
			||||||
                'createdate' : dialyzer_ids.date,
 | 
					 | 
				
			||||||
                'expdate' : dialyzer_ids.exp_date,
 | 
					 | 
				
			||||||
                'patient' : dialyzer_ids.patient_id.name,
 | 
					 | 
				
			||||||
            })
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        data={
 | 
					 | 
				
			||||||
            'lines': lines or "Dialyzer Drop [Empty]",
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        return data
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
DialyzerDrop.register()
 | 
					 | 
				
			||||||
| 
						 | 
					@ -36,6 +36,12 @@ class ReportHDDialy(Model):
 | 
				
			||||||
        date_from=time.strftime("%Y-%m-%d")
 | 
					        date_from=time.strftime("%Y-%m-%d")
 | 
				
			||||||
        date_to=time.strftime("%Y-%m-%d")
 | 
					        date_to=time.strftime("%Y-%m-%d")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        defaults=context.get("defaults")
 | 
				
			||||||
 | 
					        if defaults.get("date_from"):
 | 
				
			||||||
 | 
					            date_from=defaults.get("date_from")
 | 
				
			||||||
 | 
					        if defaults.get("date_to"):
 | 
				
			||||||
 | 
					            date_to=defaults.get("date_to")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        dom=[]
 | 
					        dom=[]
 | 
				
			||||||
        dom.append(['state','=','completed'])
 | 
					        dom.append(['state','=','completed'])
 | 
				
			||||||
        if ids:
 | 
					        if ids:
 | 
				
			||||||
| 
						 | 
					@ -66,8 +72,6 @@ class ReportHDDialy(Model):
 | 
				
			||||||
        for hd_case in get_model("clinic.hd.case").search_browse(dom,order="cycle_id.sequence"):
 | 
					        for hd_case in get_model("clinic.hd.case").search_browse(dom,order="cycle_id.sequence"):
 | 
				
			||||||
            patient_type=hd_case.patient_id.type
 | 
					            patient_type=hd_case.patient_id.type
 | 
				
			||||||
            patient_type=PATIENT_TYPE.get(patient_type)
 | 
					            patient_type=PATIENT_TYPE.get(patient_type)
 | 
				
			||||||
            #dialyzer_name=hd_case.dialyzers.id
 | 
					 | 
				
			||||||
            #dialyzer_name=DIALYZER_NAME.get(dialyzer_name)
 | 
					 | 
				
			||||||
            cycle_name=hd_case.cycle_id.name or ""
 | 
					            cycle_name=hd_case.cycle_id.name or ""
 | 
				
			||||||
            show_cycle=False
 | 
					            show_cycle=False
 | 
				
			||||||
            if not cycle_name in cycles:
 | 
					            if not cycle_name in cycles:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,58 +0,0 @@
 | 
				
			||||||
<center>
 | 
					 | 
				
			||||||
    <h2>
 | 
					 | 
				
			||||||
        Dialyzers [Drop]
 | 
					 | 
				
			||||||
    </h2>
 | 
					 | 
				
			||||||
</center>
 | 
					 | 
				
			||||||
<table class="table table-striped">
 | 
					 | 
				
			||||||
    <thead class="scroll-header">
 | 
					 | 
				
			||||||
        <tr>
 | 
					 | 
				
			||||||
	    <th>
 | 
					 | 
				
			||||||
                Number
 | 
					 | 
				
			||||||
            </th>
 | 
					 | 
				
			||||||
            <th>
 | 
					 | 
				
			||||||
                Use (Time)
 | 
					 | 
				
			||||||
            </th>
 | 
					 | 
				
			||||||
            <th>
 | 
					 | 
				
			||||||
                Max Use (Time)
 | 
					 | 
				
			||||||
            </th>
 | 
					 | 
				
			||||||
            <th>
 | 
					 | 
				
			||||||
                Create Date
 | 
					 | 
				
			||||||
            </th>
 | 
					 | 
				
			||||||
            <th>
 | 
					 | 
				
			||||||
                Expire Date
 | 
					 | 
				
			||||||
            </th>
 | 
					 | 
				
			||||||
            <th>
 | 
					 | 
				
			||||||
                Patient
 | 
					 | 
				
			||||||
            </th>
 | 
					 | 
				
			||||||
        </tr>
 | 
					 | 
				
			||||||
    </thead>
 | 
					 | 
				
			||||||
    <tbody>
 | 
					 | 
				
			||||||
	{{#each lines context=context}}
 | 
					 | 
				
			||||||
            <tr>
 | 
					 | 
				
			||||||
                <td>
 | 
					 | 
				
			||||||
                    {{number}}   
 | 
					 | 
				
			||||||
                </td>
 | 
					 | 
				
			||||||
                <td>
 | 
					 | 
				
			||||||
		    {{usetime}}	
 | 
					 | 
				
			||||||
                </td>
 | 
					 | 
				
			||||||
                <td>
 | 
					 | 
				
			||||||
                    {{maxuse}}
 | 
					 | 
				
			||||||
                </td>
 | 
					 | 
				
			||||||
                <td>
 | 
					 | 
				
			||||||
                    {{createdate}}
 | 
					 | 
				
			||||||
                </td>
 | 
					 | 
				
			||||||
                <td>
 | 
					 | 
				
			||||||
                    {{expdate}}
 | 
					 | 
				
			||||||
                </td>
 | 
					 | 
				
			||||||
                <td>
 | 
					 | 
				
			||||||
                    {{patient}}
 | 
					 | 
				
			||||||
                </td>
 | 
					 | 
				
			||||||
            </tr>
 | 
					 | 
				
			||||||
        {{/each}}
 | 
					 | 
				
			||||||
    </tbody>
 | 
					 | 
				
			||||||
    <tfoot>
 | 
					 | 
				
			||||||
        <tr style="font-weight:bold">
 | 
					 | 
				
			||||||
           
 | 
					 | 
				
			||||||
        </tr>
 | 
					 | 
				
			||||||
    </tfoot>
 | 
					 | 
				
			||||||
</table>
 | 
					 | 
				
			||||||
| 
						 | 
					@ -18,7 +18,7 @@
 | 
				
			||||||
            <tr> 
 | 
					            <tr> 
 | 
				
			||||||
                <td>{{topic}}</td>
 | 
					                <td>{{topic}}</td>
 | 
				
			||||||
                <td>{{month}}</td>
 | 
					                <td>{{month}}</td>
 | 
				
			||||||
                <td><a style="text-decoration: underline" href="ui#name=clinic_hd_case&tab_no=3">{{amount}}</a></td>
 | 
					                <td><a style="text-decoration: underline" href="ui#name=clinic_report_hd_dialy&defaults.date_from='2014-10-17'&defaults.date_to='2014-10-18'">{{amount}}</a></td>
 | 
				
			||||||
            </tr>
 | 
					            </tr>
 | 
				
			||||||
        {{/each}}
 | 
					        {{/each}}
 | 
				
			||||||
    </tbody>
 | 
					    </tbody>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1 +0,0 @@
 | 
				
			||||||
<h1>Hello HBS</h1>
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,7 +1,10 @@
 | 
				
			||||||
 | 
					====
 | 
				
			||||||
 | 
					    - import data
 | 
				
			||||||
 | 
					        - payment
 | 
				
			||||||
 | 
					            - NHSO
 | 
				
			||||||
 | 
					            - SSO
 | 
				
			||||||
=====
 | 
					=====
 | 
				
			||||||
    select diaylizer at treatment page
 | 
					    select diaylizer at treatment page -> ok
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
=====
 | 
					=====
 | 
				
			||||||
    step:
 | 
					    step:
 | 
				
			||||||
        nurse
 | 
					        nurse
 | 
				
			||||||
| 
						 | 
					@ -19,7 +22,6 @@
 | 
				
			||||||
        3. go to hd case
 | 
					        3. go to hd case
 | 
				
			||||||
            - select dialyzer
 | 
					            - select dialyzer
 | 
				
			||||||
                - if not we can no do treament
 | 
					                - if not we can no do treament
 | 
				
			||||||
 | 
					 | 
				
			||||||
===== todo
 | 
					===== todo
 | 
				
			||||||
    ###### 
 | 
					    ###### 
 | 
				
			||||||
        - import payment
 | 
					        - import payment
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue