Examples of PatientModel


Examples of open.dolphin.infomodel.PatientModel

                summary.setSampleTime(module.getSampleTime());
                summary.setReportTime(module.getReportTime());
                summary.setLaboratoryCenter(module.getLaboratoryCenter());
                summary.setReportStatus(module.getReportStatus());
               
                PatientModel reply = laboDelegater.putLaboModule(module);
               
                if (laboDelegater.isNoError()) {
                    summary.setPatient(reply);
                    summary.setResult("成功");
                    logger.info("LaboModuleを登録しました。患者ID :" + module.getPatientId());
View Full Code Here

Examples of open.dolphin.infomodel.PatientModel

    /**
     * メニューを制御する
     */
    private void controlMenu() {
       
        PatientModel pvt = getSelectedLabo() != null
                         ? getSelectedLabo().getPatient()
                         : null;
       
        boolean enabled = canOpen(pvt);
        getContext().enabledAction(GUIConst.ACTION_OPEN_KARTE, enabled);
View Full Code Here

Examples of open.dolphin.infomodel.PatientModel

     * popupMenu で選択した場合はこれが呼ばれる 複数行選択対応
     * openKarte(patient) abstract に移動
     * by pns
     */
    public void openKarte() {
        PatientModel patient[] = getSelectedPatinet();
        if (patient == null) return;

        for (int i=0; i < patient.length; i++) {
            openKarte(patient[i]);
        }
View Full Code Here

Examples of open.dolphin.infomodel.PatientModel

//pns   JAVA 6 で sorter は標準装備になったので TableSorter の組込はやめた
        ObjectReflectTableModel model = (ObjectReflectTableModel) getModel();
        //ObjectReflectTableSorter model = (ObjectReflectTableSorter) getModel();

        int row = rowAtPoint(e.getPoint());
        PatientModel pvt = (PatientModel) model.getObject(row);
        return pvt != null ? pvt.contactAddress() : null;
    }
View Full Code Here

Examples of open.dolphin.infomodel.PatientModel

     * 患者情報を更新する。
     */
    @Override
    public void save() {
       
        final PatientModel update = getContext().getPatient();
        final PatientDelegater pdl = new PatientDelegater();
       
        DBTask task = new DBTask<Void>(getContext()) {
           
            @Override
View Full Code Here

Examples of open.dolphin.infomodel.PatientModel

    private JComponent createComponent() {
       
        //
        // 患者モデルを取得する
        //
        PatientModel patient = getContext().getPatient();
        Collection<PVTHealthInsuranceModel> insList = patient.getPvtHealthInsurances();
       
        //
        // 患者情報テーブルを生成する
        //
        pModel = new PatientInfoTableModel(patient, PATIENT_ATTRS, COLUMN_NAMES);
View Full Code Here

Examples of open.dolphin.infomodel.PatientModel

        // MMLファイルをパースした結果が登録される
        // 施設IDはコンテキストから取得する
        String facilityId = this.getCallersFacilityId(ctx);

        // 施設IDと LaboModule の患者IDで 患者を取得する
        PatientModel exist = (PatientModel) em
                .createQuery("from PatientModel p where p.facilityId = :fid and p.patientId = :pid")
                .setParameter("fid", facilityId)
                .setParameter("pid", laboModuleValue.getPatientId())
                .getSingleResult();

        // 患者のカルテを取得する
        KarteBean karte = (KarteBean) em.createQuery("from KarteBean k where k.patient.id = :pk")
        .setParameter("pk", exist.getId())
        .getSingleResult();

        // laboModuleとカルテの関係を設定する
        laboModuleValue.setKarte(karte);
View Full Code Here

Examples of open.dolphin.infomodel.PatientModel

                   
                    // execute search
                    List<DocumentModel> result = persistenceQuery.getResultList();

                    for (DocumentModel dm : result) {
                        PatientModel pm = dm.getKarte().getPatient();
                        if (!ret.contains(pm)) {
                            ret.add(pm);
                        }
                    }

                } catch (ParseException e) {
                    logger.info(e.getMessage(), e.getCause());
                }
                break;
        }
       
        if (! ret.isEmpty()) {
            // pvt をまとめて取得する(高速化のため)
            List<PatientVisitModel> pvts = em.createQuery("from PatientVisitModel p "
                            + "where p.facilityId = :fid and p.status != :status and (p.patient in (:pts)) order by p.pvtDate desc")
                    .setParameter("fid", fid)
                    .setParameter("pts", ret)
                    .setParameter("status", KarteState.CANCEL_PVT)
                    .getResultList();

            // まとめて取った pvt から最新の日付を PatientModel にセット
            for (PatientModel pm : ret) {
                for (PatientVisitModel pvt : pvts) {
                    // 最初にマッチした pvt が最新 (last visit)
                    if (pm.getId() == pvt.getPatient().getId()) {
                        pm.setLastVisit(pvt.getPvtDate());
                        break;
                    }
                }
            }
        }
View Full Code Here

Examples of open.dolphin.infomodel.PatientModel

    public PatientModel getPatient(String patientId) {
       
        String facilityId = getCallersFacilityId(ctx);
       
        // 患者レコードは FacilityId と patientId で複合キーになっている
        PatientModel bean
                = (PatientModel)em.createQuery("from PatientModel p where p.facilityId = :fid and p.patientId = :pid")
                .setParameter("fid", facilityId)
                .setParameter("pid", patientId)
                .getSingleResult();
       
        long pk = bean.getId();
       
        // Lazy Fetch の 基本属性を検索する
        // 患者の健康保険を取得する
        Collection insurances
                = em.createQuery("from HealthInsuranceModel h where h.patient.id = :pk")
                .setParameter("pk", pk).getResultList();
        bean.setHealthInsurances(insurances);
       
        return bean;
    }
View Full Code Here

Examples of open.dolphin.infomodel.PatientModel

     */
    @Override
    @PermitAll // MBean からの呼び出し対応
    public int addPvt(PatientVisitModel pvt) {

        PatientModel patient = pvt.getPatient();
       
        String facilityId = DEFAULT_FACILITY_OID;
       
        // MBean からの呼び出しの場合は ctx.getCallerPrincipal().getName() が "anonymous" を返す
        String callerId = ctx.getCallerPrincipal().getName();               
        if (callerId.contains(IInfoModel.COMPOSITE_KEY_MAKER)) {
            // 施設IDを認証にパスしたユーザがある場合は facilityId を更新する
            facilityId = getCallersFacilityId(ctx);
        }
        pvt.setFacilityId(facilityId);
        patient.setFacilityId(facilityId);
       
        PatientModel exist = null;
        // 既存の患者かどうか調べる
        try {
            exist = (PatientModel) em
                    .createQuery("from PatientModel p where p.facilityId = :fid and p.patientId = :pid")
                    .setParameter("fid", facilityId)
                    .setParameter("pid", patient.getPatientId())
                    .getSingleResult();           
            //
            // 健康保険情報を更新する
            //
            Collection<HealthInsuranceModel> ins = patient.getHealthInsurances();
            if (ins != null && ins.size() > 0) {
           
                // 健康保険を更新する
                Collection old = em.createQuery("from HealthInsuranceModel h where h.patient.id = :pk")
                .setParameter("pk", exist.getId())
                .getResultList();

                // 現在の保険情報を削除する
                for (Iterator iter = old.iterator(); iter.hasNext(); ) {
                    HealthInsuranceModel model = (HealthInsuranceModel) iter.next();
                    em.remove(model);
                }

                // 新しい健康保険情報を登録する
                Collection<HealthInsuranceModel> newOne = patient.getHealthInsurances();
                for (HealthInsuranceModel model : newOne) {
                    model.setPatient(exist);
                    em.persist(model);
                }
            }
           
            // 名前を更新する 2007-04-12
            exist.setFamilyName(patient.getFamilyName());
            exist.setGivenName(patient.getGivenName());
            exist.setFullName(patient.getFullName());
            exist.setKanaFamilyName(patient.getKanaFamilyName());
            exist.setKanaGivenName(patient.getKanaGivenName());
            exist.setKanaName(patient.getKanaName());
            exist.setRomanFamilyName(patient.getRomanFamilyName());
            exist.setRomanGivenName(patient.getRomanGivenName());
            exist.setRomanName(patient.getRomanName());
           
            // 性別
            exist.setGender(patient.getGender());
            exist.setGenderDesc(patient.getGenderDesc());
            exist.setGenderCodeSys(patient.getGenderCodeSys());
           
            // Birthday
            exist.setBirthday(patient.getBirthday());
           
            // 住所、電話を更新する
            exist.setAddress(patient.getAddress());
            exist.setTelephone(patient.getTelephone());
            //exist.setMobilePhone(patient.getMobilePhone());
           
            // PatientVisit との関係を設定する
            pvt.setPatient(exist);
           
            // トータルの病名数をセット
            pvt.setByomeiCount(getByomeiCount(exist.getId()));

            // 今日の病名数をセット
            pvt.setByomeiCountToday(getByomeiCountToday(exist.getId()));
           
        } catch (NoResultException e) {
            // 新規患者であれば登録する
            // 患者属性は cascade=PERSIST で自動的に保存される
            em.persist(patient);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.