提交 418abcc1 编写于 作者: wangxinxu's avatar wangxinxu

获取成员信息

上级 6710a085
流水线 #52951 已取消 于阶段
......@@ -24,6 +24,9 @@ public interface PatHealthPackClient {
@GetMapping(value = "/account/pat-health/directPatIds/{patientId}")
PicaResponse<List<Integer>> getDirectPatIdsByPatId(@PathVariable("patientId") Integer patientId);
@GetMapping(value = "/account/pat-health/directPatIds/unionId")
PicaResponse<List<Integer>> getDirectPatIdsByUnionId(@RequestParam("unionId") String unionId);
@GetMapping(value = "/account/pat-health/familyPats/{acctId}/containAcct/{containAcct}")
PicaResponse<PatFamilyResp> getFamilyPatsByAcctId(@PathVariable("acctId") Integer acctId, @PathVariable("containAcct") Integer containAcct);
......
......@@ -56,6 +56,12 @@ public class PatHealthPackController {
return PicaResponse.toResponse(packService.getDirectPatIdsByPatId(patientId));
}
@ApiOperation("所在家庭组的监护人 + 同级家庭成员 + 下级所有成员 patientId list,去除自身、去重;")
@GetMapping(value = "/directPatIds/unionId")
public PicaResponse<List<Integer>> getDirectPatIdsByUnionId(@RequestParam("unionId") String unionId) throws Exception {
return PicaResponse.toResponse(packService.getDirectPatIdsByUnionId(unionId));
}
@ApiOperation("根据accid获取自身家庭成员List;containAcct:0 包含自身 1 不包含自身")
@GetMapping(value = "/familyPats/{acctId}/containAcct/{containAcct}")
public PicaResponse<PatFamilyResp> getFamilyPatsByAcctId(@PathVariable("acctId") Integer acctId, @PathVariable("containAcct") Integer containAcct) throws Exception {
......
......@@ -50,4 +50,6 @@ public interface AcctPatFamilyMapper {
AcctSelfPatInfoResp getAcctInfoByPatIdSelf(Integer patId);
AcctSelfPatInfoResp getAcctInfoByUnionId(String unionId);
List<Integer> getPatIdsByUnionId(String unionId);
}
\ No newline at end of file
......@@ -25,6 +25,8 @@ public interface PatHealthPackService {
List<Integer> getDirectPatIdsByPatId(Integer patientId);
List<Integer> getDirectPatIdsByUnionId(String unionId);
PatFamilyResp getFamilyPatsByAcctId(Integer acctId,Integer containAcct);
Integer saveAcct(AcctPatInfoReq patInfoReq);
......
......@@ -154,6 +154,11 @@ public class PatHealthPackServiceIml implements PatHealthPackService {
return rtnPatIds;
}
@Override
public List<Integer> getDirectPatIdsByUnionId(String unionId) {
return patFamilyMapper.getPatIdsByUnionId(unionId);
}
/**
* @Description TODO
* @Author peijun.zhao
......
......@@ -294,4 +294,14 @@
and pf.acct_id = api.id
and api.delete_flag = 1
</select>
<select id="getPatIdsByUnionId" parameterType="java.lang.String" resultType="java.lang.Integer" >
select
distinct pf.patient_id as patientId
from account_pat_family pf, account_pat_union pu
where pu.union_id = #{unionId} and pu.union_type = 1
and pu.delete_flag = 1
and pf.delete_flag = 1
and pu.acct_id = pf.acct_id
</select>
</mapper>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册