医疗索偿
# 医疗计划类型
# 获取医疗计划类型列表
# 接口描述
用于获取医疗计划类型列表
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/search/search HTTP 请求方式 GET 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID stSearch String
(Query)Y Lookup Type. 可在 UDF Lookup 中找到。
(Eg:medPlanType
......)formatId long
(Query)N Lookup Query 中的格式 ID
(若未指定该参数,则使用默认格式)startRow int
(Query)N 返回结果的开始行 endRow int
(Query)N 返回结果的结束行 quickSearchStr String
(Query)N 设定关键字查找数据 请求示例
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&stSearch=").append("medPlanType"); paramStrBuilder.append("&startRow=").append(0); paramStrBuilder.append("&endRow=").append(10); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
返回示例
{ "stSearch": "medPlanType", "size": 1, "stSearchDisplay": "医疗计划类型", "values": [ { "code": "CW10 test", "desc__lang": "", "status": "Y", "iRev": 4, "lastModifyDate": "2020-03-23 18:25:41", "medPlanType.lastModifyUid.simpleUser.desc__lang": "admin", "id": 27, "st_desc": "CW10 test", "st_id": 27, "st_code": "CW10 test" } ] }
# 新增医疗计划类型
# 接口描述
用于新增医疗计划类型
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/root/api/save/medPlanType HTTP 请求方式 PUT 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID menuCode String
(Query)Y 可在 Data Dictionary 中找到
Eg:medPlanType
entity String
(Body)Y JSON (可参考请求示例中的相关参数) 请求示例
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/medPlanType"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("medPlanType"); HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString()); put.addHeader("authorization", access_token); put.addHeader("client_id", ClientID); StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON); entity.setContentEncoding("UTF-8"); put.setEntity(entity); res = client.execute(put); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); if (json != null) { recordId = json.getLongValue("recordId"); } System.out.println(json); } put.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
其中 Entity 的 JSON 格式如下:
{ "medplantype": { "values": [ { "code": "test001", "desc": "test001" } ] } }
返回示例
{ "recordId": 29, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "编号重复(medplantype.code)", "msgCode": "core_101903" } ], "status": false }
# 读取医疗计划类型
# 接口描述
根据 ID 读取医疗计划类型详情
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/root/api/read/medPlanType HTTP 请求方式 GET 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID menuCode String
(Query)Y 可在 Data Dictionary 中找到
Eg:medPlanType
id long
(Query)Y 医疗计划类型 ID,可参考获取医疗计划类型列表返回的 ID iRev long
(Query)N 版本号,用于读取历史记录 / 已删除的记录 请求示例
JSONObject json = null; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/medPlanType"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("medPlanType"); paramStrBuilder.append("&id=").append(id); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
返回示例
{ "data": { "medplantype": [ { "attachmentNo": 0, "lastModifyUid": 2894, "code": "jerry08", "useAccess": true, "expiredDate": -2209017600000, "iRev": 1, "sysJson": "", "viewCode": "medPlanType", "beId": 0, "expired": false, "printCount": 0, "useAccessBl": true, "udfjerry001": "", "id": 12, "statusModifyDate": 1537937535000, "locked": false, "desc_en": "医疗计划类型08", "lastModifyDate": 1537937535000, "createUid": 2894, "createDate": 1537937535000, "desc_zh-CN": "", "desc_pl": "", "lastApproveUid": 0, "desc_udfcn": "", "expiredUid": 0, "useAccessWl": false, "i18nField": "{\"desc_en\": \"医疗计划类型08\"}", "desc_zh-TW": "", "useAccessAutoCalc": false, "status": "N", "desc": "医疗计划类型08" } ] }, "messages": [], "status": true }
{ "data": {}, "messages": [ { "msgDetail": "找不到相关记录,记录可能已被删除或你没有访问权限", "msgCode": "core_141019" } ], "status": false }
# 保存医疗计划类型
# 接口描述
用于保存医疗计划类型
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/root/api/save/medPlanType HTTP 请求方式 PUT 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID menuCode String
(Query)Y 可在 Data Dictionary 中找到
Eg:medPlanType
entity String
(Body)Y JSON (可参考请求示例中的相关参数) 请求示例
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/medPlanType"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("medPlanType"); HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString()); put.addHeader("authorization", access_token); put.addHeader("client_id", ClientID); StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON); entity.setContentEncoding("UTF-8"); put.setEntity(entity); res = client.execute(put); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); if (json != null) { recordId = json.getLongValue("recordId"); } System.out.println(json); } put.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
其中 Entity 的 JSON 格式如下:
{ "medplantype": { "values": [ { "id": 18 } ] } }
返回示例
{ "recordId": 18, "messages": [], "status": true }
# 删除医疗计划类型
# 接口描述
用于删除指定 ID 的医疗计划类型
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/root/api/delete/medPlanType HTTP 请求方式 DELETE 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID menuCode String
(Query)Y 可在 Data Dictionary 中找到
Eg:medPlanType
id long
(Query)Y 医疗计划类型 ID,可参考获取医疗计划类型列表返回的 ID 请求示例
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/medPlanType"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("medPlanType"); paramStrBuilder.append("&id=").append(id); HttpDelete delete = new HttpDelete(url + "?" + paramStrBuilder.toString()); delete.addHeader("authorization", access_token); delete.addHeader("client_id", ClientID); res = client.execute(delete); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } delete.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
返回示例
{ "messages": [], "status": true }
{ "messages": [ { "msgDetail": "单据已被删除", "msgCode": "core_101017" } ], "status": false }
# 医疗计划
# 获取医疗计划单据列表
# 接口描述
用于获取医疗计划单据列表
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/search/search HTTP 请求方式 GET 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID stSearch String
(Query)Y Lookup Type. 可在 UDF Lookup 中找到。
(Eg:medicalPlan
......)formatId long
(Query)N Lookup Query 中的格式 ID
(若未指定该参数,则使用默认格式)startRow int
(Query)N 返回结果的开始行 endRow int
(Query)N 返回结果的结束行 quickSearchStr String
(Query)N 设定关键字查找数据 请求示例
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&stSearch=").append("medicalPlan"); paramStrBuilder.append("&startRow=").append(0); paramStrBuilder.append("&endRow=").append(10); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
返回示例
{ "stSearch": "medicalPlan", "size": 10, "stSearchDisplay": "医疗计划", "values": [ { "code": "A001", "desc":"医疗报销计划", "medPlanType":1 "dependentAllow":1 "planPeriod":1 "planPeriodUnit":"year" "planPeriodStartOn":"udf" "planPeriodSpecDate":"joinDate" "startmonth":0 "startday":0 "planStartAt":cur "seniRequired":0 "seniCriteriaNum":0 "seniCriteriaCombo":"year" "probaPassReq":1 "prorata":1 "roundingCombo":"no" "roundingNum":0.0001 "maxCasePerCycle":10 "cur":3 "maxClaimPerCase":5000 "maxClaimPerCycle":10000 "convering":100 "maxClaimChecking":"incApproved" "varPayId":193 "defPaymentDate":"lastDay" "paymentMonth":1 "paymentDay":0 "remarks": "status": "Y", "iRev": 1, "lastModifyDate": "2020-03-09 12:55:36", "medicalPlan.lastModifyUid.simpleUser.desc__lang": "admin-SC", "id": 12655, "st_desc": "00006MLTEST", "st_id": 12655, "st_code": "00006MLTEST" }, {......} ] }
# 新增医疗计划
# 接口描述
用于新增医疗计划记录
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/root/api/save/medicalPlan HTTP 请求方式 PUT 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID menuCode String
(Query)Y 可在 Data Dictionary 中找到
Eg:medicalPlan
entity String
(Body)Y JSON (可参考请求示例中的相关参数) 请求示例
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/medicalPlan"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("medicalPlan"); HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString()); put.addHeader("authorization", access_token); put.addHeader("client_id", ClientID); StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON); entity.setContentEncoding("UTF-8"); put.setEntity(entity); res = client.execute(put); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); if (json != null) { recordId = json.getLongValue("recordId"); } System.out.println(json); } put.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
其中 Entity 的 JSON 格式如下:
{ "medicalplan": { "values": [ { "code": "111", "desc": "22", "medPlanType": 49, "startmonth": "1", "startday": "1" } ] } }
返回示例
{ "recordId": 12724, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "存在无效数据(medicalplan.medPlanType)", "msgCode": "core_143009" } ], "status": false }
# 读取医疗计划
# 接口描述
根据 ID 读取医疗计划记录详情
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/root/api/read/medicalPlan HTTP 请求方式 GET 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID menuCode String
(Query)Y 可在 Data Dictionary 中找到
Eg:medicalPlan
id long
(Query)Y 医疗计划单 ID,可参考获取医疗计划单据列表返回的 ID iRev long
(Query)N 版本号,用于读取历史记录 / 已删除的记录 请求示例
JSONObject json = null; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/medicalPlan"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("medicalPlan"); paramStrBuilder.append("&id=").append(id); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
返回示例
{ "data": { "medicalplan": [ { "lastModifyUid": 2628, "dependentAllow": true, "useAccess": false, "startday": 0, "expiredDate": -2209017600000, "sysJson": "", "viewCode": "medicalPlan", "beId": 0, "planStartAt": "cur", "paymentDay": 1, "useAccessBl": false, "prorata": false, "id": 2, "locked": false, "lastModifyDate": 1570758764000, "createUid": 2808, "startmonth": 0, "maxClaimPerCycle": 999999999, "defPaymentDate": "userDef", "desc_pl": "", "lastApproveUid": 0, "desc_udfcn": "", "expiredUid": 0, "i18nField": "{\"desc_en\": \"计划1EN\", \"desc_zh-CN\": \"计划1SC\", \"desc_zh-TW\": \"计划1TC\"}", "maxCasePerCycle": 9999, "desc_zh-TW": "计划1TC", "planPeriodStartOn": "Others", "status": "Y", "desc": "计划1SC", "medPlanType": 18, "cur": 40, "attachmentNo": 0, "planPeriod": 999, "code": "fq01", "roundingNum": 0.0001, "roundingCombo": "no", "convering": 50, "maxClaimPerCase": 999999999, "iRev": 29, "seniCriteriaCombo": "year", "expired": false, "printCount": 0, "varPayId": 374, "statusModifyDate": 1539829872000, "desc_en": "计划1EN", "planPeriodSpecDate": "joinDate", "createDate": 1539829872000, "seniRequired": false, "desc_zh-CN": "计划1SC", "maxClaimChecking": "incApproved", "seniCriteriaNum": 0, "useAccessWl": false, "probaPassReq": false, "planPeriodUnit": "day", "paymentMonth": 0, "useAccessAutoCalc": false, "remarks": "<p>医疗计划:1<br></p>" } ] }, "messages": [], "status": true }
{ "data": {}, "messages": [ { "msgDetail": "找不到相关记录,记录可能已被删除或你没有访问权限", "msgCode": "core_141019" } ], "status": false }
# 保存医疗计划
# 接口描述
用于保存医疗计划
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/root/api/save/medicalPlan HTTP 请求方式 PUT 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID menuCode String
(Query)Y 可在 Data Dictionary 中找到
Eg:medicalPlan
entity String
(Body)Y JSON (可参考请求示例中的相关参数) 请求示例
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/medicalPlan"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("medicalPlan"); HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString()); put.addHeader("authorization", access_token); put.addHeader("client_id", ClientID); StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON); entity.setContentEncoding("UTF-8"); put.setEntity(entity); res = client.execute(put); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); if (json != null) { recordId = json.getLongValue("recordId"); } System.out.println(json); } put.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
其中 Entity 的 JSON 格式如下:
{ "medicalplan": { "values": [ { "id": 1, "code": "111", "desc": "22", "medPlanType": 1, "startmonth": "1", "startday": "1" } ] } }
返回示例
{ "recordId": 1, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "找不到相关记录,记录可能已被删除或你没有访问权限", "msgCode": "core_141019" } ], "status": false }
# 删除医疗计划
# 接口描述
用于删除指定 ID 的医疗计划记录
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/root/api/delete/medicalPlan HTTP 请求方式 DELETE 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID menuCode String
(Query)Y 可在 Data Dictionary 中找到
Eg:medicalPlan
id long
(Query)Y 医疗计划单 ID,可参考获取医疗计划单据列表返回的 ID 请求示例
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/medicalPlan"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("medicalPlan"); paramStrBuilder.append("&id=").append(id); HttpDelete delete = new HttpDelete(url + "?" + paramStrBuilder.toString()); delete.addHeader("authorization", access_token); delete.addHeader("client_id", ClientID); res = client.execute(delete); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } delete.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
返回示例
{ "messages": [], "status": true }
{ "messages": [ { "msgDetail": "单据已被删除", "msgCode": "core_101017" } ], "status": false }
# 医疗索偿
# 获取医疗索偿单据列表
# 接口描述
用于获取医疗索偿单据列表
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/search/search HTTP 请求方式 GET 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID stSearch String
(Query)Y Lookup Type. 可在 UDF Lookup 中找到。
(Eg:medicalClaim
......)formatId long
(Query)N Lookup Query 中的格式 ID
(若未指定该参数,则使用默认格式)startRow int
(Query)N 返回结果的开始行 endRow int
(Query)N 返回结果的结束行 quickSearchStr String
(Query)N 设定关键字查找数据 请求示例
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&stSearch=").append("medicalClaim"); paramStrBuilder.append("&startRow=").append(0); paramStrBuilder.append("&endRow=").append(10); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
返回示例
{ "stSearch": "medicalClaim", "size": 1, "stSearchDisplay": "Medical Claim", "values": [ { "code": "E_MEC_1542362265291", "status": "Y", "iRev": 7, "lastModifyDate": "2021-08-05 18:04:18", "medicalClaim.lastModifyUid.simpleUser.desc__lang": "admin123", "id": 38, "st_desc": "E_MEC_1542362265291", "st_id": 38, "st_code": "E_MEC_1542362265291" } ] }
# 新增医疗索偿记录
# 接口描述
用于新增医疗索偿记录
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/root/api/save/medicalClaim HTTP 请求方式 PUT 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID menuCode String
(Query)Y 可在 Data Dictionary 中找到
Eg:medicalClaim
entity String
(Body)Y JSON (可参考请求示例中的相关参数) 请求示例
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/medicalClaim"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("medicalClaim"); HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString()); put.addHeader("authorization", access_token); put.addHeader("client_id", ClientID); StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON); entity.setContentEncoding("UTF-8"); put.setEntity(entity); res = client.execute(put); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); if (json != null) { recordId = json.getLongValue("recordId"); } System.out.println(json); } put.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
其中 Entity 的 JSON 格式如下:
{ "medicalclaim": { "values": [ { "empId": 12, "medPlanId": 13, "invoiceDate":"2022-09-10", "amount": 10 } ] } }
返回示例
{ "recordId": 1675, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "必填项为空(medicalclaim.empId)", "msgCode": "core_101905" } ], "status": false }
# 读取医疗索偿记录
# 接口描述
根据 ID 读取医疗索偿记录详情
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/root/api/read/medicalClaim HTTP 请求方式 GET 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID menuCode String
(Query)Y 可在 Data Dictionary 中找到
Eg:medicalClaim
id long
(Query)Y 医疗索偿单 ID,可参考获取医疗索偿单据列表返回的 ID iRev long
(Query)N 版本号,用于读取历史记录 / 已删除的记录 请求示例
JSONObject json = null; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/medicalClaim"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("medicalClaim"); paramStrBuilder.append("&id=").append(id); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
返回示例
{ "data": { "medicalclaim": [ { "empId": 13532, "attachmentNo": 0, "lastModifyUid": 4, "code": "MC20030008", "useAccess": false, "expiredDate": -2209017600000, "iRev": 5, "sysJson": "{\"autoGenCode\":{\"snId\":149,\"sn\":\"8\"}}", "viewCode": "medicalClaim", "beId": 0, "expired": false, "paymentDay": 1593446400000, "printCount": 0, "useAccessBl": false, "id": 1568, "statusModifyDate": 1584960879000, "locked": false, "medPlanId": 10, "lastModifyDate": 1629268342000, "dependent": 0, "createUid": 4, "createDate": 1584960879000, "amount": 10, "lastApproveUid": 4, "invoiceDate": 1590854400000, "expiredUid": 0, "useAccessWl": false, "useAccessAutoCalc": false, "remarks": "", "status": "Y" } ] }, "messages": [], "status": true }
{ "data": {}, "messages": [ { "msgDetail": "找不到相关记录,记录可能已被删除或你没有访问权限", "msgCode": "core_141019" } ], "status": false }
# 保存医疗索偿记录
# 接口描述
用于保存医疗索偿记录
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/root/api/save/medicalClaim HTTP 请求方式 PUT 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID menuCode String
(Query)Y 可在 Data Dictionary 中找到
Eg:medicalClaim
entity String
(Body)Y JSON (可参考请求示例中的相关参数) 请求示例
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/medicalClaim"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("medicalClaim"); HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString()); put.addHeader("authorization", access_token); put.addHeader("client_id", ClientID); StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON); entity.setContentEncoding("UTF-8"); put.setEntity(entity); res = client.execute(put); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); if (json != null) { recordId = json.getLongValue("recordId"); } System.out.println(json); } put.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
其中 Entity 的 JSON 格式如下:
{ "medicalclaim": { "values": [ { "id": 1568, "medPlanId": 13, "invoiceDate":"2022-09-10", "amount": 10 } ] } }
返回示例
{ "recordId": 1568, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "必填项为空(medicalclaim.medPlanId)", "msgCode": "core_101905" } ], "status": false }
# 删除医疗索偿记录
# 接口描述
用于删除指定 ID 的医疗索偿记录
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/root/api/delete/medicalClaim HTTP 请求方式 DELETE 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID menuCode String
(Query)Y 可在 Data Dictionary 中找到
Eg:medicalClaim
id long
(Query)Y 医疗索偿单 ID,可参考获取医疗索偿单据列表返回的 ID 请求示例
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/medicalClaim"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("medicalClaim"); paramStrBuilder.append("&id=").append(id); HttpDelete delete = new HttpDelete(url + "?" + paramStrBuilder.toString()); delete.addHeader("authorization", access_token); delete.addHeader("client_id", ClientID); res = client.execute(delete); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } delete.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
返回示例
{ "messages": [], "status": true }
{ "messages": [ { "msgDetail": "单据已被删除", "msgCode": "core_101017" } ], "status": false }
# 读取 EBI 数据
# 医疗计划列表
# 接口描述
用于按照指定 EBI 格式读取 [医疗计划列表] EBI,并返回数据
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/ebiWidget/loadReport HTTP 请求方式 GET 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID formatId long
(Query)Y 通过 EBI 接口获得 offset int
(Query)N 返回结果的开始行 rows int
(Query)N 返回结果行数 请求示例
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&formatId=").append(formatId); paramStrBuilder.append("&offset=").append(0); paramStrBuilder.append("&rows=").append(3); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
返回示例
{ "size": 1, "rows": [ { "T4_A_cur": "3", "T4_A_maxClaimChecking": "于周期内赔偿限额检查只包括已批核的医疗索偿记录", "T4_A_varPayId_desc__lang": "Extra Wages (Input)-简体", "T4_A_planStartAt": "符合医疗计划要求当天所属的医疗计划周期", "aiM18ReservedCol_dataIndex": 1, "T4_A_varPayId_code": "102EXWGPX", "T4_A_cur_desc__lang": "¥", "T4_A_planPeriod": "1", "T4_A_paymentMonth": "1", "T4_A_planPeriodUnit": "年", "T4_A_startday": "1", "T4_A_seniCriteriaNum": "0", "T4_A_iRev": "11", "T4_A_desc__lang": "", "T4_A_cur_code": "RMB", "T4_A_maxClaimPerCase": "5,000.00", "T4_A_varPayId": "193", "T4_A_startmonth": "1", "T4_A_id": "1", "T4_A_defPaymentDate": "最后一天", "T4_A_seniCriteriaCombo": "年", "T4_A_code": "111" } ] }
# 员工医疗计划报告
# 接口描述
用于按照指定 EBI 格式读取 [员工医疗计划报告] EBI,并返回数据
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/ebiWidget/loadReport HTTP 请求方式 GET 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID formatId long
(Query)Y 通过 EBI 接口获得 offset int
(Query)N 返回结果的开始行 rows int
(Query)N 返回结果行数 请求示例
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&formatId=").append(formatId); paramStrBuilder.append("&offset=").append(0); paramStrBuilder.append("&rows=").append(1); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
返回示例
{ "size": 1, "rows": [ { "T2_B_code": "111", "MAIN_hId": "4,027", "aiM18ReservedCol_dataIndex": 1, "T2_A_endDate": "9999-12-31", "T2_B_desc__lang": "", "T2_A_startDate": "2018-10-01", "T2_B_id": "1" } ] }
# 员工医疗索偿报告
# 接口描述
用于按照指定 EBI 格式读取 [员工医疗索偿报告] EBI,并返回数据
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/ebiWidget/loadReport HTTP 请求方式 GET 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID formatId long
(Query)Y 通过 EBI 接口获得 offset int
(Query)N 返回结果的开始行 rows int
(Query)N 返回结果行数 请求示例
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&formatId=").append(formatId); paramStrBuilder.append("&offset=").append(0); paramStrBuilder.append("&rows=").append(1); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
返回示例
{ "size": 1, "rows": [ { "T2_A_invoiceDate": "2022-05-23", "T2_A_locked": "否", "aiM18ReservedCol_dataIndex": 1, "T2_A_amount": "10.00", "T2_A_id": "1563", "T2_A_paymentDay": "2022-06-30", "T2_A_code": "MC20010003" } ] }
# 医疗索偿结余报告
# 接口描述
用于按照指定 EBI 格式读取 [医疗索偿结余报告] EBI,并返回数据
# 接口调用说明
请求说明
URL http://[server]/jsf/rfws/ebiWidget/loadReport HTTP 请求方式 GET 编码类型 UTF-8 URL 参数
参数 类型 必填 说明 authorization String
(Header)Y 通过 OAuth 获取的 Access Token client_id String
(Header)Y aiM18 授权应用列表中的 Client ID formatId long
(Query)Y 通过 EBI 接口获得 offset int
(Query)N 返回结果的开始行 rows int
(Query)N 返回结果行数 请求示例
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&formatId=").append(formatId); paramStrBuilder.append("&offset=").append(0); paramStrBuilder.append("&rows=").append(10); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
返回示例
{ "size": 1, "rows": [ { "T2_A_convering": "80.00", "T2_A_probaPassReq": "是", "T2_A_varPayId": "0", "aiM18ReservedCol_dataIndex": 1, "MAIN_medClaimBal": "10,000.00", "T2_A_seniCriteriaNum": "9", "T2_A_desc__lang": "", "T2_A_maxCasePerCycle": "1", "T2_A_cur_code": "", "T2_A_prorata": "否", "T2_A_cur": "0", "T2_A_useAccessAutoCalc": "否", "T2_A_planPeriodSpecDate": "入职日期", "T2_A_planPeriodStartOn": "其他", "T2_A_maxClaimChecking": "于周期内赔偿限额检查只包括已批核的医疗索偿记录", "T2_A_code": "KNMP001", "T2_A_varPayId_desc__lang": "", "MAIN_claimedAmount": "0.00", "T2_A_seniRequired": "否", "T2_A_seniCriteriaCombo": "年", "T2_A_roundingCombo": "不取整", "T2_A_id": "3", "T2_A_planPeriodUnit": "年", "T2_A_paymentMonth": "1", "T2_A_maxClaimPerCase": "1,000.00", "T2_A_startday": "0", "T2_A_varPayId_code": "", "T2_A_dependentAllow": "是", "T2_A_maxClaimPerCycle": "10,000.00", "T2_A_planStartAt": "符合医疗计划要求当天的下一个医疗计划周期" } ] }