|
@ -2362,6 +2362,86 @@ public class FamilyContractService extends BaseService {
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 根据会话信息拉取对应的人员信息
|
|
|
* @param sessionId
|
|
|
* @return
|
|
|
*/
|
|
|
public JSONObject getTeamDoctors(String sessionId,String doctor){
|
|
|
String infos[] = sessionId.split("_");
|
|
|
String patient = infos[0];
|
|
|
JSONObject result = new JSONObject();
|
|
|
Map<String, JSONObject> docMap = new HashMap<>();
|
|
|
SignFamily ssSign = signFamilyDao.findSignByPatient(patient, 1);
|
|
|
SignFamily jtSign = null;
|
|
|
if(checkPatient(patient)!=null){
|
|
|
jtSign = signFamilyDao.findSignByPatient(patient, 2);
|
|
|
}else{
|
|
|
jtSign = signFamilyDao.findByTeamCode(infos[1]);
|
|
|
}
|
|
|
if (ssSign != null) {
|
|
|
DoctorTeamMember member = doctorTeamDoctor.findSanshiByTeamAndType(ssSign.getTeamCode(), 1);
|
|
|
if (member != null) {
|
|
|
Doctor doc = doctorDao.findByCode(member.getMemberCode());
|
|
|
JSONObject json = new JSONObject(doc);
|
|
|
if (json.has("password")) {
|
|
|
json.remove("password");
|
|
|
}
|
|
|
if (json.has("salt")) {
|
|
|
json.remove("salt");
|
|
|
}
|
|
|
result.put("dutyDoctor", json);
|
|
|
} else {
|
|
|
result.put("dutyDoctor", "");
|
|
|
}
|
|
|
List<Doctor> doctors = adminTeamService.getMembers(ssSign.getAdminTeamId());
|
|
|
|
|
|
if (doctors != null) {
|
|
|
for (Doctor doc : doctors) {
|
|
|
if (doc.getCode().equals(doctor)) {
|
|
|
continue;
|
|
|
}
|
|
|
JSONObject json = new JSONObject(doc);
|
|
|
if (json.has("password")) {
|
|
|
json.remove("password");
|
|
|
}
|
|
|
if (json.has("salt")) {
|
|
|
json.remove("salt");
|
|
|
}
|
|
|
docMap.put(doc.getCode(), json);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
if (jtSign != null) {
|
|
|
List<Doctor> doctors = adminTeamService.getMembers(jtSign.getAdminTeamId());
|
|
|
if (doctors != null) {
|
|
|
for (Doctor doc : doctors) {
|
|
|
if (doc.getCode().equals(doctor)) {
|
|
|
continue;
|
|
|
}
|
|
|
JSONObject json = new JSONObject(doc);
|
|
|
if (json.has("password")) {
|
|
|
json.remove("password");
|
|
|
}
|
|
|
if (json.has("salt")) {
|
|
|
json.remove("salt");
|
|
|
}
|
|
|
docMap.put(doc.getCode(), json);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if (docMap.size() > 0) {
|
|
|
result.put("teamDoctors", new JSONArray(docMap.values()));
|
|
|
} else {
|
|
|
result.put("teamDoctors", new JSONArray());
|
|
|
}
|
|
|
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 查询患者对应医生
|
|
|
*
|