This commit is contained in:
2024-08-05 16:11:41 +08:00
parent 0ad13dc162
commit 35c5690c78
4 changed files with 419 additions and 8 deletions

View File

@@ -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'],
];
* authorwh
*/
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,'用户不存在'));
}

View File

@@ -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)

View File

@@ -181,6 +181,219 @@
</div>
<div class="api_hdrregister_getHdrregisterList_response_result"></div>
</div><div id="api_reporttt_createReport">
<div class="markdown_content">
***
```
/**
* 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 科室
* authorwh
* api/reporttt/createReport
*/
```
</div>
<div>
按需填写其它接口参数:
<textarea name="" id="api_reporttt_createReport_textarea" cols="100" rows="3">/api/reporttt/createReport</textarea>
<a href='JavaScript:;' onclick="DocObject.api_reporttt_createReport()">测试</a>
</div>
<div class="api_reporttt_createReport_response_result"></div>
</div><div id="api_reporttt_getReportById">
<div class="markdown_content">
***
```
/**
* desc查询报告详情
*
* api/Reporttt/getReportById
* 参数dataid 报告id
* ticket用户ticket
* authorwh
* api/reporttt/getReportById
*/
```
</div>
<div>
按需填写其它接口参数:
<textarea name="" id="api_reporttt_getReportById_textarea" cols="100" rows="3">/api/reporttt/getReportById</textarea>
<a href='JavaScript:;' onclick="DocObject.api_reporttt_getReportById()">测试</a>
</div>
<div class="api_reporttt_getReportById_response_result"></div>
</div><div id="api_reporttt_getReportList">
<div class="markdown_content">
***
```
/**
* desc查询报告列表
*
* api/Reporttt/getReportList
* 参数username
* ticket用户ticket
*
* authorwh
* api/reporttt/getReportList
*/
```
</div>
<div>
按需填写其它接口参数:
<textarea name="" id="api_reporttt_getReportList_textarea" cols="100" rows="3">/api/reporttt/getReportList</textarea>
<a href='JavaScript:;' onclick="DocObject.api_reporttt_getReportList()">测试</a>
</div>
<div class="api_reporttt_getReportList_response_result"></div>
</div><div id="api_reporttt_editReport">
<div class="markdown_content">
***
```
/**
* 修改报告
* 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
*/
```
</div>
<div>
按需填写其它接口参数:
<textarea name="" id="api_reporttt_editReport_textarea" cols="100" rows="3">/api/reporttt/editReport</textarea>
<a href='JavaScript:;' onclick="DocObject.api_reporttt_editReport()">测试</a>
</div>
<div class="api_reporttt_editReport_response_result"></div>
</div><div id="api_reportty_createReport">
<div class="markdown_content">
***
```
/**
* desc听译-生成听诊报告
*
* api/Reportty/createReport
*
* authorwh
* api/reportty/createReport
*/
```
</div>
<div>
按需填写其它接口参数:
<textarea name="" id="api_reportty_createReport_textarea" cols="100" rows="3">/api/reportty/createReport</textarea>
<a href='JavaScript:;' onclick="DocObject.api_reportty_createReport()">测试</a>
</div>
<div class="api_reportty_createReport_response_result"></div>
</div><div id="api_reportty_getReportById">
<div class="markdown_content">
***
```
/**
* desc查询报告详情
*
* api/Reportty/getReportById
* 参数dataid 报告id
* ticket用户ticket
* authorwh
* api/reportty/getReportById
*/
```
</div>
<div>
按需填写其它接口参数:
<textarea name="" id="api_reportty_getReportById_textarea" cols="100" rows="3">/api/reportty/getReportById</textarea>
<a href='JavaScript:;' onclick="DocObject.api_reportty_getReportById()">测试</a>
</div>
<div class="api_reportty_getReportById_response_result"></div>
</div><div id="api_reportty_getReportList">
<div class="markdown_content">
***
```
/**
* desc查询报告列表
*
* api/Reportty/getReportList
* 参数username
* ticket用户ticket
*
* authorwh
* api/reportty/getReportList
*/
```
</div>
<div>
按需填写其它接口参数:
<textarea name="" id="api_reportty_getReportList_textarea" cols="100" rows="3">/api/reportty/getReportList</textarea>
<a href='JavaScript:;' onclick="DocObject.api_reportty_getReportList()">测试</a>
</div>
<div class="api_reportty_getReportList_response_result"></div>
</div><div id="api_reportty_editReport">
<div class="markdown_content">
***
```
/**
* 修改报告
* 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
*/
```
</div>
<div>
按需填写其它接口参数:
<textarea name="" id="api_reportty_editReport_textarea" cols="100" rows="3">/api/reportty/editReport</textarea>
<a href='JavaScript:;' onclick="DocObject.api_reportty_editReport()">测试</a>
</div>
<div class="api_reportty_editReport_response_result"></div>
</div><div id="api_ttchathistory_getTtchathistoryList">
<div class="markdown_content">
***
@@ -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) {

View File

@@ -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 科室
* authorwh
* api/reporttt/createReport
*/
```
***
```
/**
* desc查询报告详情
*
* api/Reporttt/getReportById
* 参数dataid 报告id
* ticket用户ticket
* authorwh
* api/reporttt/getReportById
*/
```
***
```
/**
* desc查询报告列表
*
* api/Reporttt/getReportList
* 参数username
* ticket用户ticket
*
* authorwh
* 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
*
* authorwh
* api/reportty/createReport
*/
```
***
```
/**
* desc查询报告详情
*
* api/Reportty/getReportById
* 参数dataid 报告id
* ticket用户ticket
* authorwh
* api/reportty/getReportById
*/
```
***
```
/**
* desc查询报告列表
*
* api/Reportty/getReportList
* 参数username
* ticket用户ticket
*
* authorwh
* 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
*/
```
***
```
/**