Files
fast_response/digital_doctor/application/api/controller/Ttuserbaseinfo.php
2025-03-17 10:56:09 +08:00

85 lines
2.5 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
namespace app\api\controller;
use think\Db;
use app\common\model\TabConf;
use wanghua\general_utility_tools_php\file\upload\FileUpload;
use wanghua\general_utility_tools_php\tool\Tools;
use wanghua\general_utility_tools_php\Validate;
use think\Controller;
class Ttuserbaseinfo extends BaseHttpApi
{
protected $controller_comments = '疼痛科用户基本信息';
/**
* desc获取疼痛科用户基本信息
*
* api/Ttuserbaseinfo/getTtuserbaseinfoDetail
*
* 参数:
* id ID ID 必须
*
* 所有字段说明<span style="color: gray">(可能有部分额外字段未在此体现)</span>
* id ID
* date 日期
* doctor 所属医生
* name 病人姓名
* gender 病人性别
* age 病人年龄
* edu 教育程度
* career_year 职业及年限
* power 体力要求
* satisfaction 经济满意度
* old_career_year 过往职业及年限
* old_career_power 过往职业体力要求
* support 社会支持度
* marriage 婚姻状况
* live 居住情况
* home 家庭关系
* address 地址
* phone 联系方式
* wechat_no 微信号
* create_time 创建时间
* is_flow 是否接受随访:yes=是,no=否
* ticket 对话票据(数据隔离)
* hdrdepartment_id 科室
* from 来源:num_per=数智人,ty=听译助手,h5=h5网页问诊
* authorwh
*/
function getTtuserbaseinfoDetail(){
Tools::log_to_write_txt(['获取疼痛科用户基本信息 入参:'=>input()]);
$api_desc = '获取疼痛科用户基本信息';
try {
$id = input('id');
if(empty($id)){
return json(Tools::set_fail('id参数错误'));
}
$model_obj = Db::table(TabConf::$fa_tt_userbaseinfo);
if(input('id')){
$model_obj->where('id',input('id'));
}
$item = $model_obj->find();
$data = $item;
return json(Tools::set_ok('ok',$data));
}catch(\Exception $e){
Tools::log_to_write_txt([
'error'=>'获取疼痛科用户基本信息.异常.'.$e->getMessage(),
'参数'=>input(),
'error_info'=>$e->getTraceAsString()
]);
return json(Tools::set_res(500,'操作异常',[]));
}
}
}