本文整理汇总了Python中EMR_utilities.dateToday方法的典型用法代码示例。如果您正苦于以下问题:Python EMR_utilities.dateToday方法的具体用法?Python EMR_utilities.dateToday怎么用?Python EMR_utilities.dateToday使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EMR_utilities
的用法示例。
在下文中一共展示了EMR_utilities.dateToday方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: OnpRintMed
# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import dateToday [as 别名]
def OnpRintMed(self, event):
obj = self.list.GetSelectedObjects()
string = ''
for items in obj:
string = '%s %s\n take %s %s %s #%s refills: %s\n\n' % \
(items["med_name"],
items["dose"],
items["number_tablets"],
items["route"],
items["frequency"],
items["number_pills"],
items["refills"]) + string
form_lt = "%s/EMR_outputs/Script.html" % settings.LINUXPATH
form_at = "%s/EMR_outputs/Script.html" % settings.APPLEPATH
form_wt = "%s\EMR_outputs\Script.html" % settings.WINPATH
form = open(EMR_utilities.platformText(form_lt, form_at, form_wt), 'r')
s = form.read()
form.close()
dem_data = EMR_utilities.getDictData('SELECT * FROM demographics WHERE patient_ID = %s;' % self.ptID)
dem_data['string'] = string
dem_data['date'] = EMR_utilities.dateToday()
dem_data['name_address'] = EMR_formats.format_address(dem_data)
script_text = s % (dem_data)
printer = EMR_utilities.Printer()
printer.PreviewText(script_text)
path_lt = "%s/EMR_outputs/%s/Orders" % (settings.LINUXPATH, self.ptID)
path_at = "%s/EMR_outputs/%s/Orders" % (settings.APPLEPATH, self.ptID)
path_wt = "%s\EMR_outputs\%s\Orders" % (settings.WINPATH, self.ptID)
path = EMR_utilities.platformText(path_lt, path_at, path_wt)
filename = "%s/script%s.html" % (path, EMR_utilities.dateToday(t='file format'))
f = open(filename, 'w')
f.write(script_text)
f.close()
示例2: __init__
# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import dateToday [as 别名]
def __init__(self, pt_ID, amount):
self.amount = amount
self.pt_ID = pt_ID
from reportlab.lib.pagesizes import letter
from reportlab.pdfgen import canvas
lt = "%s/EMR_outputs/%s/Other/rcpt-%s.pdf" % (settings.LINUXPATH, self.pt_ID, EMR_utilities.dateToday('file format'))
at = "%s/EMR_outputs/%s/Other/rcpt-%s.pdf" % (settings.APPLEPATH, self.pt_ID, EMR_utilities.dateToday('file format'))
wt = "%s\EMR_outputs\%s\Other\rcpt-%s.pdf" % (settings.WINPATH, self.pt_ID, EMR_utilities.dateToday('file format'))
filename = EMR_utilities.platformText(lt, at, wt)
canvas = canvas.Canvas(filename, pagesize=letter)
canvas.setLineWidth(.3)
canvas.setFont('Helvetica', 12)
canvas.drawString(30,750,'PAYMENT FOR MEDICAL SERVICES FOR %s' % self.name_find())
canvas.drawString(30,735,'RENDERED AT BARRON FAMILY MEDICINE')
canvas.drawString(500,750,"%s" % EMR_utilities.dateToday())
canvas.line(480,747,580,747)
canvas.drawString(275,725,'AMOUNT PAID:')
canvas.drawString(500,725,"$%s" % self.amount)
canvas.line(378,723,580,723)
canvas.drawString(30,703,'RECEIVED BY:')
canvas.line(120,700,580,700)
canvas.drawString(120,703, settings.NAME)
canvas.save()
示例3: __init__
# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import dateToday [as 别名]
def __init__(self, pt_ID, amount):
self.amount = amount
self.pt_ID = pt_ID
from reportlab.lib.pagesizes import letter
from reportlab.pdfgen import canvas
canvas = canvas.Canvas("/home/mb/Desktop/GECKO/EMR_outputs/%s/Other/rcpt-%s.pdf" % \
(self.pt_ID, EMR_utilities.dateToday()), pagesize=letter)
canvas.setLineWidth(.3)
canvas.setFont('Helvetica', 12)
canvas.drawString(30,750,'PAYMENT FOR MEDICAL SERVICES FOR %s' % self.name_find())
canvas.drawString(30,735,'RENDERED AT BARRON FAMILY MEDICINE')
canvas.drawString(500,750,"%s" % EMR_utilities.dateToday())
canvas.line(480,747,580,747)
canvas.drawString(275,725,'AMOUNT PAID:')
canvas.drawString(500,725,"$%s" % self.amount)
canvas.line(378,723,580,723)
canvas.drawString(30,703,'RECEIVED BY:')
canvas.line(120,700,580,700)
canvas.drawString(120,703,"MICHAEL BARRON MD")
canvas.save()
示例4: __init__
# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import dateToday [as 别名]
def __init__(self, parent, id, PtID, List):
wx.Panel.__init__(self, parent, id)
border = wx.StaticBox(self, -1, "Add To Do Item")
SBsizer = wx.StaticBoxSizer(border, wx.HORIZONTAL)
sizer = wx.GridBagSizer(hgap=5, vgap=5)
self.PtID = PtID
self.List = List
self.textctrl = {}
labels = (('Date', 90), ('Priority', 90), ('Category', 90), ('Due Date', 90))
row = 0
col = 0
for label, size in labels:
self.textctrl[label] = wx.TextCtrl(self, -1, size=(size, -1))
sizer.Add(wx.StaticText(self, -1, label), pos=(row,col), flag=wx.ALIGN_RIGHT)
sizer.Add(self.textctrl[label], pos=(row, (col + 1)))
col = col + 2
sizer.Add(wx.StaticText(self, -1, 'Description'), pos=(1, 0), flag=wx.ALIGN_RIGHT)
self.textctrl['Description'] = wx.TextCtrl(self, -1, size=(300,50), style=wx.TE_MULTILINE)
self.textctrl['Memo'] = wx.TextCtrl(self, -1, size=(300,50), style=wx.TE_MULTILINE)
sizer.Add(self.textctrl['Description'], pos=(1, 1), span=(2, 3))
sizer.Add(wx.StaticText(self, -1, 'Memo'), pos=(1, 4), flag=wx.ALIGN_RIGHT)
sizer.Add(self.textctrl['Memo'], pos=(1, 5), span=(2, 3))
btn = wx.Button(self, wx.ID_OK)
btn.SetDefault()
sizer.Add(btn, pos=(3, 0))
self.Bind(wx.EVT_BUTTON, self.OnOk, btn)
SBsizer.Add(sizer)
self.SetSizer(SBsizer)
self.textctrl['Date'].SetValue(EMR_utilities.dateToday())
self.textctrl['Priority'].SetValue('3')
示例5: OnCarePlanBtn
# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import dateToday [as 别名]
def OnCarePlanBtn(self, event):
#check to make sure a note has been stared
if self.newsoapNote.GetValue() == '':
#if there is a saved note for today, start care plan
if self.soapNote.GetValue():
#check to make sure a care plan has not already been created; can only use it once
qry = 'SELECT * FROM education WHERE date = "%s" AND patient_ID = "%s";' % (EMR_utilities.dateToday(), self.PtID)
results = EMR_utilities.getData(qry)
if results:
dlg = wx.MessageDialog(None, "A saved care plan for today already exists. Look in the Education tab.", "Important", wx.OK)
dlg.ShowModal()
else:
if self.GetParent().GetPage(7).neweducNote.GetValue() == '':
cp = CarePlan.CarePlanFrame(self, self.PtID)
cp.Show(True)
cp.notesinstance = self
else:
dlg = wx.MessageDialog(None, "A new care plan for today already exists. Look in the Education tab.", "Important", wx.OK)
dlg.ShowModal()
#now we know there is neither a new or saved note, so give error message
else:
dlg = wx.MessageDialog(None, "Please start a note before starting care plan.", "Important", wx.OK)
dlg.ShowModal()
else:
#check to make sure a care plan has not already been created; can only use it once
qry = 'SELECT * FROM education WHERE date = "%s" AND patient_ID = "%s";' % (EMR_utilities.dateToday(), self.PtID)
results = EMR_utilities.getData(qry)
if results:
dlg = wx.MessageDialog(None, "A saved care plan for today already exists. Look in the Education tab.", "Important", wx.OK)
dlg.ShowModal()
else:
if self.GetParent().GetPage(7).neweducNote.GetValue() == '':
cp = CarePlan.CarePlanFrame(self, self.PtID)
cp.Show(True)
cp.notesinstance = self
else:
dlg = wx.MessageDialog(None, "A new care plan for today already exists. Look in the Education tab.", "Important", wx.OK)
dlg.ShowModal()
示例6: __init__
# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import dateToday [as 别名]
def __init__(self, parent, ID, PtID):
wx.Panel.__init__(self, parent, ID)
#I need some way to set the max size for the grid
self.PtID = PtID
self.qry = "SELECT * FROM vitals WHERE patient_ID = %s;" % (str(self.PtID))
self.vitals = list(EMR_utilities.getAllDictData(self.qry))
self.textctrl = {}
self.vitalsList = ObjectListView(self, -1, style=wx.LC_REPORT|wx.SUNKEN_BORDER)
self.vitalsList.SetColumns([
ColumnDefn("Weight", "center", 80, valueGetter="wt"),
ColumnDefn("Height", "center", 80, valueGetter="ht"),
ColumnDefn("HC", "center", 80, valueGetter="hc"),
ColumnDefn("Systolic", "center", 80, valueGetter="sBP"),
ColumnDefn("Diastolic", "center", 80, valueGetter="dBP"),
ColumnDefn("Pulse", "center", 80, valueGetter="pulse"),
ColumnDefn("Resp", "center", 80, valueGetter="resp"),
ColumnDefn("O2 Sat", "center", 80, valueGetter="sats"),
ColumnDefn("Temp", "center", 80, valueGetter="temp"),
ColumnDefn("Date", "center", 120, valueGetter="vitals_date")
])
self.vitalsList.SetObjects(self.vitals)
self.vitalsList.cellEditMode = ObjectListView.CELLEDIT_DOUBLECLICK
self.vitalsList.Bind(EVT_CELL_EDIT_STARTING, self.HandleCellEditStarting)
self.vitalsList.Bind(EVT_CELL_EDIT_FINISHED, self.listHandleCellEditFinished)
self.vitalsbox = wx.BoxSizer(wx.HORIZONTAL)
self.vitalsbox.Add(self.vitalsList, 1, wx.EXPAND |wx.ALL, 20)
self.mainsizer = wx.BoxSizer(wx.VERTICAL)
border = wx.StaticBox(self, -1, 'Add Vitals')
f = wx.Font(10, wx.DEFAULT, wx.NORMAL, wx.LIGHT)
border.SetFont(f)
addvitals = wx.StaticBoxSizer(border, wx.HORIZONTAL)
controls = [('Wt', 40), ('Ht', 30), ('HC', 30), ('Temp', 40), ('SBP', 40), ('DBP', 40), ('Pulse', 40), ('Resp', 30), \
('O2 Sats', 30), ('Date', 80)]
for label, size in controls:
EMR_utilities.buildOneTextCtrl(self, label, size, addvitals)
self.textctrl['Date'].SetValue(str(EMR_utilities.dateToday()))
self.mainsizer.Add(self.vitalsbox)
self.mainsizer.Add(addvitals, 0, wx.ALL, 20)
buttonAdd = EMR_utilities.buildOneButton(self, self, 'Update Vitals', self.UpdateVitals)
buttonDel = EMR_utilities.buildOneButton(self, self, 'Delete Vitals', self.DeleteVitals)
self.mainsizer.Add(buttonAdd, 0, wx.ALIGN_LEFT|wx.ALIGN_TOP|wx.LEFT|wx.TOP, 20)
self.mainsizer.Add(buttonDel, 0, wx.ALIGN_LEFT|wx.ALIGN_TOP|wx.LEFT|wx.TOP, 20)
self.SetSizer(self.mainsizer)
示例7: getVitals
# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import dateToday [as 别名]
def getVitals(ptID, baby=0):
qry = "SELECT temp, sBP, dBP, pulse, resp, sats, wt, ht FROM vitals WHERE patient_ID = %s AND vitals_date = '%s;'" \
% (ptID, str(EMR_utilities.dateToday()))
results = EMR_utilities.getData(qry)
string = "Vitals: "
try:
bmi = format((decimal.Decimal(results[6])/(decimal.Decimal(results[7])*decimal.Decimal(results[7])))*703, '.1f')
except:
bmi = 'not calculated'
if baby == 0:
if results == None:
string = string + "none taken today"
else:
string = string + 'T%s %s/%s P%s R%s O2Sats: %s Wt:%s BMI: %s' % (results[0], results[1], results[2], results[3], \
results[4], results[5], results[6], bmi)
return string
else:
if results == None:
string = string + "none taken today"
else:
string = string + 'Wt: %s, Length: %s' % (results[6], results[7])
return string
示例8: OnNew
# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import dateToday [as 别名]
def OnNew(self, event):
self.educNote.Show(False)
self.neweducNote.Show(True)
self.Layout()
self.textctrl["Date"].SetValue(str(EMR_utilities.dateToday(t="sql")))
示例9: open_file
# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import dateToday [as 别名]
def open_file(self):
os.system('/usr/bin/gnome-open ' + "/home/mb/Desktop/GECKO/EMR_outputs/%s/Other/rcpt-%s.pdf" % \
(self.ptID, EMR_utilities.dateToday()))
示例10: __init__
# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import dateToday [as 别名]
def __init__(self, parent, PtID):
wx.Frame.__init__(self, parent, -1, title='Create CMS 1500 Form', pos=(100,100), size=(800,775))
self.PtID = PtID
self.myparent = parent #allows access to notes page
self.panel = wx.Panel(self, -1)
self.columns = {}
#this one is for the Gateway EDI print image file
self.printImageDict = {}
for n in range(1, 292):
self.columns[n] = ""
qry = "SELECT * FROM demographics WHERE patient_ID = %s;" % self.PtID
self.ptResults = EMR_utilities.getDictData(qry)
self.printImageDict.update(self.ptResults) #starts collecting the data we need for print image
self.columns[56] = 'X'
self.columns[58] = 'X'
self.columns[61] = 'X'
self.renderingNPI = '1326063991'
self.printImageDict['Admit'] = ''
self.printImageDict['DC'] = ''
self.whichIns = self.ptResults['insurance_company']
if self.ptResults['sex'].lower() == 'male':
self.columns[21] = 'X'
self.printImageDict['msex'] = 'X'
elif self.ptResults['sex'] == '':
dlg = wx.MessageBox('Gender information is missing on this patient.', 'Need more info', style=wx.OK)
else:
self.columns[22] = 'X'
self.printImageDict['fsex'] = 'X'
if self.ptResults['OtherInsuredGender'] == None:
pass
elif self.ptResults['OtherInsuredGender'].lower() == 'male':
self.columns[51] = 'X'
else: self.columns[52] = 'X'
if self.ptResults['InsuredGender'] == None:
pass
elif self.ptResults['InsuredGender'].lower() == 'male':
self.columns[65] = 'X'
else: self.columns[66] = 'X'
self.columns[70] = 'X'
self.columns[71] = 'sof' #patient signature
self.columns[73] = 'sof' #insured signature- authorizes payment to provider
self.columns[100] = '26D2013625' #CLIA number
self.columns[261] = '386525225' #TaxID
self.columns[262] = 'X' #SSN; either SSN or EIN is checked
self.columns[264] = self.PtID #PatientAcctNumber
self.columns[265] = 'X' #AcceptAssignYes
self.columns[267] = decimal.Decimal() #TotalCharges
self.columns[268] = decimal.Decimal() #AmountPaid
self.columns[270] = 'sof' #PhysicianSignature
self.columns[271] = str(EMR_utilities.dateToday()) #PhysicianSignatureDate
self.columns[272] = 'Barron' #PhysicianLast
self.columns[273] = 'Michael' #PhysicianFirst
self.columns[274] = 'O' #PhysicianMidInit
self.columns[275] = 'Michael Barron MD' #FacilityName
self.columns[276] = '8515 Delmar Blvd 217' #FacilityStreetAddr
self.columns[277] = 'St. Louis' #FacilityCity
self.columns[278] = 'MO' #FacilityState
self.columns[279] = '63124-2168' #FacilityZip
self.columns[280] = 'St. Louis, MO 63124-2168' #FacilityCityStateZip
self.columns[281] = '1326063991' #FacilityNPI
self.columns[284] = 'Michael Barron MD' #SupplierName
self.columns[285] = '8515 Delmar Blvd #217' #SupplierStreetAddr
self.columns[286] = 'St. Louis' #SupplierCity
self.columns[287] = 'MO' #SupplierState
self.columns[288] = '63124-2168' #SupplierZip
self.columns[289] = 'St. Louis, MO 63124-2168' #SupplierCityStateZip
self.columns[290] = '3146675276' #SupplierPhone
self.columns[291] = '1326063991' #SupplierNPI
self.columns[292] = '1326063991' #GroupID
self.printImageDict['Fac_Adr'] = self.columns[280]
"""Basic plan is to create a dictionary with keys numbered from 1-228 which correspond to the columns in the
office ally headers. Will then fill in the values based on queried data. Finally will step through the
dictionary by key values and build the text file to submit to Office Ally. The columns are numbers rather
than the columns names because we can easily step the number range to create the text file for OA. Comments
include the Office Ally header names."""
#Insurance Address
cpt_aFields = ('date', 'date', 'POS')
cpt_bFields = ('CPT_code', 'mod_A', 'mod_B', 'mod_C', 'mod_D', 'dx_pter', 'total_charge')
#insurance type, Box 1, is handled in OnSelectIns
sizer = wx.GridBagSizer(10, 30)
sizer.Add(wx.StaticText(self.panel, -1, "Insurance Type"), pos=(1, 1))
insListBox = wx.ListBox(self.panel, -1, choices=['Medicare', 'Medicaid', 'Tricare', 'Champus', 'GHP', 'FECA', 'Other'], style=wx.LB_SINGLE)
sizer.Add(insListBox, pos=(2, 1), span=(4, 1), flag=wx.EXPAND)
self.Bind(wx.EVT_LISTBOX, self.OnSelectIns, insListBox)
sizer.Add(wx.StaticText(self.panel, -1, "Relation to Insured"), pos=(1, 2))
relListBox = wx.ListBox(self.panel, -1, choices=['self', 'spouse', 'child', 'other'], style=wx.LB_SINGLE)
sizer.Add(relListBox, pos=(2, 2), span=(3, 1), flag=wx.EXPAND)
self.Bind(wx.EVT_LISTBOX, self.OnSelectRel, relListBox)
self.accList = ['n/a', 'employment', 'auto accident', 'other accident']
accBox = wx.RadioBox(self.panel, -1, "Illness/Injury due to ..?", choices=self.accList)
#.........这里部分代码省略.........
示例11: OnSign
# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import dateToday [as 别名]
def OnSign(self, event):
#check to see if note has already been signed
checkQry = 'SELECT stamp FROM notes WHERE patient_ID = "%s" AND date = "%s";' % (self.PtID, self.textctrl['Date'].GetValue())
nullCheck = EMR_utilities.getData(checkQry)
try:
if nullCheck[0]:
wx.MessageBox('Note has already been signed.', 'Message')
else:
#get user
prnt = wx.GetTopLevelParent(self)
userQry = EMR_utilities.getData('SELECT full_name FROM users WHERE user_name = "%s";' % prnt.user)
#add signed text at bottom of note
note = self.soapNote.GetValue() + '\n\n' + 'ELECTRONICALLY SIGNED BY %s ON %s' % (userQry[0], str(EMR_utilities.dateToday(t='sql')))
#use timestamper
cli = timestamping.ts_client.TimeStampClient('http://198.199.64.101:8000')
data = str(self.PtID) + note + self.textctrl['Date'].GetValue()
val = cli.stamp(data)
#update the record for that note to include utctime and stamp
noteQry = 'UPDATE notes SET soap = %s, utctime = %s, stamp = %s WHERE patient_ID = %s AND date = %s'
values = (note, val['utctime'], val['stamp'], self.PtID, self.textctrl['Date'].GetValue())
EMR_utilities.valuesUpdateData(noteQry, values)
self.listctrl.Set("")
self.loadList()
except:
# catch *all* exceptions
e0 = sys.exc_info()[0]
e1 = sys.exc_info()[1]
wx.MessageBox("Error: %s, %s" % (e0, e1))
示例12: OnNew
# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import dateToday [as 别名]
def OnNew(self, event):
self.soapNote.Show(False)
self.newsoapNote.Show(True)
self.Layout()
self.textctrl['Date'].SetValue(str(EMR_utilities.dateToday(t='sql')))
self.billBtn.Show(False)
示例13: EvtSelListbox
# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import dateToday [as 别名]
def EvtSelListbox(self, event):
self.textctrl['Take'].SetValue('1')
self.textctrl['Frequency'].SetValue('daily')
self.textctrl['Route'].SetValue('oral')
self.textctrl['Date'].SetValue(str(EMR_utilities.dateToday()))
self.textctrl['#'].SetFocus()
示例14: OnDone
# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import dateToday [as 别名]
def OnDone(self, event):
#create file
prnt = wx.GetTopLevelParent(self.myparent)
#dem_page = parent.nb.GetPage(1) #figured this out using PyCrust (*this will mess up if you have extra pages*)
path = EMR_utilities.getData("SELECT home_dir FROM users WHERE user_name = '%s'" % prnt.user)
linuxpath = "/home/%s/Desktop/GECKO/Billing/OfficeAlly" % path[0] + "_%s.txt"
applepath = "/Users/%s/Desktop/GECKO/Billing/OfficeAlly" % path[0] + "_%s.txt"
windowspath = "C:\\Documents and Settings\\%s\\My Documents\\GECKO\\Billing\\OfficeAlly" % path[0] + "_%s.txt"
daily_billing = EMR_utilities.platformText(linuxpath, applepath, windowspath) % EMR_utilities.dateToday()
a_file = open(daily_billing, 'a') #'a' will both append to existing and create if nonexistent
gateway_file = open("/home/%s/Desktop/GECKO/Billing/Gateway" % settings.HOME_FOLDER + "%s.txt" % EMR_utilities.dateToday(), 'a')
#get demographic and insurance data
insFields = (('InsurancePlanName', 1), ('InsurancePayerID', 2), ('InsuranceStreetAddr', 3), ('InsuranceCity', 4), \
('InsuranceState', 5), ('InsuranceZip', 6), ('InsuranceCityStateZip', 7), ('InsurancePhone', 8))
fields = (('lastname', 17), ('firstname', 18), ('mid_init', 19), ('dob', 20), ('address', 26), \
('city', 27), ('state', 28), ('zipcode', 29), ('phonenumber', 30), ('sof', 72), \
\
('policy_ID', 16), ('InsuredLast', 23), ('InsuredFirst', 24), ('InsuredMidInit', 25), \
('InsuredStreetAddress', 35), ('InsuredCity', 36), ('InsuredState', 37), \
('InsuredZip', 38), ('InsuredPhone', 39), \
('InsuredPolicyGroupOrFecaNumber', 63), ('InsuredDOB', 64), \
('InsuredEmployerNameOrSchoolName', 67), ('InsuredInsurancePlanNameOrProgramName', 68), \
\
('OtherInsuredLast', 46), ('OtherInsuredFirst', 47), ('OtherInsuredMidInit', 48), \
('OtherInsuredPolicyOrGroupNumber', 49), ('OtherInsuredDOB', 50), \
('OtherInsuredEmployerNameOrSchoolName', 53), ('OtherInsuredInsurancePlanOrProgramName', 54))
insQry = "SELECT * FROM ins_companies WHERE InsurancePlanName = '%s';" % self.whichIns
insResults = EMR_utilities.getDictData(insQry)
self.printImageDict.update(insResults) #adds more necessary data for print image
self.createOADict(insFields, insResults)
self.createOADict(fields, self.ptResults)
self.get1500Data()
self.columns[269] = self.columns[267] - self.columns[268] #BalanceDue
if self.billSecInsBox.IsChecked():
EMR_utilities.updateData('UPDATE billing SET 2ndDate = CURDATE() \
WHERE note_number = %s;' % (self.noteNumber))
self.columns[16] = self.ptResults['secondary_ins_ID'] #replaces the primary ins ID
self.columns[63] = self.ptResults['sec_PolicyGroupOrFecaNumber'] #replaces primary ins policy number
if self.billSecAsPrim.IsChecked(): #allows billing secondary as primary
pass
else:
self.columns[1] = self.columns[1] + ' secondary' #this is how OA does sec ins billing
else:
EMR_utilities.updateData('UPDATE billing SET 1stDate = CURDATE() \
WHERE note_number = %s;' % (self.noteNumber))
if self.hospAdmBox.IsChecked(): #checks to make sure dates are filled in
if not self.columns[83]:
self.columns[83] = EMR_utilities.dateToday('OA')
if not self.columns[84]:
self.columns[84] = EMR_utilities.dateToday('OA')
for n in range(1, 292): #remove all the None entries which OA doesn't like
if self.columns[n] == None:
self.columns[n] = ''
else: pass
for n in range(1, 292):
a_file.write(str(self.columns[n]) + '\t')
a_file.write('\n')
"""Print image for Gateway EDI"""
self.printImageDict['Name'] = self.printImageDict['lastname'] + ', ' + self.printImageDict['firstname']
self.printImageDict['InsuredName'] = self.printImageDict['InsuredLast'] + ', ' + self.printImageDict['InsuredFirst']
self.printImageDict['InsuranceCityStateZip'] = insResults['InsuranceCity'] + ', ' + insResults['InsuranceState'] + ' ' \
+ insResults['InsuranceZip']
self.printImageDict['Medicare'] = self.columns[9]
self.printImageDict['Medicaid'] = self.columns[10]
self.printImageDict['Other'] = self.columns[15]
self.printImageDict['self'] = self.columns[31]
self.printImageDict['spouse'] = self.columns[32]
self.printImageDict['child'] = self.columns[33]
self.printImageDict['other'] = self.columns[34]
self.printImageDict['empl_no'] = self.columns[56]
self.printImageDict['auto_no'] = self.columns[58]
self.printImageDict['other_no'] = self.columns[61]
self.printImageDict['empl_yes'] = self.columns[55]
self.printImageDict['auto_yes'] = self.columns[57]
self.printImageDict['other_yes'] = self.columns[60]
self.printImageDict['auto_state'] = self.columns[59]
self.printImageDict['icd1'] = self.columns[89]
self.printImageDict['icd2'] = self.columns[90]
self.printImageDict['icd3'] = self.columns[91]
self.printImageDict['icd4'] = self.columns[92]
self.printImageDict['icd5'] = self.columns[93]
self.printImageDict['icd6'] = self.columns[94]
self.printImageDict['icd7'] = self.columns[95]
self.printImageDict['icd8'] = self.columns[96]
dateList = ['dob', 'sof', 'Admit', 'DC', '101', '117', '133', '149', '165', '181']
for item in dateList: #fixes problem with dates not showing up on print image
try:
self.printImageDict[item] = self.printImageDict[item].strftime("%m %d %y")
except:
self.printImageDict[item] = self.printImageDict[item].replace('/', ' ')
self.printImageDict['sig'] = 'Signature on File'
self.printImageDict['267'] = str(self.columns[267]) #total charges converting decimal.decimal to string
self.printImageDict['268'] = str(self.columns[268]) #this is amount paid, same as above
#this brings in secondary/other insurance info if present
if self.ptResults['secondary_ins']:
#.........这里部分代码省略.........
示例15: open_file
# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import dateToday [as 别名]
def open_file(self):
os.system('/usr/bin/gnome-open ' + "%s/EMR_outputs/%s/Other/rcpt-%s.pdf" % \
(settings.LINUXPATH, self.ptID, EMR_utilities.dateToday()))