Ejemplo n.º 1
0
 /** 获取已有用药 */
 public void getMedicine() {
   Map<String, String> params = new WeakHashMap<>();
   params.put("MedicalRecordID", SysApplication.getInstance().getMedicalRecord().getId());
   params.put("flg", "2");
   new MutiFetcher(IllnessSubmit[].class)
       .fetch(getActivity(), "GetMedicalRecordCure3", null, params);
 }
Ejemplo n.º 2
0
 /** 更新下次随访时间 */
 private void updateNextDate() {
   MedicalRecord medicalRecord = SysApplication.getInstance().getMedicalRecord();
   medicalRecord.setNextDate(btnTellMedicalNextDate.getText().toString()); // 开始时间
   medicalRecord.setNextEndDate(btnTellMedicalNextDate.getText().toString()); // 结束时间
   medicalRecord.setUSERREALNAME(null);
   new SingleFetcher(String.class).updateMedicalRecord(getActivity(), "正在提交...", medicalRecord);
 }
Ejemplo n.º 3
0
  @Override
  public void lazyLoad() {
    // 获取所有疾病大类
    Map<String, String> params = new WeakHashMap<>();
    //        params.put("IllnessID", illnessid);
    new MutiFetcher(IllnessInfo[].class)
        .fetch(getActivity(), "GetMedicineMaxTypeNew", null, params);

    // 获取饮食处方分类
    params = new WeakHashMap<>();
    new MutiFetcher(LifeGuiding[].class).fetch(getActivity(), "GetLifeGuiding1", null, params);

    // 获取运动处方分类
    params = new WeakHashMap<>();
    new MutiFetcher(LifeGuiding[].class).fetch(getActivity(), "GetLifeGuiding2", null, params);

    if (position == 2) { // 编辑
      // 获取已有用药
      getMedicine();
      getChuFang1();
      getChuFang2();
      btnTellMedicalNextDate.setText(
          CommonUtil.parseForminnerStr(
              SysApplication.getInstance().getMedicalRecord().getNextDate()));
    }
  }
Ejemplo n.º 4
0
 /** 添加一条处方信息 */
 private void addNewChuFang() {
   if (spinnerTellMedical10.getSelectedItemId() != 0) {
     LifeGuiding_Submit guiding = new LifeGuiding_Submit();
     guiding.setId(CommonUtil.generateGUID());
     guiding.setMedicalRecordID(SysApplication.getInstance().getMedicalRecord().getId());
     guiding.setLifeGuidingID(((LifeGuiding) spinnerTellMedical10.getSelectedItem()).getId());
     new SingleFetcher(String.class)
         .addMedicalRecord_lifeguiding(getActivity(), "正在提交...", guiding);
   }
   if (spinnerTellMedical11.getSelectedItemId() != 0) {
     LifeGuiding_Submit guiding = new LifeGuiding_Submit();
     guiding.setId(CommonUtil.generateGUID());
     guiding.setMedicalRecordID(SysApplication.getInstance().getMedicalRecord().getId());
     guiding.setLifeGuidingID(((LifeGuiding) spinnerTellMedical11.getSelectedItem()).getId());
     new SingleFetcher(String.class)
         .addMedicalRecord_lifeguiding(getActivity(), "正在提交...", guiding);
   }
 }
Ejemplo n.º 5
0
 /** 添加一条用药记录 */
 private void addNewMedicine() {
   if (!TextUtils.isEmpty(etTellMedical4.getText().toString())
       && !TextUtils.isEmpty(tvTellMedical8.getText().toString())) {
     IllnessSubmit illnessSubmit = new IllnessSubmit();
     illnessSubmit.setId(CommonUtil.generateGUID());
     illnessSubmit.setFlg("2");
     illnessSubmit.setMTypeParentID(((IllnessInfo) spinnerTellMedical1.getSelectedItem()).getId());
     illnessSubmit.setMTypeID(((IllnessInfo) spinnerTellMedical2.getSelectedItem()).getId());
     illnessSubmit.setMTTradeID(((IllnessInfo) spinnerTellMedical3.getSelectedItem()).getId());
     illnessSubmit.setMedicalRecordID(SysApplication.getInstance().getMedicalRecord().getId());
     // 加上了单位
     illnessSubmit.setDosage(
         etTellMedical4.getText().toString() + tvTellMedical5.getText().toString());
     // 缺少规格*盒数
     illnessSubmit.setBox(
         tvTellMedical8.getText().toString() + etTellMedical9.getText().toString());
     illnessSubmit.setTimesaDay(spinnerTellMedical6.getSelectedItem().toString());
     illnessSubmit.setWay(spinnerTellMedical7.getSelectedItem().toString());
     new SingleFetcher(String.class)
         .addMedicalRecord_cure(getActivity(), "正在提交...", illnessSubmit);
   }
 }
Ejemplo n.º 6
0
 /** 获取已有运动处方 */
 public void getChuFang2() {
   Map<String, String> params = new WeakHashMap<>();
   params.put("MedicalRecordID", SysApplication.getInstance().getMedicalRecord().getId());
   new MutiFetcher(LifeGuiding[].class)
       .fetch(getActivity(), "GetMedicalRecordLifeGuiding2", null, params);
 }