diff --git a/digital_doctor/application/api/controller/Reporttt.php b/digital_doctor/application/api/controller/Reporttt.php index bf894a6..1524219 100644 --- a/digital_doctor/application/api/controller/Reporttt.php +++ b/digital_doctor/application/api/controller/Reporttt.php @@ -27,6 +27,7 @@ class Reporttt extends BaseHttpApi * desc:疼痛科-数字人-生成听诊报告(同时提交固定问答聊天记录) * * api/Reporttt/createReport + * username 用户名 * * name 病人姓名 gender 病人性别 @@ -45,6 +46,12 @@ class Reporttt extends BaseHttpApi wechat_no 微信号 ticket 对话票据 hdrdepartment_id 科室 + * + * content 对话内容;格式: + * $content = [ + ["role" => "user", "content" => '医生说:xxxxx'], + ["role" => "user", "content" => '患者说:xxxxx'], + ]; * author:wh */ function createReport(){ @@ -68,11 +75,13 @@ class Reporttt extends BaseHttpApi if(empty($ticket)){ return json(Tools::set_fail('对话票据ticket必须(用于隔离用户聊天历史记录),登陆时返回票据,每次诊断结束重新生成票据!')); } - $username = input('username'); - if(empty($username)){ - return json(Tools::set_fail('username不存在')); - } - $user = Db::table('fa_tt_users')->where('username',$username)->find(); + + //$username = input('username'); + //if(empty($username)){ + // return json(Tools::set_fail('username不存在')); + //} + + $user = Db::table('fa_tt_users')->where('ticket',$ticket)->find(); if(empty($user)){ return json(Tools::set_res(530,'用户不存在')); } diff --git a/digital_doctor/application/api/controller/Userstt.php b/digital_doctor/application/api/controller/Userstt.php index 4fb7135..045b82e 100644 --- a/digital_doctor/application/api/controller/Userstt.php +++ b/digital_doctor/application/api/controller/Userstt.php @@ -106,17 +106,17 @@ class Userstt extends BaseHttpApi unset($user['password']); - $expires = 7*86400+time();//报告完成之后重新获取票据 + //$expires = 7*86400+time();//报告完成之后重新获取票据 //返回票据 - $ticketstr = md5($user['username'].$expires); + $ticketstr = md5($user['username']); //修改有效期 Db::table('fa_tt_users') ->data([ 'ticket'=>$ticketstr, - 'expires'=>$expires,//7天 + //'expires'=>$expires,//7天 //'clientid'=>$clientid, ]) ->where('username',$username) diff --git a/digital_doctor/public/api_docs/api_list.html b/digital_doctor/public/api_docs/api_list.html index 06d2dd6..c8d648c 100644 --- a/digital_doctor/public/api_docs/api_list.html +++ b/digital_doctor/public/api_docs/api_list.html @@ -181,6 +181,219 @@
+
+
+*** +``` + /** + * desc:疼痛科-数字人-生成听诊报告(同时提交固定问答聊天记录) + * + * api/Reporttt/createReport + * + * name 病人姓名 + gender 病人性别 + age 病人年龄 + edu 教育程度 + career_year 职业及年限 + power 体力要求 + satisfaction 经济满意度 + old_career_year 过往职业及年限 + support 社会支持度 + marriage 婚姻状况 + live 居住情况 + home 家庭关系 + address 地址 + phone 联系方式 + wechat_no 微信号 + ticket 对话票据 + hdrdepartment_id 科室 + * author:wh + * api/reporttt/createReport + */ +``` +
+
+ 按需填写其它接口参数: + + 测试 +
+
+ +
+
+*** +``` + /** + * desc:查询报告详情 + * + * api/Reporttt/getReportById + * 参数:dataid 报告id + * ticket:用户ticket + * author:wh + * api/reporttt/getReportById + */ +``` +
+
+ 按需填写其它接口参数: + + 测试 +
+
+ +
+
+*** +``` + /** + * desc:查询报告列表 + * + * api/Reporttt/getReportList + * 参数:username + * ticket:用户ticket + * + * author:wh + * api/reporttt/getReportList + */ +``` +
+
+ 按需填写其它接口参数: + + 测试 +
+
+ +
+
+*** +``` + /** + * 修改报告 + * api/Reporttt/editReport + * 参数:dataid 报告数据id + name 病人姓名 + gender 病人性别: M=男性, F=女性 + age 病人年龄 + main_complaint 主诉 + medical_history 病史 + past_history 既往史 + allergy_history 过敏史 + family_history 家族史 + personal_history 个人史 + menstrual_marital_history 月经婚育史 + diagnosis 诊断 + treatment 医嘱 + * api/reporttt/editReport + */ +``` +
+
+ 按需填写其它接口参数: + + 测试 +
+
+ +
+
+*** +``` + /** + * desc:听译-生成听诊报告 + * + * api/Reportty/createReport + * + * author:wh + * api/reportty/createReport + */ +``` +
+
+ 按需填写其它接口参数: + + 测试 +
+
+ +
+
+*** +``` + /** + * desc:查询报告详情 + * + * api/Reportty/getReportById + * 参数:dataid 报告id + * ticket:用户ticket + * author:wh + * api/reportty/getReportById + */ +``` +
+
+ 按需填写其它接口参数: + + 测试 +
+
+ +
+
+*** +``` + /** + * desc:查询报告列表 + * + * api/Reportty/getReportList + * 参数:username + * ticket:用户ticket + * + * author:wh + * api/reportty/getReportList + */ +``` +
+
+ 按需填写其它接口参数: + + 测试 +
+
+ +
+
+*** +``` + /** + * 修改报告 + * api/Reportty/editReport + * 参数:dataid 报告数据id + name 病人姓名 + gender 病人性别: M=男性, F=女性 + age 病人年龄 + main_complaint 主诉 + medical_history 病史 + past_history 既往史 + allergy_history 过敏史 + family_history 家族史 + personal_history 个人史 + menstrual_marital_history 月经婚育史 + diagnosis 诊断 + treatment 医嘱 + ticket 对话票据 + hdrdepartment_id 科室 + * api/reportty/editReport + */ +``` +
+
+ 按需填写其它接口参数: + + 测试 +
+
+
*** @@ -441,6 +654,54 @@ $('.api_hdrregister_getHdrregisterList_response_result').html(JSON.stringify(res, null, "\t")); $('.api_hdrregister_getHdrregisterList_response_result').attr('style','color:green'); },'json'); + }, api_reporttt_createReport(){ + let url = $('#api_reporttt_createReport_textarea').val(); + $.post(url,{},function(res) { + $('.api_reporttt_createReport_response_result').html(JSON.stringify(res, null, "\t")); + $('.api_reporttt_createReport_response_result').attr('style','color:green'); + },'json'); + }, api_reporttt_getReportById(){ + let url = $('#api_reporttt_getReportById_textarea').val(); + $.post(url,{},function(res) { + $('.api_reporttt_getReportById_response_result').html(JSON.stringify(res, null, "\t")); + $('.api_reporttt_getReportById_response_result').attr('style','color:green'); + },'json'); + }, api_reporttt_getReportList(){ + let url = $('#api_reporttt_getReportList_textarea').val(); + $.post(url,{},function(res) { + $('.api_reporttt_getReportList_response_result').html(JSON.stringify(res, null, "\t")); + $('.api_reporttt_getReportList_response_result').attr('style','color:green'); + },'json'); + }, api_reporttt_editReport(){ + let url = $('#api_reporttt_editReport_textarea').val(); + $.post(url,{},function(res) { + $('.api_reporttt_editReport_response_result').html(JSON.stringify(res, null, "\t")); + $('.api_reporttt_editReport_response_result').attr('style','color:green'); + },'json'); + }, api_reportty_createReport(){ + let url = $('#api_reportty_createReport_textarea').val(); + $.post(url,{},function(res) { + $('.api_reportty_createReport_response_result').html(JSON.stringify(res, null, "\t")); + $('.api_reportty_createReport_response_result').attr('style','color:green'); + },'json'); + }, api_reportty_getReportById(){ + let url = $('#api_reportty_getReportById_textarea').val(); + $.post(url,{},function(res) { + $('.api_reportty_getReportById_response_result').html(JSON.stringify(res, null, "\t")); + $('.api_reportty_getReportById_response_result').attr('style','color:green'); + },'json'); + }, api_reportty_getReportList(){ + let url = $('#api_reportty_getReportList_textarea').val(); + $.post(url,{},function(res) { + $('.api_reportty_getReportList_response_result').html(JSON.stringify(res, null, "\t")); + $('.api_reportty_getReportList_response_result').attr('style','color:green'); + },'json'); + }, api_reportty_editReport(){ + let url = $('#api_reportty_editReport_textarea').val(); + $.post(url,{},function(res) { + $('.api_reportty_editReport_response_result').html(JSON.stringify(res, null, "\t")); + $('.api_reportty_editReport_response_result').attr('style','color:green'); + },'json'); }, api_ttchathistory_getTtchathistoryList(){ let url = $('#api_ttchathistory_getTtchathistoryList_textarea').val(); $.post(url,{},function(res) { diff --git a/digital_doctor/public/api_docs/api_list.md b/digital_doctor/public/api_docs/api_list.md index b66e8d3..a3bd5e5 100644 --- a/digital_doctor/public/api_docs/api_list.md +++ b/digital_doctor/public/api_docs/api_list.md @@ -134,6 +134,147 @@ */ ``` +*** +``` + /** + * desc:疼痛科-数字人-生成听诊报告(同时提交固定问答聊天记录) + * + * api/Reporttt/createReport + * + * name 病人姓名 + gender 病人性别 + age 病人年龄 + edu 教育程度 + career_year 职业及年限 + power 体力要求 + satisfaction 经济满意度 + old_career_year 过往职业及年限 + support 社会支持度 + marriage 婚姻状况 + live 居住情况 + home 家庭关系 + address 地址 + phone 联系方式 + wechat_no 微信号 + ticket 对话票据 + hdrdepartment_id 科室 + * author:wh + * api/reporttt/createReport + */ +``` + +*** +``` + /** + * desc:查询报告详情 + * + * api/Reporttt/getReportById + * 参数:dataid 报告id + * ticket:用户ticket + * author:wh + * api/reporttt/getReportById + */ +``` + +*** +``` + /** + * desc:查询报告列表 + * + * api/Reporttt/getReportList + * 参数:username + * ticket:用户ticket + * + * author:wh + * api/reporttt/getReportList + */ +``` + +*** +``` + /** + * 修改报告 + * api/Reporttt/editReport + * 参数:dataid 报告数据id + name 病人姓名 + gender 病人性别: M=男性, F=女性 + age 病人年龄 + main_complaint 主诉 + medical_history 病史 + past_history 既往史 + allergy_history 过敏史 + family_history 家族史 + personal_history 个人史 + menstrual_marital_history 月经婚育史 + diagnosis 诊断 + treatment 医嘱 + * api/reporttt/editReport + */ +``` + +*** +``` + /** + * desc:听译-生成听诊报告 + * + * api/Reportty/createReport + * + * author:wh + * api/reportty/createReport + */ +``` + +*** +``` + /** + * desc:查询报告详情 + * + * api/Reportty/getReportById + * 参数:dataid 报告id + * ticket:用户ticket + * author:wh + * api/reportty/getReportById + */ +``` + +*** +``` + /** + * desc:查询报告列表 + * + * api/Reportty/getReportList + * 参数:username + * ticket:用户ticket + * + * author:wh + * api/reportty/getReportList + */ +``` + +*** +``` + /** + * 修改报告 + * api/Reportty/editReport + * 参数:dataid 报告数据id + name 病人姓名 + gender 病人性别: M=男性, F=女性 + age 病人年龄 + main_complaint 主诉 + medical_history 病史 + past_history 既往史 + allergy_history 过敏史 + family_history 家族史 + personal_history 个人史 + menstrual_marital_history 月经婚育史 + diagnosis 诊断 + treatment 医嘱 + ticket 对话票据 + hdrdepartment_id 科室 + * api/reportty/editReport + */ +``` + *** ``` /**