Compare commits
8 Commits
7dfeb464e8
...
50fd158b3a
Author | SHA1 | Date |
---|---|---|
lxx | 50fd158b3a | 2 weeks ago |
lxx | 8ed245b71f | 3 weeks ago |
Xiao Ye | 2088b57307 | 4 weeks ago |
Xiao Ye | 53914e1437 | 4 weeks ago |
Xiao Ye | 6767e89ab7 | 4 weeks ago |
Xiao Ye | 16da021625 | 4 weeks ago |
Xiao Ye | 2cfd43c53b | 4 weeks ago |
Xiao Ye | b793104c0f | 4 weeks ago |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,241 @@ |
||||
package com.his.crb; |
||||
|
||||
import com.main.authority.DesktopPageTaskbarForm; |
||||
import com.report.creator.ReportPrintFactory; |
||||
import com.report.creator.ReportPrintModel; |
||||
import com.report.design.basic.ReportDesignUtil.PrintFlag; |
||||
import com.util.MainUtil; |
||||
import com.wat.component.DxEMRShow; |
||||
import com.wat.core.component.AppInstance; |
||||
import com.wat.core.component.WatForm; |
||||
import com.wat.core.config.DaoCreator; |
||||
import com.wat.core.dal.DxNormalDataManager; |
||||
import com.wat.delphi.util.Delphi; |
||||
|
||||
/** |
||||
* |
||||
*/ |
||||
public class CrbService { |
||||
|
||||
/** |
||||
* @param companyId |
||||
*/ |
||||
public static void Main(String companyId) { |
||||
|
||||
} |
||||
|
||||
public static String printCrb(WatForm form,String companyId,String pkey) { |
||||
|
||||
String srtn=""; |
||||
String companyid=MainUtil.getCurCompanyID(); |
||||
|
||||
DxNormalDataManager crb_infodao_bypkey=DaoCreator.getNormalDao("crb_infodao_bypkey"); |
||||
crb_infodao_bypkey.reload(new Object[]{companyid,pkey}); |
||||
|
||||
|
||||
DesktopPageTaskbarForm pform = (DesktopPageTaskbarForm)AppInstance.getInstance().getWatDesktopTaskBar(); |
||||
String type="传染病报卡"; |
||||
DxNormalDataManager reportTemplateDao = DaoCreator.getNormalDao("reportTemplateDao"); |
||||
reportTemplateDao.setNormalParameters(new Object[] {companyid,type}); |
||||
reportTemplateDao.reload(); |
||||
if(reportTemplateDao.getSelectedRow() < 0) { |
||||
srtn="还未设置打印模板,请联系管理人员"; |
||||
}else{ |
||||
//卡片类别
|
||||
DxNormalDataManager sc_crb_kplbdao=DaoCreator.getNormalDao("sc_crb_kplbdao"); |
||||
sc_crb_kplbdao.reloadByDictionary("MC", "BH"); |
||||
//民族
|
||||
DxNormalDataManager mzdic=DaoCreator.getNormalDao("mzdic"); |
||||
mzdic.reloadByDictionary("MC", "BH"); |
||||
//地区
|
||||
DxNormalDataManager regiondic=DaoCreator.getNormalDao("regiondic"); |
||||
regiondic.reloadByDictionary("CNAME", "CODE"); |
||||
//文化程度
|
||||
DxNormalDataManager sc_crb_whcddao=DaoCreator.getNormalDao("sc_crb_whcddao"); |
||||
sc_crb_whcddao.reloadByDictionary("MC", "BH"); |
||||
//样本来源
|
||||
DxNormalDataManager sc_crb_yblydao=DaoCreator.getNormalDao("sc_crb_yblydao"); |
||||
sc_crb_yblydao.reloadByDictionary("MC", "BH"); |
||||
//感染途径
|
||||
DxNormalDataManager sc_crb_grtjdao=DaoCreator.getNormalDao("sc_crb_grtjdao"); |
||||
sc_crb_grtjdao.reloadByDictionary("MC", "BH"); |
||||
|
||||
|
||||
|
||||
|
||||
DxNormalDataManager crbbkdydao=DaoCreator.getNormalDao("crbbkdydao");//传染病报卡使用dao
|
||||
crbbkdydao.reload(); |
||||
crbbkdydao.absolute(crbbkdydao.insert(0)); |
||||
crbbkdydao.setColumnValue("卡片ID", crb_infodao_bypkey.getColumnValue("ID")); |
||||
crbbkdydao.setColumnValue("卡片类别", sc_crb_kplbdao.getDicValue(crb_infodao_bypkey.getColumnValueAsString("LX"))); |
||||
crbbkdydao.setColumnValue("患者姓名", crb_infodao_bypkey.getColumnValue("NAME")); |
||||
crbbkdydao.setColumnValue("患者家长姓名", crb_infodao_bypkey.getColumnValue("JZ_NAME")); |
||||
String sex=crb_infodao_bypkey.getColumnValueAsString("SEX"); |
||||
crbbkdydao.setColumnValue("性别"+sex, "checked"); |
||||
crbbkdydao.setColumnValue("联系电话", crb_infodao_bypkey.getColumnValue("LXDH")); |
||||
crbbkdydao.setColumnValue("出生日期", Delphi.format(crb_infodao_bypkey.getColumnValueAsLong("BRDY"), "yyyy-MM-dd")); |
||||
crbbkdydao.setColumnValue("民族", mzdic.getDicValue(crb_infodao_bypkey.getColumnValueAsString("MZ"))); |
||||
|
||||
|
||||
crbbkdydao.setColumnValue("工作单位", crb_infodao_bypkey.getColumnValue("GZDW")); |
||||
String ZY=crb_infodao_bypkey.getColumnValueAsString("ZY"); |
||||
crbbkdydao.setColumnValue("职业"+ZY, "checked"); |
||||
crbbkdydao.setColumnValue("具体的其它职业信息", crb_infodao_bypkey.getColumnValue("QTZY")); |
||||
|
||||
String BRSY=crb_infodao_bypkey.getColumnValueAsString("BRSY"); |
||||
crbbkdydao.setColumnValue("病人属于"+BRSY, "checked"); |
||||
crbbkdydao.setColumnValue("现住地址省份", regiondic.getDicValue(crb_infodao_bypkey.getColumnValueAsString("XZDZ_SHENG"))); |
||||
crbbkdydao.setColumnValue("现住地址城市",regiondic.getDicValue(crb_infodao_bypkey.getColumnValueAsString("XZDZ_SHI"))); |
||||
crbbkdydao.setColumnValue("现住地址县", regiondic.getDicValue(crb_infodao_bypkey.getColumnValueAsString("XZDZ_XIAN"))); |
||||
crbbkdydao.setColumnValue("现住地址镇", regiondic.getDicValue(crb_infodao_bypkey.getColumnValueAsString("XZDZ_ZHEN"))); |
||||
crbbkdydao.setColumnValue("现住地址村", regiondic.getDicValue(crb_infodao_bypkey.getColumnValueAsString("XZDZ_CUN"))); |
||||
crbbkdydao.setColumnValue("详细现住地址", crb_infodao_bypkey.getColumnValue("XZDZ_XX")); |
||||
crbbkdydao.setColumnValue("身份证号码", crb_infodao_bypkey.getColumnValue("SFZH")); |
||||
crbbkdydao.setColumnValue("文化程度",sc_crb_whcddao.getDicValue(crb_infodao_bypkey.getColumnValueAsString("WHCD"))); |
||||
|
||||
|
||||
String HYZK=crb_infodao_bypkey.getColumnValueAsString("HYZK"); |
||||
crbbkdydao.setColumnValue("婚姻状况"+HYZK, "checked"); |
||||
|
||||
|
||||
crbbkdydao.setColumnValue("疾病名称", crb_infodao_bypkey.getColumnValue("JBMC")); |
||||
crbbkdydao.setColumnValue("其它病名称", crb_infodao_bypkey.getColumnValue("QTJBMC")); |
||||
crbbkdydao.setColumnValue("诊断日期", Delphi.format(crb_infodao_bypkey.getColumnValueAsLong("ZDRQ"), "yyyy-MM-dd HH:mm:ss")); |
||||
crbbkdydao.setColumnValue("死亡日期", Delphi.format(crb_infodao_bypkey.getColumnValueAsLong("SWRQ"), "yyyy-MM-dd HH:mm:ss")); |
||||
crbbkdydao.setColumnValue("备注", crb_infodao_bypkey.getColumnValue("BZ")); |
||||
String HJDLX=crb_infodao_bypkey.getColumnValueAsString("HJDLX"); |
||||
crbbkdydao.setColumnValue("户籍地类型"+HJDLX, "checked"); |
||||
crbbkdydao.setColumnValue("户籍地址省份", regiondic.getDicValue(crb_infodao_bypkey.getColumnValueAsString("HJDZ_SHENG"))); |
||||
crbbkdydao.setColumnValue("户籍地址城市",regiondic.getDicValue(crb_infodao_bypkey.getColumnValueAsString("HJDZ_SHI"))); |
||||
crbbkdydao.setColumnValue("户籍地址县", regiondic.getDicValue(crb_infodao_bypkey.getColumnValueAsString("HJDZ_XIAN"))); |
||||
crbbkdydao.setColumnValue("户籍地址镇", regiondic.getDicValue(crb_infodao_bypkey.getColumnValueAsString("HJDZ_ZHEN"))); |
||||
crbbkdydao.setColumnValue("户籍地址村", regiondic.getDicValue(crb_infodao_bypkey.getColumnValueAsString("HJDZ_CUN"))); |
||||
crbbkdydao.setColumnValue("户籍地详细地址", crb_infodao_bypkey.getColumnValue("HZDZ_XX")); |
||||
String ZDLX=crb_infodao_bypkey.getColumnValueAsString("ZDLX"); |
||||
crbbkdydao.setColumnValue("诊断类型"+ZDLX, "checked"); |
||||
String BLFL=crb_infodao_bypkey.getColumnValueAsString("BLFL"); |
||||
crbbkdydao.setColumnValue("病例分类"+BLFL, "checked"); |
||||
crbbkdydao.setColumnValue("发病日期", Delphi.format(crb_infodao_bypkey.getColumnValueAsLong("FBRQ"), "yyyy-MM-dd")); |
||||
String MJZYWXTZZ=crb_infodao_bypkey.getColumnValueAsString("MJZYWXTZZ"); |
||||
crbbkdydao.setColumnValue("密接者有无相同症状"+MJZYWXTZZ, "checked"); |
||||
String XG_LCYZCD=crb_infodao_bypkey.getColumnValueAsString("XG_LCYZCD"); |
||||
crbbkdydao.setColumnValue("临床严重程度"+XG_LCYZCD, "checked"); |
||||
String XG_SRBL=crb_infodao_bypkey.getColumnValueAsString("XG_SRBL"); |
||||
crbbkdydao.setColumnValue("输入病例"+XG_SRBL, "checked"); |
||||
String XG_SWYY=crb_infodao_bypkey.getColumnValueAsString("XG_SWYY"); |
||||
crbbkdydao.setColumnValue("死亡原因是否与新冠感染有关"+XG_SWYY, "checked"); |
||||
crbbkdydao.setColumnValue("直接死亡诊断", crb_infodao_bypkey.getColumnValue("XG_ZJSWZD")); |
||||
String JHB_SZZT=crb_infodao_bypkey.getColumnValueAsString("JHB_SZZT"); |
||||
crbbkdydao.setColumnValue("收治状态"+JHB_SZZT, "checked"); |
||||
|
||||
crbbkdydao.setColumnValue("样本来源", sc_crb_yblydao.getDicValue(crb_infodao_bypkey.getColumnValueAsString("HIV_YBLY"))); |
||||
crbbkdydao.setColumnValue("样本来源其它", crb_infodao_bypkey.getColumnValue("HIV_YBLYQT")); |
||||
crbbkdydao.setColumnValue("最有可能感染途径", sc_crb_grtjdao.getDicValue(crb_infodao_bypkey.getColumnValueAsString("ZYKNGRTJ"))); |
||||
crbbkdydao.setColumnValue("感染途径其它", crb_infodao_bypkey.getColumnValue("GRTJQT")); |
||||
|
||||
String JCS_DP=crb_infodao_bypkey.getColumnValueAsString("JCS_DP"); |
||||
String JSC_SX=crb_infodao_bypkey.getColumnValueAsString("JSC_SX"); |
||||
String JSC_QT=crb_infodao_bypkey.getColumnValueAsString("JSC_QT"); |
||||
String JSC_XJCS=crb_infodao_bypkey.getColumnValueAsString("JSC_XJCS"); |
||||
String JSC_MQYX=crb_infodao_bypkey.getColumnValueAsString("JSC_MQYX"); |
||||
String JSC_FSY=crb_infodao_bypkey.getColumnValueAsString("JSC_FSY"); |
||||
String JSC_PO=crb_infodao_bypkey.getColumnValueAsString("JSC_PO"); |
||||
String JSC_ZYBLS=crb_infodao_bypkey.getColumnValueAsString("JSC_ZYBLS"); |
||||
String JSC_SY=crb_infodao_bypkey.getColumnValueAsString("JSC_SY"); |
||||
String JSC_NN=crb_infodao_bypkey.getColumnValueAsString("JSC_NN"); |
||||
String JSC_SSS=crb_infodao_bypkey.getColumnValueAsString("JSC_SSS"); |
||||
String JSC_XXS=crb_infodao_bypkey.getColumnValueAsString("JSC_XXS"); |
||||
String JSC_BX=crb_infodao_bypkey.getColumnValueAsString("JSC_BX"); |
||||
|
||||
crbbkdydao.setColumnValue("注射毒品史", "1".equals(JCS_DP)?"checked":""); |
||||
crbbkdydao.setColumnValue("与患者共用过注射器的人数", crb_infodao_bypkey.getColumnValue("JCS_DPZSRS")); |
||||
crbbkdydao.setColumnValue("输血血制品史", "1".equals(JSC_SX)?"checked":""); |
||||
crbbkdydao.setColumnValue("其他", "1".equals(JSC_QT)?"checked":""); |
||||
crbbkdydao.setColumnValue("非婚异性性接触史", "1".equals(JSC_XJCS)?"checked":""); |
||||
crbbkdydao.setColumnValue("人有过非婚性行为", crb_infodao_bypkey.getColumnValue("JSC_XJCSRS")); |
||||
crbbkdydao.setColumnValue("母亲阳性", "1".equals(JSC_MQYX)?"checked":""); |
||||
crbbkdydao.setColumnValue("非商业", "1".equals(JSC_FSY)?"checked":""); |
||||
crbbkdydao.setColumnValue("配偶固定性伴阳性", "1".equals(JSC_PO)?"checked":""); |
||||
crbbkdydao.setColumnValue("职业暴露史", "1".equals(JSC_ZYBLS)?"checked":""); |
||||
crbbkdydao.setColumnValue("商业", "1".equals(JSC_SY)?"checked":""); |
||||
crbbkdydao.setColumnValue("男男性行为史", "1".equals(JSC_NN)?"checked":""); |
||||
crbbkdydao.setColumnValue("人有过同性性行为", crb_infodao_bypkey.getColumnValue("JSC_NNRS")); |
||||
crbbkdydao.setColumnValue("手术史", "1".equals(JSC_SSS)?"checked":""); |
||||
crbbkdydao.setColumnValue("献血浆史", "1".equals(JSC_XXS)?"checked":""); |
||||
crbbkdydao.setColumnValue("不详", "1".equals(JSC_BX)?"checked":""); |
||||
|
||||
|
||||
|
||||
crbbkdydao.setColumnValue("接触史其他", crb_infodao_bypkey.getColumnValue("JSC_QTNR")); |
||||
crbbkdydao.setColumnValue("艾滋病诊断日期", Delphi.format(crb_infodao_bypkey.getColumnValueAsLong("FBRQ"), "yyyy-MM-dd")); |
||||
|
||||
String SYSJCJL=crb_infodao_bypkey.getColumnValueAsString("SYSJCJL"); |
||||
crbbkdydao.setColumnValue("实验室检测结论"+SYSJCJL, "checked"); |
||||
crbbkdydao.setColumnValue("检测阳性日期", Delphi.format(crb_infodao_bypkey.getColumnValueAsLong("HIV_JCYXRQ"), "yyyy-MM-dd")); |
||||
crbbkdydao.setColumnValue("检测单位", crb_infodao_bypkey.getColumnValue("HIV_JCDW")); |
||||
String XBS=crb_infodao_bypkey.getColumnValueAsString("XBS"); |
||||
crbbkdydao.setColumnValue("性病史"+XBS, "checked"); |
||||
String SZDSYYYTGR=crb_infodao_bypkey.getColumnValueAsString("SZDSYYYTGR"); |
||||
crbbkdydao.setColumnValue("生殖道沙眼衣原体感染"+SZDSYYYTGR, "checked"); |
||||
String SZK_ZZHZ=crb_infodao_bypkey.getColumnValueAsString("SZK_ZZHZ"); |
||||
crbbkdydao.setColumnValue("重症患者"+SZK_ZZHZ, "checked"); |
||||
String SZK_SYSJG=crb_infodao_bypkey.getColumnValueAsString("SZK_SYSJG"); |
||||
crbbkdydao.setColumnValue("实验室结果"+SZK_SYSJG, "checked"); |
||||
String HB_YXSJ=crb_infodao_bypkey.getColumnValueAsString("HB_YXSJ"); |
||||
crbbkdydao.setColumnValue("乙肝HBsAg阳性时间"+HB_YXSJ, "checked"); |
||||
crbbkdydao.setColumnValue("首次出现乙肝症状和体征时间", Delphi.format(crb_infodao_bypkey.getColumnValueAsLong("HB_SCSJ"), "yyyy-MM-dd")); |
||||
|
||||
String HB_SCSJCHECK=crb_infodao_bypkey.getColumnValueAsString("HB_SCSJCHECK"); |
||||
crbbkdydao.setColumnValue("首次出现乙肝症状和体征时间不详", "Y".equals(HB_SCSJCHECK)?"checked":""); |
||||
|
||||
|
||||
crbbkdydao.setColumnValue("乙肝本次ALT", crb_infodao_bypkey.getColumnValue("HB_ALT")); |
||||
String HB_1000=crb_infodao_bypkey.getColumnValueAsString("HB_1000"); |
||||
crbbkdydao.setColumnValue("抗检测结果"+HB_1000, "checked"); |
||||
String HB_GCJCJG=crb_infodao_bypkey.getColumnValueAsString("HB_GCJCJG"); |
||||
crbbkdydao.setColumnValue("肝穿检测结果"+HB_GCJCJG, "checked"); |
||||
String HB_SAG=crb_infodao_bypkey.getColumnValueAsString("HB_SAG"); |
||||
crbbkdydao.setColumnValue("恢复期血清"+HB_SAG, "checked"); |
||||
crbbkdydao.setColumnValue("检验结果", crb_infodao_bypkey.getColumnValue("MD_JCJG")); |
||||
crbbkdydao.setColumnValue("诊疗史", crb_infodao_bypkey.getColumnValue("MD_ZLS")); |
||||
crbbkdydao.setColumnValue("特征性临床表现", crb_infodao_bypkey.getColumnValue("MD_LCBX")); |
||||
crbbkdydao.setColumnValue("报告科室", crb_infodao_bypkey.getColumnValue("MDBGKS")); |
||||
crbbkdydao.setColumnValue("报告单位编码", crb_infodao_bypkey.getColumnValue("BGDWBM")); |
||||
crbbkdydao.setColumnValue("填卡医生", crb_infodao_bypkey.getColumnValue("TKYS")); |
||||
crbbkdydao.setColumnValue("报告单位名称", crb_infodao_bypkey.getColumnValue("BGDWMC")); |
||||
crbbkdydao.setColumnValue("报告日期", Delphi.format(crb_infodao_bypkey.getColumnValueAsLong("BGRQ"), "yyyy-MM-dd")); |
||||
crbbkdydao.setColumnValue("联系电话", crb_infodao_bypkey.getColumnValue("BGDWLXDH")); |
||||
|
||||
|
||||
|
||||
|
||||
String columnDaoStr = reportTemplateDao.getColumnValueAsString("BBLDAO"); |
||||
String tableDaoStr = reportTemplateDao.getColumnValueAsString("BBSJDAO"); |
||||
|
||||
DxNormalDataManager tabledao = DaoCreator.getNormalDao(tableDaoStr); |
||||
tabledao.reload(); |
||||
|
||||
DxNormalDataManager columnDao = DaoCreator.getNormalDao(columnDaoStr);//内容
|
||||
columnDao.reload(); |
||||
columnDao.absoluteInSert(); |
||||
columnDao.copyRow(crbbkdydao); |
||||
|
||||
DxEMRShow emrshow = pform.getPrintEmrShow(); |
||||
emrshow.setUseFileServer(true); |
||||
emrshow.setEmrPath(reportTemplateDao.getColumnValueAsString("MBLJ")); |
||||
|
||||
ReportPrintModel model = new ReportPrintModel(); |
||||
model.setEmrshow(emrshow); |
||||
model.setCompanyid(MainUtil.getCurCompanyID()); |
||||
model.setReportno(type); |
||||
model.setForm(form); |
||||
model.addMaindao(columnDao); |
||||
model.addRecorddao(tabledao); |
||||
model.setPrintflag(PrintFlag.Preview); |
||||
model.setHasPageNum(false); |
||||
model.setPrinterType("传染病报卡"); |
||||
ReportPrintFactory.processPrint(model); |
||||
} |
||||
return srtn; |
||||
} |
||||
} |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue