|
@@ -416,7 +416,31 @@ public class IsvMedicCardServiceImpl implements IsvMedicCardService {
|
|
@Override
|
|
@Override
|
|
public QueryPatientDetailResponse querySinglePatient(QueryPatientDetailRequest request) throws Exception {
|
|
public QueryPatientDetailResponse querySinglePatient(QueryPatientDetailRequest request) throws Exception {
|
|
String id = request.getId(); // 对应 medicalCard 的 id
|
|
String id = request.getId(); // 对应 medicalCard 的 id
|
|
- return null;
|
|
|
|
|
|
+ int userId = ContextHelper.getCurrentUserIdWrapped();
|
|
|
|
+ int hospitalId = BizUtil.getCurrentHospitalId();
|
|
|
|
+ MedicalCard c = getUserMedCardList(userId, hospitalId).stream()
|
|
|
|
+ .filter(i -> i.getCardId() == Checker.parseInt(id))
|
|
|
|
+ .findFirst()
|
|
|
|
+ .orElse(null);
|
|
|
|
+ if (c == null) throw new AppMessageException("找不到诊疗卡信息");
|
|
|
|
+ QueryPatientDetailResponse r = new QueryPatientDetailResponse();
|
|
|
|
+ List<MedicCard> medicCards = new ArrayList<>();
|
|
|
|
+ r.setId(String.valueOf(c.getCardId()));
|
|
|
|
+ r.setName(c.getPatientName());
|
|
|
|
+ r.setAge(getAgeFromMedicalCard(c));
|
|
|
|
+ r.setSex(SexEnum.getSexDisplayName(c.getSex()));
|
|
|
|
+ r.setPhoneNumber(BizUtil.masked(c.getMobile()));
|
|
|
|
+ r.setBirthDay(c.getBirthday());
|
|
|
|
+ r.setIdCardNo(BizUtil.masked(c.getIdNo()));
|
|
|
|
+ r.setRelationShip(RelationshipEnum.valueOf(c.getRelationship()).getDisplayName());
|
|
|
|
+ r.setBindCardNum(c.getCardNo());
|
|
|
|
+ MedicCard card = new MedicCard();
|
|
|
|
+ card.setCardNum(c.getCardNo());
|
|
|
|
+ card.setType(CARD_TYPE_NORMAL);
|
|
|
|
+ card.setBalance(String.valueOf(c.getBalance() / 100d));
|
|
|
|
+ medicCards.add(card);
|
|
|
|
+ r.setMedicCards(medicCards);
|
|
|
|
+ return r;
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|