本文整理汇总了Python中EMR_utilities.platformText方法的典型用法代码示例。如果您正苦于以下问题:Python EMR_utilities.platformText方法的具体用法?Python EMR_utilities.platformText怎么用?Python EMR_utilities.platformText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EMR_utilities
的用法示例。
在下文中一共展示了EMR_utilities.platformText方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: OnpRintMed
# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import platformText [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 platformText [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: EvtSelTmplist
# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import platformText [as 别名]
def EvtSelTmplist(self, event):
lt = "/home/mb/Desktop/GECKO/wellchild/%s.txt"
at = ""
wt = "C:\Documents and Settings\mbarron\My Documents\GECKO\wellchild\%s.txt"
if event.GetString() == 'generic':
gen_note = EMR_formats.note(self.PtID)
if wx.GetTopLevelParent(self).nb.GetPage(2).reviewed == 1:
gen_note = gen_note.replace('Meds', 'Meds(reviewed today)')
gen_note = gen_note.replace('Allergies', 'Allergies(reviewed today)')
self.newsoapNote.SetValue(gen_note)
self.not_billable = 0
elif event.GetString() == 'prenatal':
self.newsoapNote.SetValue(EMR_formats.prenatal(self.PtID))
elif event.GetString() == 'procedure':
self.newsoapNote.SetValue(EMR_formats.procedure(self.PtID))
elif event.GetString() == 'phonecon':
self.newsoapNote.SetValue(EMR_formats.phonecon(self.PtID))
self.not_billable = 1
elif event.GetString() == 'well child':
choice = wx.GetSingleChoice('What age child?', "", ['Wt Check', '2 month', '4 month', '6 month', '9 month',
'12 month', '15 month', '18 month', '2 year', '3-4 year', '6-7_yr_old', '7-8 year', '10-11_yr_old',
'12-13_yr_old', '9-12 year', '13-15 year'])
string = open(EMR_utilities.platformText(lt, at, wt) % choice, 'r')
s = string.read()
string.close()
result = s % (EMR_utilities.getAge(self.PtID), EMR_utilities.getSex(self.PtID),
EMR_formats.getVitals(self.PtID, baby=1))
self.newsoapNote.SetValue(result)
self.not_billable = 0
else: pass
示例4: OnPrint
# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import platformText [as 别名]
def OnPrint(self, event):
if self.soapNote.IsShown():
note = self.soapNote.GetValue()
else:
note = self.newsoapNote.GetValue()
qry = 'SELECT firstname, lastname \
FROM demographics \
WHERE patient_ID = "%s";' % self.PtID
print_data = EMR_utilities.getDictData(qry)
print_data['date'] = self.textctrl['Date'].GetValue()
print_data['soap'] = EMR_utilities.wrapper(note, 80)
print print_data['soap']
lt = "%s/EMR_outputs/SoapNote.html" % settings.LINUXPATH
at = "%s/EMR_outputs/SoapNote.html" % settings.APPLEPATH
wt = "%s\EMR_outputs\SoapNote.html" % settings.WINPATH
form = open(EMR_utilities.platformText(lt, at, wt), 'r')
s = form.read()
form.close()
note_text = s % (print_data)
printer = EMR_utilities.Printer()
printer.PreviewText(note_text)
示例5: OnGetPt
# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import platformText [as 别名]
def OnGetPt(self, event):
t1 = time.clock()
import Meds, Problems, PMH, Vitals, Notes, demographics, ToDo, Queries, Prevention, Education
t2 = time.clock()
lt = "%s/EMR_outputs" % settings.LINUXPATH
at = "%s/EMR_outputs" % settings.APPLEPATH
wt = "%s\EMR_outputs" % settings.WINPATH
f = wx.GetTopLevelParent(self)
num = self.list.GetItemCount()
if num == 0:
dlg = wx.MessageDialog(
None, "There are no patients to select. Close window?", "Problem", style=wx.YES_NO | wx.YES_DEFAULT
)
answer = dlg.ShowModal()
if answer == wx.ID_YES:
f.nb.DeletePage(self)
else:
for i in range(num):
if self.list.IsChecked(i):
medspage = Meds.Meds(f.nb, -1, self.list.GetItemText(i))
medspage.ptID = self.list.GetItemText(i)
probpage = Problems.Problems(f.nb, -1, self.list.GetItemText(i))
probpage.ptID = self.list.GetItemText(i)
pmhpage = PMH.PMH(f.nb, -1, self.list.GetItemText(i))
pmhpage.ptID = self.list.GetItemText(i)
vitalspage = Vitals.Vitals(f.nb, -1, self.list.GetItemText(i))
vitalspage.ptID = self.list.GetItemText(i)
notespage = Notes.Notes(f.nb, -1, self.list.GetItemText(i))
f.nb.DeletePage(0)
demogr_page = demographics.demographics(f.nb, ptID=self.list.GetItemText(i))
todo_page = ToDo.todo(f.nb, -1, PtID=self.list.GetItemText(i))
queries_page = Queries.queries(f.nb, ptID=self.list.GetItemText(i))
preventspage = Prevention.Prevention(f.nb, -1, ptID=self.list.GetItemText(i))
preventspage.ptID = self.list.GetItemText(i)
educpage = Education.Notes(f.nb, -1, self.list.GetItemText(i))
f.nb.AddPage(demogr_page, "Demographics")
f.nb.AddPage(medspage, "Medications")
f.nb.AddPage(probpage, "Problems")
f.nb.AddPage(pmhpage, "Past Medical History")
f.nb.AddPage(vitalspage, "Vitals")
f.nb.AddPage(notespage, "Notes")
f.nb.AddPage(educpage, "Education")
f.nb.AddPage(todo_page, "To Do")
f.nb.AddPage(preventspage, "Health Maintenance")
f.nb.AddPage(queries_page, "Queries")
base_path = EMR_utilities.platformText(lt, at, wt)
folders = [
"SOAP_notes",
"Labs",
"Radiology",
"Consults",
"Old_Records",
"Insurance",
"Other",
"Orders",
]
if sys.platform == "win32":
if os.path.exists("%s\%s" % (base_path, self.list.GetItemText(i))):
pass
else:
for item in folders:
os.makedirs("%s\%s\%s" % (base_path, self.list.GetItemText(i), item))
else:
if os.path.exists("%s/%s" % (base_path, self.list.GetItemText(i))):
pass
else:
for item in folders:
os.makedirs("%s/%s/%s" % (base_path, self.list.GetItemText(i), item))
qry = (
'SELECT firstname, lastname, SUM(balance) FROM demographics INNER JOIN billing \
USING (patient_ID) WHERE patient_ID = "%s";'
% self.list.GetItemText(i)
)
results = EMR_utilities.getDictData(qry)
try:
f.ptText.SetLabel(
" %s %s %s $%d"
% (
results["firstname"],
results["lastname"],
EMR_utilities.getAge(self.list.GetItemText(i)),
results["SUM(balance)"],
)
)
except:
f.ptText.SetLabel(
" %s %s %s no balance"
% (
results["firstname"],
results["lastname"],
EMR_utilities.getAge(self.list.GetItemText(i)),
)
)
f.ptID = self.list.GetItemText(i)
t3 = time.clock()
if f.ptMsgs:
f.ptMsgs.messages.SetLabel(EMR_utilities.MESSAGES)
#.........这里部分代码省略.........
示例6: OnDone
# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import platformText [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']:
#.........这里部分代码省略.........
示例7: Notes
# 需要导入模块: import EMR_utilities [as 别名]
# 或者: from EMR_utilities import platformText [as 别名]
import wx, os, sys
import EMR_utilities, settings
import EMR_formats
import Billing, CreateCMS, CarePlan
import Printer
import decimal
from itertools import chain
from collections import Counter
from nltk.tokenize import wordpunct_tokenize
lt = settings.LINUXPATH
at = settings.APPLEPATH
wt = settings.WINPATH
d = EMR_utilities.platformText(lt, at, wt)
sys.path.insert(0, d + '/ts_project.rc1')
import timestamping
del sys.path[0]
class Notes(wx.Panel):
def __init__(self, parent, id, ptID):
wx.Panel.__init__(self, parent, id)
self.PtID = ptID
self.textctrl = {}
self.not_billable = 0
self.note_number = ''
textcontrols1 = [('Date', 100)]
textcontrols2 = [('ICD #1', 60), ('ICD #2', 60), ('ICD #3', 60), ('ICD #4', 60), ('ICD #5', 60)]
textcontrols3 = [('ICD #6', 60), ('ICD #7', 60), ('ICD #8', 60), ('ICD #9', 60), ('ICD #10', 60)]
cptsizer = wx.BoxSizer(wx.VERTICAL)
icd1sizer = wx.BoxSizer(wx.VERTICAL)