## 部署注意事项
医院nginx需要配置
proxy_set_header Host $host; # 转发真实的域名
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme; # Set X-Forwarded-Proto header 保证http和https的schema是对的 这样内外网图片url拼接完整地址返回才能正确
如果医院给的是域名下的某个目录 那么nginx需要重写规则如下
location / {
rewrite ^/dottmed(/.*)$ $1 break;
proxy_pass http://192.168.9.61/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
### 2022-05-24
#### 病历导出板块修改
```python
导出url /api/patient/batch_download_preinfo/?token=登录的token&patient_ids=1,2,3&eme_type=急救的类型 例如胸痛传1
默认导出选中的档案传参为 /api/patient/batch_download_preinfo/?token=登录的token&patient_ids=1,2,3 不需要传eme_type
默认导出某个类型急救的病历传参为 /api/patient/batch_download_preinfo/?token=登录的token&eme_type==急救的类型 例如胸痛传1 不需要传patient_ids
```
### 2022-05-24
#### 项目安装依赖包请使用install_env.sh
```python
保证有序进行安装
```
### 2022-05-23
#### 迁移python3补充
```python
使用2to3转换所有文件
重新安装suds
from django.utils.encoding import smart_unicode
修改localsettings urlpase
删除所有的迁移 重新生成 做fake迁移
最后卸载drf-safe-jack 和django-m2m-fix后重新安装
使用code inspect code功能查找错误进行修复
修复time.clock 为 time.perf_counter()
替换 urllibe.quote 为 urllib.parse.quote
使用code inspect code功能查找错误进行修复
删除 import sys
reload(sys)
sys.setdefaultencoding('utf-8')
```
### 2022-04-29
#### 会诊列表结构修改
```python
会诊列表和详情修改 /huizhen/mine
过滤条件由patient__id 改为 huizhen__patient__id
列表返回结构原来的每个item现在嵌套在 huizhen字段里面
未读消息不使用 'unread_num' 改为使用unread_msg_count字段
最新消息时间不使用 'time' 改为使用 latest_msg_time
```
### 2022-04-12
#### 病历高级搜索重复项筛选
```python
传参示例 same_name=True 勾选传True 否则不传
same_name 同名查询
same_pat_no 同登记号查询
```
### 2022-04-08
#### 急诊演练反馈修改点
**1. 急诊床位 patient.eme_bed_no**
**2. 病历创建流程**
创建流程为 点击保存时候 如果有登记号 --》 调用/api/common/get_his_info/?pat_med_card=就诊号 ---》
1. 查询返回200则显示弹窗选择同步项目,选择同步项后调用/api/common/sync_his_info/?admid=就诊id&only_basic=true 拿到患者基本信息和admid, 请求创建病历的接口 把admid也传过来给patient.admid 创建完成关闭弹窗
2. 查询返回 400 弹框提示400的消息 按钮选择是否继续创建,是则继续创建,否则关闭弹窗
```python
获取就诊id和其他就诊信息接口
/api/common/sync_his_info/?admid=153301977&only_basic=true // 注意:接口不需要传id=xx only_basic传true 其他同对接his内的同步请求
返回 参数含 患者基本信息
{
"admdate": "2021-02-03",
"job": "",
"admid": "153301977",
"name": "小李子",
"has_his_inpatient_no": true,
"credentials_type": "1",
"mobile": "15607679596",
"gender": "1",
"reg_dept": "急诊住院部医生",
"inpatient_no": "",
"phone": "15607679596",
"nation": "01",
"pat_med_card": null,
"idno": "46000319951215021X",
"bed_doctor": "杰克",
"address": "四川仁寿视高老君街13388242632",
"birth_date": "1995-12-15",
"bed_no": "15"
}
```
否则显示
### 2021-12-29
#### 创伤病历柱状图
```python
“严重创伤急救例数”统计
在原来月份里面 detail返回
{
"month":"xxx",
"count":"xxx",
"detail": {"critical": 严重创伤的数量, "normal": 一般的数量 } 对应到跳转搜索条件为 critical=True critical=False
}
api/trauma_rescue/count/?count_type=blood_ready&count_period=month
count_type:
"transfer_count" 院前急救转运趋势图
blood_ready 急诊输血准备平均时间趋势图
airway_ready 工气道建立平均时间趋势图
advice_eme_surg_time 紧急手术术前准备平均时间趋势图
```
#### 创伤病历高级搜索
```python
严重创伤搜索字段
critical 传True False
```
#### 创伤病历统计指标
```python
/api/trauma_rescue/count/?count_type=rate&count_period=all
返回
{
"gcs": 创伤病人GCS评分完成比例,
"ti": 创伤病人TI评分完成比例,
"iss": 创伤病人ISS评分完成比例,
"transfusion": 转诊治疗的创伤病人比例,
"dead": 创伤病人病死率,
"critical_micu_mean": 严重创伤病人MICU平均住院时间,
"critical_hosday_mean":严重创伤病人平均住院时间 ,
"critical_dead":严重创伤病人病死率,
"first_ct_mean":完成首张CT图像平均用时 ,
"first_cxray":胸痛X片平均用时,
"first_pxray": 完成骨盆X片平均用时,
"first_fast":完成FAST检查平均用时,
"doctor_ready_waste": 急诊准备平均时间,
"info_alert": 信息预警比例,
"tranfer_mean": 院前急救转运平均时间,
}
```
### 2021-12-28
#### 质控字段
```python
注意在对应模块添加以下两个字段 这两个字段创伤质控必须用到 创伤中毒常规消化道的的病历需要加一下
patient.inside_roadmap.eme_trans_depart_time 转科时间
patient.leave_hospital.dead_time 死亡时间
"""创伤质控接口 get /api/trauma_rescue/quality_control/{创伤id}/"""
返回
{
"tranfer": 院前急救转运时间,
"eme_get_ready": 急诊准备时间(分钟),
"ctnfast": 全身快速CT、胸部X片、骨盆X片和FAST完成时间,
"eme_tranfusion_ready": 急诊输血准备时间(分钟),
"airway": 人工气道建立时间,
"surg_ready": 紧急手术术前准备时间,
"eme_stop": 急诊科停留时间,
"micu_mean": 严重创伤病人MICU平均住院时间(天),
}
```
### 2021-12-28
#### 通用出院转归模块
```python
"""patient.leave_hospital"""
hospital_day = models.IntegerField('住院天数', null=True, blank=True, validators=[validate_postive_real])
hospital_cost = models.IntegerField('费用记录', null=True, blank=True, validators=[validate_postive_real])
leave_hos_time = models.DateTimeField('出院时间', null=True, blank=True)
leave_hos_way = models.CharField(u'出院方式', choices=HOS_OUTCOME, max_length=2, null=True, blank=True)
```
### 2021-12-27
#### 创伤其他信息字段
```python
"""这里分成两块 评分的放在patient.disease_evalute"""
eme_gcs = models.IntegerField('急诊GCS评分', null=True, blank=True)
is_eme_gcs = models.NullBooleanField('急诊GCS评分是否已评', null=True, blank=True)
is_eme_iss = models.NullBooleanField('急诊创伤ISS评分是否已评', null=True, blank=True)
eme_iss = models.IntegerField('急诊创伤ISS评分', null=True, blank=True)
is_eme_ais = models.NullBooleanField('急诊创伤AIS评分是否已评', null=True, blank=True)
eme_ais = models.IntegerField('急诊创伤AIS评分', null=True, blank=True)
is_eme_ti = models.NullBooleanField('急诊创伤TI评分是否已评', null=True, blank=True)
eme_ti = models.IntegerField('急诊创伤TI评分', null=True, blank=True)
"""时间在 patient.other_info """
advice_transfusion_time = models.DateTimeField('提出输血申请时间', null=True, blank=True)
exec_transfusion_time = models.DateTimeField('执行输血的时间', null=True, blank=True)
advice_build_airway_time = models.DateTimeField('提出建立气道时间', null=True, blank=True)
success_build_airway_time = models.DateTimeField('成功建立人工气道时间', null=True, blank=True)
advice_eme_surg_time = models.DateTimeField('提出紧急手术医嘱时间', null=True, blank=True)
start_eme_surg_time = models.DateTimeField('损伤控制性手术开始时间', null=True, blank=True)
```
### 2021-12-27
#### 创伤新增字段
```python
leave_micu_time = models.DateTimeField('出MICU时间', null=True, blank=True)
chest_xray_time = models.DateTimeField('完成胸部X片时间', null=True, blank=True)
pelvic_xray_time = models.DateTimeField('完成盆骨X片时间', null=True, blank=True)
fast_time = models.DateTimeField('完成FAST检查时间', null=True, blank=True)
```
### 2021-12-27
#### 创伤救治队员到达急诊时间
```python
td_arrive_eme_time = models.DateTimeField('创伤救治队员到达急诊时间', null=True, blank=True)
安卓端访问update_arrive_time 创伤的快速记录添加前缀 ir_
```
### 2021-12-17
#### gbs评分
```python
gib_score = models.IntegerField('GBS评分', null=True, blank=True, validators=[validate_postive])
评分同之前其他的评分接口 传参web端和安卓端约定一下
```
### 2021-12-17
#### 胸痛急救模块2
```python
# 转归 在inside_roadmap里面
chestpain_outcome = models.CharField('患者胸痛中心转归', choices=CHESTPAIN_OUTCOME, max_length=50, null=True, blank=True)
chestpain_outcome_other = models.TextField('患者胸痛中心转归', null=True, blank=True)
eme_outcome = models.CharField('患者急诊转归', choices=EME_OUTCOME, max_length=50, null=True, blank=True)
eme_trans_to_department = models.TextField('转送去向科室', null=True, blank=True)
# 胸痛相关院前 院内溶栓筛查
急诊信息部分--院前溶栓治疗 位于inside_rescue_info_chestpain 院内部分位于 special_treat.stemi 字段名相同
is_sift = models.NullBooleanField('是否有溶栓治疗', null=True)
is_nonstop = models.CharField('直达溶栓场所', max_length=2, null=True, blank=True)
lysis_place = models.CharField('溶栓场所', max_length=2, choices=Placechoices, null=True, blank=True)
lysis_talk_time = models.DateTimeField('溶栓开始知情同意时间', null=True, blank=True)
lysis_sign_time = models.DateTimeField('签署知情同意时间', null=True, blank=True)
lysis_start_time = models.DateTimeField('开始溶栓时间', null=True, blank=True)
lysis_end_time = models.DateTimeField('溶栓结束时间', null=True, blank=True)
lysis_affect_time = models.DateTimeField('溶栓后造影时间', null=True, blank=True)
lysis_medicine = models.CharField('溶栓药物', max_length=50, choices=LysisMedicineChoice, null=True, blank=True)
lysis_dose = models.CharField('剂量', choices=CODE_CHOICES, max_length=2, null=True, blank=True)
is_lysis_repatency = models.NullBooleanField('溶栓再通', null=True, blank=True)
cannot_lysis = models.NullBooleanField('存在禁忌症', null=True, blank=True)
```
### 2021-12-16
#### 胸痛急救模块
```python
120 have_call 有无呼救
call_time_unknown 呼救时间不详
外院120转诊相关字段
into_tran_hos_time = models.DateTimeField('转出医院入门时间', null=True, blank=True)
un_into_tran_hos_time = models.NullBooleanField('转出医院入门时间不详', null=True, blank=True)
decide_tran_hos_time = models.DateTimeField('决定转院时间', null=True, blank=True)
un_decide_tran_hos_time = models.NullBooleanField('决定转院时间不详', null=True, blank=True)
tran_ambulance_arrive_time = models.DateTimeField('转运救护车到达时间', null=True, blank=True)
un_tran_ambulance_arrive_time = models.NullBooleanField('转运救护车到达时间不详', null=True, blank=True)
leave_tran_hos_time = models.DateTimeField('离开转出医院时间', null=True, blank=True)
un_leave_tran_hos_time = models.NullBooleanField('离开转出医院时间不详', null=True, blank=True)
un_first_touch_time = models.DateTimeField('首次医疗接触时间不详', null=True, blank=True)
first_touch_doctor = models.TextField('首次医疗接触医护人员', null=True, blank=True)
本院120转诊 和 外院120转诊
导管室/CCU/心内科病房/其他
direct_to_department = models.CharField('直达', choices=DIRECT_ARRIVE, max_length=50, null=True,blank=True)
院间转诊
attack_depart = models.CharField('发病科室', max_length=50, null=True, blank=True)
远程心电传输 位于patient.xxx
is_remote_ecg = models.NullBooleanField('是否远程心电传输', null=True, blank=True)
remote_ecg_time = models.DateTimeField('远程心电图时间', null=True, blank=True)
remote_ecg_way = models.CharField('远程心电传输方式', choices=REMOTE_ECG_WAY, max_length=50, null=True, blank=True)
超声室
ultrasound_check_time = models.DateTimeField('超声检查时间', null=True, blank=True)
ultrasound_report_time = models.DateTimeField('超声报告时间', null=True, blank=True)
ct室
ct_notice_time = models.DateTimeField('通知CT室时间', null=True, blank=True)
ct_doctor_arrive_time = models.DateTimeField('CT人员到达时间', null=True, blank=True)
ct_ready_time = models.DateTimeField('CT室完成准备时间', null=True, blank=True)
ct_saomiao_time = models.DateTimeField('CT扫描时间', null=True, blank=True)
# 主动脉夹层病种方式的内容
notice_cs_time = models.DateTimeField('通知心脏外科会诊时间', null=True, blank=True)
cs_consult_time = models.DateTimeField('心脏外科会诊时间', null=True, blank=True)
ci_consult_time = models.DateTimeField('心脏内科会诊时间', null=True, blank=True)
vs_consult_time = models.DateTimeField('血管外科会诊时间', null=True, blank=True)
pci_time = models.DateTimeField('开始介入治疗时间', null=True, blank=True)
stent_release_time = models.DateTimeField('支架释放时间', null=True, blank=True)
# 手术相关的
surgery_talk_time = models.DateTimeField('知情同意时间', null=True, blank=True)
surgery_sign_time = models.DateTimeField('签署手术同意时间', null=True, blank=True)
surgery_start_time = models.DateTimeField('手术开始时间', null=True, blank=True)
surgery_end_time = models.DateTimeField('手术结束时间', null=True, blank=True)
surgery_result = models.CharField('手术结果', choices=, max_length=50, null=True,blank=True)
# 药物治疗相关
# 抗血小板治疗药物
aspirin_dose = models.CharField('阿司匹林', max_length=50, null=True, blank=True)
clopigrel_dose = models.CharField('氯吡格雷', max_length=50, null=True, blank=True)
ticagrelor_dose = models.CharField('替格瑞洛', max_length=50, null=True, blank=True)
#初次给药
first_drug_place = models.CharField('初始给药地点', choices=FIRST_DRUG_PLACE, max_length=50, null=True, blank=True)
first_drug_time = models.DateTimeField('初始给药时间', null=True, blank=True)
```
### 2021-12-16
#### 消化道出血模块
```python
接口 /api/gib_rescue/
新增字段 消化道出血病史 gib_history
出血症状 inside_rescue_info.bleed_symptom 选项从config拿
消化道出血 emergency_type是 10
```
注意消化道出血模块 对应的聊天房间前缀是 100
### 2021-12-13
#### 批量删除
```python
在原来的删除接口基础上批量删除修改为 patient_batch_delete/?ids=1,2,3 使用,分割
如 /api/apoplexy/patient_batch_delete/?ids=1,2,3
```
### 2021-12-13
#### 批量导出 使用post传参
```python
批量导出接口 patient_ids传病人id 使用,分隔
post /api/patient/batch_download_preinfo/
传参 patient_ids 1,2,3
```
### 2021-12-13
#### 发起会诊查看会诊医生详情 接口由hz_grade_detail修改为使用 all_mdt_doctor/
```python
注意:web端只需要改动发起会诊这里的接口,见下图 不要修改会诊管理那里的接口
```

### 2021-12-13
#### 排班修改 mdt排班增加搜索框+增加科室分类
```python
/api/common/department?limit=1000000
```

### 2021-09-30
#### 用户权限可用目录菜单说明
```python
注意权限只对普通用户生效 对admin用户不生效
web端菜单和安卓菜单 如果是admin用户显示全部
普通用户根据 account/mine 拿到的 user_permission_format字段 来匹配显示
没有权限返回 400 "抱歉,您没有该模块的访问权限!"
```
### 2021-09-30
#### 用户权限编辑说明
```python
get /api/account/permission_config/ 查看全局权限配置名称
返回:
[
{
"perms": [
"胸痛急救",
"卒中急救",
"创伤急救",
"中毒急救",
"常规急救"
],
"group_name": "急救病历"
},
]
put /api/account/users/{id}/ #更新某个用户的权限
传参在原来基础上加上 {
"can_view_other_case": true, # 是否可以查看未接诊的病历
"user_permission_format": {
"急救病历": [ # 以对象形式传过来 key是 上面的group_name
"胸痛急救", # value 是上面的perms的值 用户勾选了哪些就显示哪些
"卒中急救",
"创伤急救"
]
}
}
post /api/account/add_perms_batch/
'''can_view_other_case 和 user_permission_format 字段可传可不传 不传则不修改 \n
user_id_list 必传'''
{
"can_view_other_case": true, # 是否可以查看未接诊的病历
"user_permission_format": {
"急救病历": [ # 以对象形式传过来 key是 上面的group_name
"胸痛急救", # value 是上面的perms的值 用户勾选了哪些就显示哪些
"卒中急救",
"创伤急救"
]
}
"user_id_list" :[1,2,3]
}
```
### 2021-07-26
#### 会诊签到刷新列表
```python
进入签到tab发送 {"biz":"join_topic","topic":"mdt_sign"} 加入房间获
获取消息 使用topic "mdt_sign" 和 case_detail 进行匹配
{ "biz":"topic_msg",
"topic": "mdt_sign", # 收到这个topic 说明是签到笑嘻嘻
"case_detail":{"case_type": "9", "case_id": 15},
}
```
### 2021-07-25
#### 引入profile工具计算接口运行耗时
```python
在接口后加参数 ?profile
```
### 2021-07-23
#### 增加会诊选择类型
```python
多传一个参数 hz_type 1是线上会诊 2是床旁会诊 选项从config拿
```
#### mdt签到增加耗时及类型返回,发起会诊时间
```python
发起会诊时间 huizhen_created_time
会诊到达耗时 arrive_use_minute
会诊的类型 hz_type
```
### 2021-07-20
#### 增加启动任务释放任务通知
```python
启动任务 {
"topic": "patient_gps", # 发送topic
"type": "start_car_gps",
"car_id": 1,
"car_number": "99999",
}
释放任务
{
"topic": "patient_gps", # 发送topic
"type": "release_car_gps",
"car_id": 1,
"car_number": "99999",
}
```
### 2021-07-20
#### 增加待命中的车的定位点显示
```python
消息体
{
"biz": "send_topic",
"topic": "patient_gps", # 发送topic
"type": "wait_car_send", # 定位的来源 待命中的车
"new_track": { # 这里获取当前车辆位置
"lat": "30.647016", 纬度
"lon": "104.069100", 经度
"lng": "104.069100", 经度
"getTime": "2021-07-13 15:41:04" # 获取到定位的时间
},,
}
离线点消失通知 # 根据救护车id来进行匹配 注意需要把点也加到缩放中
{
"topic": "patient_gps", # 发送topic
"type": "offline_car_gps", # 离线通知
"tips": "设备已离线!",
"ambulance_id": 1
}
```
### 2021-07-17
#### 增肌用户发送的点单独查看详情信息用
```python
/api/patient/get_task_info/ {patient_id}/
返回内容如下
```


### 2021-07-17
#### 增加用户最后发送gps时间 任务详情增加用户gps时间
```python
patient.user_gps_update_time(安卓用) 用户最后发送gps时间
/task/{id}内增加gps最后发送时间和用户返回(web用)
字段:
send_gps_user 发送gps用户信息
user_gps_update_time 用户最后发送gps时间
user_gps_info 用户发送gps定位点
```
### 2021-07-16
#### 百度地图计算距离和预到达时间
```python
接口 post /api/common/get_bd_dstime/
传参格式 {"patient_id":1}
返回体 {"duration": None, "distance": None} # 直接带公里 分钟单位
```
### 2021-07-16
#### gps房间退出机制
```python
发送消息 {"biz":"quit_topic","topic":"patient_gps"}
```
### 2021-07-15
#### 筛选字段修改说明
```python
性别筛选改用字段 gender 传unknown 筛选未选择的病例
```
### 2021-07-15
#### web端 gps定位说明
```python
修改点:
1.修改 gpswebsocket消息获取方式
新增发送 {"biz":"join_topic","topic":"patient_gps"} 加入房间获取gps数据推送 不加入不会收到推送
2.消息从biz =car_track 修改为使用 topic == patient_gps 进行获取 这里主要增加了 "type" 字段用来区分定位的来源
{
"topic": "patient_gps", # 收到这个topic 说明是定位消息
"type":"user_send", # 定位的来源 这里user_send为用户发送的点 car_send 为车载gps发出的点
"case_detail":{"case_type": "9", "case_id": 15},# 返回病例详情做跳转用
"name": "patient.name" #患者姓名,
"send_gps_user":{"name":"xxxx", # 位置发送者姓名
}
"patient_id": 15, # 用户id
"new_track":{ # 这里获取当前车辆位置
"lat": "30.647016", 纬度
"lon": "104.069100", 经度
"lng": "104.069100", 经度
"getTime": "2021-07-13 15:41:04" # 获取到定位的时间
},
"to":'call_place' # 当前前往的目的地 选项有 'hospital'和'call_place'
"imei":"xxxx", imei设备编号,
"predict_arrive_info":{"duration": "12分钟","distance": "12公里"}
}
3.新增获取用户发送的定位点 字段 user_gps_info
内容格式为 {'lat': '104.069100' , 'lon': '30.647016' }
4.增加预到达信息 字段 predict_arrive_info
内容格式为
{"duration": "12分钟", # 预计时间 这里直接显示就行 带了单位的
"distance": "12公里"} # 距离
备注:
/api/ambulance/task/{id } to 字段为目的地标识
to返回有两种 'call_place'为发病地 也就是目前是去程 'hospital'为医院 也就是目前是返程
```
### 2021-07-15
#### 安卓端 gps定点数据推送 接口说明

```python
web端地址 https://new.dottmed.com/huaxicenter/ 可用于启动任务测试 只有川AB3Q01这台车是有效的 其他车不可调试
现在web端还没改好 暂时不可调试
1 .gps初始数据获取
从接口 patient内的 下面的都在patient内
car_gps_info:获取车载gps定位数据
user_gps_info:获取用户发送的gps数据 这两个返回null则说明当前无定位数据
格式如下 {'lat': '30.647016' , 'lon': '104.069100' } lat纬度 lon 经度
car_to 为去返程标识 值为'call_place'表示目前是去程 值为'hospital'表示目前是返程
预到达信息字段 predict_arrive_info
内容格式为
{"duration": "12分钟", # 预计时间 这里直接显示就行 带了单位的
"distance": "12公里"} # 距离
send_gps_user 发送定位的用户信息
"send_gps_user": {"username": "jack", "first_name": "", "id": 1}
"hospital_location":"30.646886,104.067835" # 医院位置
"scence_location": "30.646886,104.067835" # 发病地点定位 这个可能返回null
2. 上传gps数据
post /api/patient/update_patient_gps/{patient_id}/ 注意这里带患者id到路由
传参内容 {"lat":"xxx","lon":"xxx","send_gps_user":1, # 发送定位的用户id}
3. 监听websocket gps数据
发送 {"biz":"join_topic","topic":"patient_gps"} 加入房间获取gps数据推送 不加入不会收到推送
数据收取
{
"topic": "patient_gps", # 收到这个topic 说明是定位消息
"type":"user_send", # 定位的来源 这里user_send为用户发送的点 car_send 为车载gps发出的点
"patient_id": 15, # 用户id
"new_track":{ # 这里获取当前车辆位置
"lat": "30.647016", 纬度
"lon": "104.069100", 经度
"lng": "104.069100", 经度
"getTime": "2021-07-13 15:41:04" # 获取到定位的时间
},
"send_gps_user": {"username": "jack", "first_name": "", "id": 1}, # 发送gps的用户信息
"to":'call_place' # 当前前往的目的地 选项有 'hospital'和'call_place' ,
"predict_arrive_info":{"duration": "12分钟","distance": "12公里"}
}
# 完整消息示例
{"target": {"lat": "30.664479", "to": "call_place", "lon": "104.072222"}, "getTime": "2021-07-16 10:17:31", "pre_point": {"lat": "30.647016", "getTime": "2021-07-16 10:17:27", "lng": "104.069100"}, "car_number": "6666", "predict_arrive_info": {"duration": "3\u5206\u949f", "distance": "5.3\u516c\u91cc"}, "patient_id": 17, "topic": "patient_gps", "biz": "topic_msg", "imei": "868120260193310", "type": "car_send", "new_track": {"lat": "30.647240", "getTime": "2021-07-16 10:17:31", "lng": "104.068871", "lon": "104.068871"}}
```
### 2021-07-15
#### 新增websocket消息机制 基于主题设计 现用于gps定位数据推送
```python
需要监听某个主题的消息 首先websocket发送消息
{"biz":"join_topic","topic":"xxx"} # topic 内容根据业务替换
# 对某个主题发送消息
{"biz":"send_topic","topic":"xxx","data":{"hello":"world"}}
data内的内容会原封不动的返回给到客户端 例如这里客户端会收到 {"hello":"world"}
```
### 2021-07-15
#### 时间轴(后端备注用,前端忽略)
```python
不同病例转换后时间轴 可能会有问题 用getattr
```
### 2021-07-15
#### 布尔值搜索传参说明
```python
搜索传参说明 布尔值选项的传参 为True 和False 注意首字母大写
```
### 2021-07-13
#### 部署安装说明 (服务器用)
```python
注意 必须
WEB_SOCKET_URL 、WEB_SOCKET_TOKEN 两个参数
不然gps推送不起作用
```
### 2021-07-09
#### 数据总览接口
```python
接口地址 http://127.0.0.1:8000/api/patient/count/?count_period=month
# 顶部总计
&count_type=total_count
# 饼图类型
tran_hos_type 转院类型
is_start_mdt 是否启动mdt
come_from 来院方式
emergency_type 病历类型
筛选说明: 这里转院方式 和来院方式无法进行跳转 mdt的跳转需要判断一下name 这里name如果未填写返回null 否返回false字符串 是的话返回病历类型 1 2 3 9等字符串 需要手动拼下参数 mdt筛选字段名 patient__pre_warning__is_start_mdt
```
### 2021-07-08
#### 高级搜索接口说明
```python
# 胸痛新增筛选字段
出车单位 patient__out_car_depart
转院类型 tran_hos_type
绕行急诊 special_treat__is_pass_em
绕行CCU special_treat__is_pass_ccu
院前溶栓筛查 patient__inside_rescue_info_chestpain__lysis_exam
院内溶栓筛查 special_treat__stemi__lysis_exam
再灌注措施 stemi_treat_method
出院诊断 special_treat__out_diagnosis
出院或30天转归 special_treat__outcome
# 卒中高级搜索字段
上报状态 sync_china_cz_status
出车单位 转院类型 同胸痛
治疗类型 treatment_type
# 其他三个类无新增字段
```
### 2021-07-08
#### 卒中统计接口说明
```python
顶部总计 /api/apoplexy/count/?count_period=month&count_type=total_count
对应筛选使用 treatment_type 关键字如/api/apoplexy/?treatment_type=unknown
treatment_type 是id 对照表参考下图
# 其他饼图的统计类型如下
AIS静脉溶栓构成比 ais_rs
AIS介入再通构成比 ais_zt
DNT平均数变化趋势图 dntmean
DNT中位数变化趋势图 dntmedian
DPT平均数变化趋势图 dptmean
DPT中位数变化趋势图 dptmedian
来院 come_from
DNT延误原因构成比 dntdelayreason
转院类型构成比 tran_hos_type
TOAST分型构成比 toast
AIS介入再通术前HIHSS评分构成比 ais_nihss
出院时NIHSS评分构成比 aneu_nihss
```

### 2021-07-07
#### 增加中毒 创伤接口
```python
创伤 http://127.0.0.1:8000/api/trauma_rescue/count/?count_period=month
中毒 http://127.0.0.1:8000/api/toxic_rescue/count/?count_period=month
```
### 2021-07-07
#### 胸痛统计接口和统计详情跳转说明 胸痛这里时间段筛选都用 &created_time[]=2020-12-01&created_time[]=2021-12-01 这个格式传参
```python
# 初步诊断趋势图 http://127.0.0.1:8000/api/chestpain_rescue/count/?count_period=month
返回:[
{
"count": 0,
"detail": { # 各个类目详情
"unknown": 0, # unknown 为未填写的
"1": 0,
"3": 0,
"2": 0,
"5": 0,
"4": 0,
"7": 0,
"6": 0,
"8": 0
},
"month": "2021-02"
}
CP_DIAGNOSIS_CODE_CHOICES = (
("1", 'STEMI'),
("2", 'NSTEMI'),
("3", 'UA'),
("4", '主动脉夹层'),
("5", '肺动脉栓塞'),
("6", '非ACS心源性胸痛'),
("7", '其它非心源性胸痛'),
("8", '待查'),
)
# 初步诊断构成比 count_type=first_diagnosis
# 每个count_type的值 跟筛选方法的值是一样的 比如 这里是构成比count_type=first_diagnosis
# 那么筛选时 对应接口应该为 http://127.0.0.1:8000/api/chestpain_rescue/?first_diagnosis=1
# 1为下面 name返回 ↓↓
http://127.0.0.1:8000/api/chestpain_rescue/count/?count_period=month&count_type=first_diagnosis
返回
[
{
"count": 0,
"zh_name": "STEMI", # 中文名
"name": "1" # 用来跳转筛选的值 !!
},
]
# 构成比的结构都同上 count_type 分别有
come_from 来院方式
tran_hos_type 转院类型
d2wtype d2w构成比
gracescoretype grace评分构成比
d2wdelayreason d2w延误原因构成比
# 平均时间平均费用 count_type 分别有 注意这里跳转不用加筛选条件!
hosdaymean 平均住院天数
hosfeemean 平均住院费用
d2wmean d2w平均时间
返回体如下
[
{
"count": 0,
"month": "2021-02"
},
{
"count": 0,
"month": "2021-03"
},
]
```
### 2021-07-07
#### 增加基础急救统计接口/api/basic_rescue/count/ 删除旧的就出急救统计接口api/basic_rescue/data_statistic/data/
```python
# 接口查询方法
默认访问获得最近12月数据 http://127.0.0.1:8000/api/basic_rescue/count/?count_period=month
返回结构:
[
{
"count": 0,
"detail": { # 各个病种详情
"1": 0,
"9": 0,
"3": 0,
"2": 0,
"unknown": 0 # 病种未选择
},
"month": "2020-07"
},
]
# DISEASE_TYPE_CHOICES = (
('1', '消化道出血'),
('2', '房颤'),
('3', 'ECMO'),
('9', '其他'),
)
查找某段时间 http://127.0.0.1:8000/api/basic_rescue/count/?count_period=month&created_time[]=2020-12-01&created_time[]=2021-12-01
跳转到病历 https://new.dottmed.com/huaxiadmin/#/record/other?disease_type=1&month=2021-06-01
```
### 2021-07-02
#### 增加诊疗信息心电图上传说明
```python
查看心电图列表 api/device/ecg_pic/?patient_id=xxx 心电图机图片接口 xxx为 patient.id 注意不要搞错
更新对应的心电图 api/device/ecg_pic/{id} id为上面列表里面返回的id
主要字段为
patient_id = '患者id'
created_time = u'心电图时间'
diagnosis_time = u'诊断时间'
ecg_url_img = '心电图图片文件'
其他字段是心电图机上传用的 忽略不管
```
### 2021-07-02
#### 增加排班说明
```python
获取当前值班护士医生司机的即可偶 get /api/schedule/current_worker/
返回 {
"current_nurse": [ #护士
{
"username": "laowu", # 姓名
"first_name": "",
"id": 3 # id
}
],
"current_doctor": [], #医生
"current_driver": [ # 当前值班的司机列表
{
"name": "XIAOWU", #姓名
"id": 3
}
]
}
```
### 2021-07-02
#### 增加归档接口说明
```python
post /api/patient/patient/212/withdraw_arch/ 注意:212为patient.id
对应接口名
撤销 withdraw_arch /api/patient/patient/ {patientid}/withdraw_arch/
审核通过 accept_arch /api/patient/patient/{patientid}/accept_arch /
审核拒绝 refuse_arch
提交归档 ask_arch
返回
{
"msg": "已撤销归档申请!",
"arch_status": "0" # 归档状态
}
归档状态
ArchChoice = (("0", '未归档'),
("1", '已提交归档审核'),
("2", '归档已通过'),
("3", '归档已拒绝'),
)
```
### 2021-06-24
#### 增加司机排班
```python
# 访问接口 http://localhost:8000/api/schedule/driver/ 获取排班列表 默认返回本周的排班
# 使用参数schedule_day[] 获取指定日期范围排班 如 http://localhost:8000/api/schedule/driver/?schedule_day[]=2021-06-25&schedule_day[]=2021-06-25
# 更新特定排班 编辑排班是下拉框选择救护车 传个救护车id过来
http://localhost:8000/api/schedule/driver/{id} # 主要修改传参schedule_detail里列表里面每个ambulance的id
```
### 2021-06-23
#### 指挥中心数据统计接口
> 1.任务趋势图
默认start_time[]为空则为12个月的统计数据
时间筛选使用先后顺序的两个start_time[]传参
` http://127.0.0.1:8000/api/ambulance/task_count/?count_period=month&start_time[]=2020-12-01&start_time[]=2022-12-01`
返回结构
` [ { "count": 0, #总数 "start_time": "2020-12" #开始时间 }, { "count": 0, "start_time": "2021-01" }, ]`
> 2.各种饼图 传入 count_type 统计类型
统计类型有
emergency_type 出车急救类型 hospital 医院 nurse 随车护士 doctor 随车医生 car 车两名称 driver 司机名
` http://127.0.0.1:8000/api/ambulance/task_count/?count_period=month&start_time[]=2020-12-01&start_time[]=2021-06-20&count_type=car`
返回结构 主要字段count 数量 name 返回中文名 如司机名 车牌号 医院名称 注意: 急救类型name返回是1 2 3 .. 9 需要手动做映射成中文名
` [ { "count": 1, "ambulance__car_number": "32552", "name": "32552" }, { "count": 1, "ambulance__car_number": "65546", "name": "65546" }, ]`
### 2021-06-22
#### 卒中增加三个基本信息块说明
```python
使用原来的api/apoplexy 接口 内容放在patient里面传过来
卒中部分的 列表分诊级别筛选使用 由assist_exam_illness_grade 修改为illness_grade
列表显示的分诊级别的对应字段也需修改 修改同常规病例
```
### 2021-06-21
#### 增加胸痛急诊信息
```python
patient内 inside_rescue_info_chestpain 包含病情评估和院前溶栓治疗字段
not_into_hospital_reason 未入院原因 与是否入院同个地方
```
### 2021-06-18
#### 会诊消息列表病例名称对照表
```python
会诊消息显示那里 病例的对照表需要小改一下 api/huizhen/mine/接口内的patient内的patient_case字段
新的对照表如下:
胸痛由chestpain 修改为chestpainrescue
创伤由trauma 修改为 traumarescue
常规的 改成basicrescue
增加 中毒 toxicrescue
```
### 2021-06-17
#### 中毒和创伤接口
```python
中毒 和创伤的接口 目前所有的数据跟常规急救一样 把url地址改一下
中毒 api/toxic_rescue/ 创伤 /api/trauma_rescue/
```
### 2021-06-09
#### 心电图机等医疗设备接口
```python
/device/ecg_trends/?patient_id=xxxx 趋势表接口
/device/ifa/?patient_id=xxxx 荧光仪接口
/device/ecg_pic/?patient_id=xxx 心电图机图片接口
心电图机返回结构
{
"result": [
{
"created_time": "2021-06-02 14:03:52", # 检查时间
"ecg_url": "http://127.0.0.1:8000/media/ecg/_uuuuuu_20210602140352.jpg" #图片地址
}
]
}
```
### 2021-06-09
#### 救护车医疗设备盒子视频 转运id 返回
```python
patient.pre_ambulance_info 内的
device_video_url 救护车医疗设备盒子视频
transfer_uids 转运id
```
### 2021-06-09
#### 操作记录查询说明
```python
接口 http://127.0.0.1:8000/api/common/history/?table_name=basic_basicrescue&instance_id=80
通过table_name 表名 + 病例id 查询
table_name 对照表
卒中 apoplexy_apoplexy 常规急救basic_basicrescue 中毒为 传toxic_toxicrescue
胸痛为chestpainx_chestpainrescue 创伤为traumax_traumarescue
```
### 2021-06-08
#### 集成操作记录说明
```python
安装自写的包 drf-safe-jack==3.9.3
# settins.py
INSTALLED_APPS = [
...,
'track_actions',
]
MIDDLEWARE = [
... ,
'track_actions.requestMiddleware.RequestMiddleware',
]
python manage.py migrate track_actions
# url.py
url(u'^api/', include('track_actions.urls')),
# 即可在 api/history 目录下获取到所有的历史记录
```
### 2021-06-04
#### 新增mdt会诊签到 用户增加是否为mdt管理员字段is_mdt_admin
```python
签到接口 post http://127.0.0.1:8000/api/patient/mdt_sign/
参数 timestamp 当前时间戳如1622802934.037 patient_id 患者id
查看签到列表 http://127.0.0.1:8000/api/patient/mdt/?patient__id=1 1为患者id
web端二维吗生成说明 每隔10秒生成一次二维吗 二维码内容为 患者id+当前时间戳如 “1,1622802934.037” 逗号分割
安卓端扫码后 拿到这个字符串解析
```
### 2021-06-04
#### 新增会诊意见
```python
更新会诊意见接口 https://new.dottmed.com/api/huizhen/mine/20336/ 20336为房间号
使用patch方法 内容为
{
"opinion": "xxssss" # 会诊意见
}
```
### 2021-06-04
#### 修改put delete方法为post
```python
把所有的put delete方法改成post 请求 并在请求头加入method=put 或者method=delete
同时支持原有的方法
```
### 2021-06-01
#### 增加救护车任务结束接口
```python
GET /api/ambulance/view/{id}/end_task/
```
### 2021-05-31
#### 增加创建救护车任务接口 获取任务列表接口
```python
创建救护车任务
/ambulance/task/
传入司机driver id 救护车ambulance id 目的地经纬度 target_lon target_lat*
目的地完整地址包括省份信息由地图sdk获取 target_address
/查看任/ambulance/task/{id}
```
### 2021-05-28
#### 增加评分记录接口的说明
```python
接口位置 /api/common/score_record/ 这里是所有评分的保存位置
# 查找对应病例患者的评分细节使用 /api/common/score_record/?case_id=65&case_type=9&score_type=MEWS
case_id 是病例id case_type是病例类型 score_type是评分的类型 如MEWS
返回结果: {
"id": 7,
"case_id": 5,
"case_type": "9",
"score_type": "TRTS",
"score_data": "[{\"label\":\"意识状态\",\"value\":3,\"tab\":[{\"name\":\"4 = 13~15分\",\"value\":4},{\"name\":\"3 = 9~12分\",\"value\":3},{\"name\":\"2 = 6~8分\",\"value\":2},{\"name\":\"1 = 4~5分\",\"value\":1},{\"name\":\"0 = 3分\",\"value\":0}]},{\"label\":\"呼吸\",\"value\":3,\"tab\":[{\"name\":\"4 = 10~29\",\"value\":4},{\"name\":\"3 = >29\",\"value\":3},{\"name\":\"2 = 6~9\",\"value\":2},{\"name\":\"1 = 1~5\",\"value\":1},{\"name\":\"0 = 0\",\"value\":0}]},{\"label\":\"收缩压\",\"value\":1,\"tab\":[{\"name\":\"4 = >89\",\"value\":4},{\"name\":\"3 = 76~89\",\"value\":3},{\"name\":\"2 = 50~75\",\"value\":2},{\"name\":\"1 = 1~49\",\"value\":1},{\"name\":\"0 = 0\",\"value\":0}]}]"
}
更新对应的评分: 利用上面的id进行put更新即可
# 这里本来是打算web端做通用的网页给安卓调用的 但是现在没做
#所以这个score_type 跟 score_data 的定义跟结构要跟web端对一下 现在是由web端定义的
```
### 2021-05-19
##### 医疗设备数据接入
> 绘制时长说明
```python
pleth 波形
# 注意pleth 也就是数组一共5*60=300个数据包 50是基准线 每秒推送一次数据 页面长度5秒
ecg波形
# 0是基准线 如果是32767说明没有数据此时数据在基准线 每秒推送一次数据 页面长度为5秒
resp呼吸波形
# 范围为128到-128 超出自动截断 基准点是0 呼吸界面的时间长度是16秒
```
> 收到biz是medical_device的消息推送 从里面data拿数据 具体data的内容参考下面一个说明
```python
# websocket收到的格式
{"biz": "medical_device", "data": {}}
```
> data内容的说明
```python
# machine存放机器信息 含有MINDRAY_D-SERIES是心电监护仪 目前只有心电监护仪推数据
# patient放患者信息 通过patient_id来读取指定病人的数据 测试数据patient_id为空
# project_name 是对应的检查项目名称 参考下方检查项目中文名对照表
# project_data 存放检查数据
# msg_type 有两种 plain是普通的数据推送 wave是波形数据
# 1. plain普通数据返回如下
data = {'machine': {'machine_name': 'MINDRAY_D-SERIES-00A0370099002EAB-EUI-64'},
'patient': {'patient_id': ''},
'project_name': 'MDC_PRESS_CUFF_SYS',
# 对于数据不是波形数据的 msg_type是plain 这个project_name可以不用管 直接从project_data拿数据
'project_data': {
'MDC_PRESS_CUFF_SYS': '106',
'MDC_PRESS_CUFF_MEAN': '86',
'MDC_PRESS_CUFF_DIA': '76'},
'msg_type': 'plain'
}
#2.波形数据返回如下
data = {'machine':
{'machine_name': 'MINDRAY_D-SERIES-00A0370099002EAB-EUI-64'},
'patient': {'case_id': ''},
'project_name': 'MDC_PULS_OXIM_PLETH',
'project_data': {
'start': '2021-05-19T10:41:39', #开始时间
'end': '2021-05-19T10:41:40', # 结束时间
'data': ['59', '57', '55', '53', '51', '49', '47', '45', '43', '41', '39', '37', '35', '33', '29',
'27', '24', '22', '20', '17', '14', '11', '7', '3', '0', '2', '2', '5', '12', '21', '33',
'46', '58', '69', '77', '83', '85', '86', '85', '84', '83', '82', '81', '78', '76', '74',
'73', '71', '70', '70', '69', '69', '68', '67', '66', '64', '61', '59', '56', '54'],
'length': 60 # 每秒内总共给了多少个数据
},
'msg_type': 'wave'
}
```
> 中文名对照表
```python
DICTNAME_MAP = { # 缩略词对照表
# 这部分是波形的数据参考名 wave
"MDC_IMPED_TTHOR": "用于绘制RESP曲线数据",#
"MDC_ECG_ELEC_POTL_I": "I导联电压",
"MDC_ECG_ELEC_POTL_II": "II导联电压",
"MDC_ECG_ELEC_POTL_III": "III导联电压",
"MDC_ECG_ELEC_POTL_AVL": "AVL导联电压",
"MDC_ECG_ELEC_POTL_AVR": "AVR导联电压",
"MDC_ECG_ELEC_POTL_AVF": "AVF导联电压",
"MDC_ECG_ELEC_POTL_V1": "V1导联电压",
"MDC_ECG_ELEC_POTL_V2": "V2导联电压",
"MDC_ECG_ELEC_POTL_V3": "V3导联电压",
"MDC_ECG_ELEC_POTL_V4": "V4导联电压",
"MDC_ECG_ELEC_POTL_V5": "V5导联电压",
"MDC_ECG_ELEC_POTL_V6": "V6导联电压",
"MDC_PULS_OXIM_PLETH": "指尖容积Pleth曲线数据",
# 这里是plain里的值
"MDC_ECG_HEART_RATE": "心率HR",
"MDC_TTHOR_RESP_RATE": "呼吸RESP",
"MDC_PULS_OXIM_SAT_O2": "血氧饱和度spo2",
"MDC_PULS_OXIM_PULS_RAT": "脉率PR",
"MDC_PRESS_CUFF_SYS": "无创血压NIBP-收缩压(大)",
"MDC_PRESS_CUFF_DIA": "无创血压NIBP-舒张压(小)",
"MDC_PRESS_CUFF_MEAN": "无创血压NIBP-平均值",
}
```
### 2021-05-07
##### 新增病例切换接口
```python
详见 swagger /common/switchcase/ 说明
目前只有常规到卒中的接口生效,仅基础信息部分能同步,其他后续增加支持
```
##### 多选项添加的提醒 (for 后端)
```python
创建多对多后
需要在common/model 里面添加选项
需要在init_data 尾部添加选项
config接口才能搜索到
```
##### 常规病例修改点
> 下面的字段迁移到patient里面
```python
### 这部分字段统统放在patient里面 需要修改一下 对应取config的选项名也需要修改一下
come_from = models.CharField(
u'来院方式', choices=COME_FROM_CHOICES, max_length=1, null=True, blank=True)
disease_time = models.DateTimeField(u'发病时间(精确到分钟)', null=True, blank=True)
is_null_attack_detail_time = models.NullBooleanField(
'发病时间无法精确到分钟', null=True, blank=True, choices=COMMON_BOOLEAN_CHOICES)
disease_date = models.DateField(u'发病日期', null=True, blank=True)
disease_time_type = models.CharField(
u'发病时间类型', choices=TIME_TYPES, max_length=2, null=True, blank=True)
disease_address = models.CharField(
u'发病地址', choices=DISEASE_ADDR_CHOICES, max_length=20, null=True, blank=True)
disease_address_other = models.TextField(u'其他发病地址', null=True, blank=True)
disease_type = models.CharField(
'病种类型', choices=DISEASE_TYPE_CHOICES, max_length=2, null=True, blank=True, default='9')
```
### 2021-04-25
##### 增加呼叫管理功能相关接口
```python
# 接口1 呼叫管理分类列表 http://127.0.0.1:8000/api/call/typelist/
返回 {
"total": 1,
"name": "胸痛急救",
"value": "1"
},】
# 接口2 呼叫管理 新增 删除 列表 更新 详见swagger 操作同会诊新增删除 http://127.0.0.1:8000/api/call/manager/
呼叫列表筛洗条件 ?type=1 type是病历类型 值可以用接口1返回的值
```
### 2021-04-21
##### 其他急救数据统计
```python
# 接口地址
# http://127.0.0.1:8000/api/basic_rescue/data_statistic/data/
#=查询参数 start_time end_time
# 返回
{
"current_search": [], #搜索的结果
"recent_data": [] # 近一年的统计数据
}
```
### 2021-04-16
##### 对字符串类型的单选重定义,增加扩展性
```python
# 如下图所示 在config接口 查找job字段(目前只修改了这个字段,后面新增的字段都会按这个方法来做)
# 对于这种单选不确定的选项 我们提供几个默认值 用户可以点选,这部分逻辑跟之前一样没变
# 但是现在可以在点选框下面多加一个输入框 让用户任意输入自定义的选项值传过来
```

### 2021-04-14
##### 时间节点接口及数据统计接口说明
```python
# 数据统计接口 https://new.dottmed.com/api/chestpain/data_screening/
# https://new.dottmed.com/api/chestpain/data_screening_detail/?unit=month&start_time=2020-04-01&end_time=2021-04-01
# 基础急救时间节点 https://new.dottmed.com/api/basic_rescue/time_node/{id}/
```
##### 基础急救过滤字段
```python
'start_time',
'end_time',
'patient__gender',
'come_from', 来院方式
'patient__name',
'patient__pat_med_card', 门诊号
'patient__inpatient_no', 住院号
'is_huizhen', 是否为会诊
'illness_grade', 分诊级别
'disease_type', 疾病类型
"illness_grade", 分诊级别
# 说明illness_grade 为空时传unknown过来!
```
### 2021-04-13
##### 增加院前急救模块 位于patient模块precpr字段
```python
heart_attack_time = models.DateTimeField('心脏骤停发生时间', null=True, blank=True)
witness_start_pcr_time = models.DateTimeField('目击者启动CPR时间', null=True, blank=True)
# 注释掉的这部分字段应该是不可更改的 这里我映射对应病历的字段到这里!!!
# call_time = models.DateTimeField('呼救时间', null=True, blank=True)
# send_car_time = models.DateTimeField('派车时间', null=True, blank=True)
# car_start_time = models.DateTimeField('救护车出发时间', null=True, blank=True)
# arrive_scene_time = models.DateTimeField('到达现场时间', null=True, blank=True)
# leave_scene_time = models.DateTimeField('离开现场时间', null=True, blank=True)
# 重复的字段
doctor_start_pcr_time = models.DateTimeField('医务人员启动CPR时间', null=True, blank=True)
set_breath_way_time = models.DateTimeField('建立高级气道时间', null=True, blank=True)
set_breath_way_method = models.CharField('建立高级气道方式', choices=BREATH_WAY_CHOICES, max_length=50, null=True,
blank=True)
set_venous_way_time = models.DateTimeField('建立静脉通道时间', null=True, blank=True)
set_venous_way_method = models.CharField('建立静脉通道类型', choices=VENOUS_WAY_CHOICES, max_length=50, null=True,
blank=True)
first_use_drug_time = models.DateTimeField('第一次给药时间', null=True, blank=True)
first_use_drug_type = models.CharField('第一次给药类型', choices=USE_DRUG_CHOICES, max_length=50, null=True, blank=True)
first_use_drug_dose = models.CharField('第一次给药剂量',max_length=50, null=True, blank=True)
first_defibrate_time = models.DateTimeField('第一次除颤时间', null=True, blank=True)
first_defibrate_type = models.CharField('第一次除颤频次', choices=DEFIBRATE_CHOICES, max_length=50, null=True, blank=True)
rosc_time = models.DateTimeField('ROSC时间', null=True, blank=True)
heart_attack_reason = models.TextField('心脏骤停发生原因', null=True,blank=True)
heart_attack_patinet_status = models.TextField('心脏骤停发生时患者状态', null=True,blank=True)
heart_attack_address = models.CharField('心脏骤停发生地点', choices=HEARTATTACK_ADDRESS_CHOICES, max_length=50, null=True, blank=True)
heart_attack_init_hr = models.IntegerField('心脏骤停初始心率', null=True,blank=True)
```
##### 增加基础急救模块 模块结构基本同apoplexy模块
```python
#路由位置 /api/basic_rescue/
# 新增字段 has_cpr_pre 院前是否进行cpr
返回结构为:
{
.... 表层为基本信息字段及院前信息字段,
"assist_examination":"院内急救部分字段",
"vital_signs":"生命体征字段,院前院内都在这里",
}
## 表层字段说明:
# 基本急诊相关信息
come_from = models.CharField(
u'来院方式', choices=COME_FROM_CHOICES, max_length=1, null=True, blank=True)
illness_grade = models.CharField(
'分诊级别', choices=ILLNESS_GRADE_CHOICES, max_length=2, null=True, blank=True)
disease_time = models.DateTimeField(u'发病时间(精确到分钟)', null=True, blank=True)
is_null_attack_detail_time = models.NullBooleanField(
'发病时间无法精确到分钟', null=True, blank=True, choices=COMMON_BOOLEAN_CHOICES)
disease_date = models.DateField(u'发病日期', null=True, blank=True)
disease_time_type = models.CharField(
u'发病时间类型', choices=TIME_TYPES, max_length=2, null=True, blank=True)
disease_address = models.CharField(
u'发病地址', choices=DISEASE_ADDR_CHOICES, max_length=20, null=True, blank=True)
disease_address_other = models.TextField(u'其他发病地址', null=True, blank=True)
disease_type = models.CharField(
'病种类型', choices=DISEASE_TYPE_CHOICES, max_length=2, null=True, blank=True)
# 这部分字段是院前的统统不要放在这里 这里应该是一个总表 不放太多具体的字段
# 院前部分!
call_time = models.DateTimeField('呼救时间', null=True, blank=True)
send_car_time = models.DateTimeField('派车时间', null=True, blank=True)
car_start_time = models.DateTimeField('救护车出发时间', null=True, blank=True)
arrive_scene_time = models.DateTimeField('到达现场时间', null=True, blank=True)
leave_scene_time = models.DateTimeField('离开现场时间', null=True, blank=True)
car_number = models.CharField('车牌号', max_length=50, null=True, blank=True)
car_nurse = models.CharField('随车护士', max_length=50, null=True, blank=True)
car_doctor = models.CharField('出车医生', max_length=50, null=True, blank=True)
has_cpr_pre = models.NullBooleanField(
'是否进行院前心肺复苏', null=True, blank=True, choices=COMMON_BOOLEAN_CHOICES)
## assit_exam 字段
hospital_arrive_time = models.DateTimeField(u'到达本院大门时间', null=True, blank=True)
triage_time = models.DateTimeField(u'急诊分诊时间', null=True, blank=True)
triage_nurse = models.CharField(u'分诊台护士', max_length=50, null=True, blank=True)
register_time = models.DateTimeField(u'挂号时间', null=True, blank=True)
last_modified = models.DateTimeField(u'最近更新时间', auto_now=True)
# 入院情况部分 # todo patient的 住院科室应该从这里拿 his也是同步到这里
into_hospital_status = models.NullBooleanField('入院情况', blank=True)
not_into_hospital_reason = models.CharField(
'未入院原因及去向', choices=NOT_INSIDE_CHOICES, max_length=2, null=True, blank=True)
leave_emergency_time = models.DateTimeField('离开急诊科时间', null=True, blank=True)
into_hospital_time = models.DateTimeField('入院时间', null=True, blank=True)
get_certificate_time = models.DateTimeField('开入院证时间', null=True, blank=True)
返回结构如图:
```

### 2021-04-01
##### 增加腕带到达推送websocket提醒
```python
# 发送的数据包内容位 根据biz wrist_arrive 和病人的id来判断是否需要刷新
{'biz': 'wrist_arrive','patient_id':xxx}
```
### 2021-03-29
##### 到达医院大门时间
```python
hospital_arrive_time 在apoplexy接口内assist_examination字段里面
time_node 接口 返回
('ODT(发病~到院)', 'ODT'), ODT 为filed_name
('ONT(发病~溶栓)', 'ONT'),
('DNT(入院~溶栓)', 'DNT'),
('DPT(入院~穿刺)', 'DPT'),
('DRT(入院~血管再通)', 'DRT'),
```
##### 新增文章上传模块
```python
# 查看文章目录
http://127.0.0.1:8000/api/article/article_category/
# 文章列表
http://127.0.0.1:8000/api/article/article/?category_id=2
返回值中的url为文章detail的链接
# web端采用富文本编辑器
具体参考龙洞项目
```
##### 新增报告链接字段
```python
# 都在apoplexy接口内assist_examination字段里面
ecg_report = models.TextField('心电图报告链接', null=True, blank=True)
liver_kidney_electrolyte_report = models.TextField('生化报告链接', null=True, blank=True)
coagulation_report = models.TextField('凝血报告链接', null=True, blank=True)
blood_report = models.TextField('血常规报告链接', null=True, blank=True)
collect_blood_report = models.TextField('快速血糖血气报告链接', null=True, blank=True)
biomarker_report = models.TextField('心肌标志物报告链接', null=True, blank=True)
color_ct_report = models.TextField('彩超报告链接', null=True, blank=True)
ct_report = models.TextField('CT报告链接', null=True, blank=True)
```
### 2021-03-27
##### 呼叫管理功能
```python
# 这里是从account/user里面进行筛选拿数据
如 https://new.dottmed.com/api/account/users/?teams=488&channel_type=1
teams是病例类型 channel_type是 绿通类型
```

##### 增加新api文档迁移到 /swagger/ 这个目录下
```python
# 访问地址 https://new.dottmed.com/swagger/
```
##### 用户account增加绿通类型
```python
# 具体选项在https://new.dottmed.com/api/common/config/ 这个接口里面查找channel_type
# 所有有选项的都是在这里面拿
channel_type = models.CharField(
'绿色通道类型', choices=CHANNEL_CHOICES, max_length=2, default='1')
```
##### 卒中apoplexy接口新增发病时间无法精确到分钟
```python
// 前端这里参考胸痛修改即可
is_null_attack_detail_time = models.NullBooleanField(
'发病时间无法精确到分钟', null=True, blank=True, choices=COMMON_BOOLEAN_CHOICES)
disease_date = models.DateField(u'发病日期', null=True, blank=True)
disease_time_type = models.CharField(
u'发病时间类型', choices=TIME_TYPES, max_length=2, null=True, blank=True)
```
##### timenode 新增ODT字段
```python
('ODT(发病~到院)', 'ODT'),
```
### 2021-03-26
#### 安卓端新字段说明
```python
# apoplexy 接口
disease_address = models.CharField(
u'发病地址', choices=DISEASE_ADDR_CHOICES, max_length=20, null=True, blank=True)
strok_pre_symptom 发病症状
strok_pre_symptom_other = models.CharField('其他发病症状', max_length=200, null=True, blank=True)
# apoplexy接口内 examination字段内
out_center_time = models.DateTimeField('出卒中中心时间', null=True, blank=True)
ncx_area = models.IntegerField(
'出血大小', validators=[validate_ncx_area_range], null=True, blank=True)
ncx_l_site 出血部位左侧
ncx_r_site 出血部位右侧
yx_lnxg_check 颅内血管检查
ncx_cause 脑出血病因诊断
```
### 2021-03-25
#### cdss调websocket所需参数接口
```js
// 接口地址 : http://127.0.0.1:8000/api/common/cdss_info/ {patient_id}/
// 传入patient的id即可
// 示例
var axios = require('axios');
var data = JSON.stringify({
"wristlet": "100",
"field": "arrive_emrescue_room_time"
});
var config = {
method: 'get',
url: 'http://127.0.0.1:8000/api/common/cdss_info/16/',
headers: {
'authorization': 'Token c0088f3dc7798579d8d356e83587e59e4e75043e',
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
```
### 2021-03-19
#### 获取腕带信息 快速记录腕带时间完善说
> 获取接口返回以下内容
```python
data['illness_grade'] =patient.illness_grade
data['case_type'] = 'apoplexy'
data['first_nerve_recieve_time'] = patient.apoplexy.assist_examination.first_nerve_recieve_time
data['first_nerve_arrive_time'] = patient.apoplexy.assist_examination.first_nerve_arrive_time
data['rs_talking_time'] = patient.apoplexy.thrombolysis.talking_time
data['rs_sign_time'] = patient.apoplexy.thrombolysis.sign_time
data['rs_medication_time'] = patient.apoplexy.thrombolysis.medication_time
data['jr_send_to_catheter_time'] = patient.apoplexy.therapy.send_to_catheter_time # 送导管室时间
data['jr_talk_time'] = patient.apoplexy.therapy.talk_time
data['jr_sign_time'] = patient.apoplexy.therapy.sign_time
data['jr_embolectomy_time'] = patient.apoplexy.therapy.embolectomy_time
data['intra_acknowlege_images'] = patient.apoplexy.thrombolysis.intra_acknowlege_images.all()
data['inter_acknowlege_images '] = patient.apoplexy.therapy.inter_acknowlege_images.all()
```
> 更新接口加入前缀即可!
### 2021-03-19
##### 增加pre_ecg、inside_ecg传值说明
> 传值用 pre_ecg_in 取值用pre_ecg 传值inside_ecg_in 取值inside_ecg
> 救护车出发时间字段car_start_time已修复
##### 增加扫码快速填写相关字段
> 溶栓谈话字段加上 rs_ 介入导管字段加上jr_前缀
> 溶栓、介入知情同意书图片字段位于其他接口 见下
```python
# 溶栓相关字段
talking_time = models.DateTimeField('静脉溶栓开始谈话时间', null=True, blank=True)
sign_time = models.DateTimeField('患者/家属签字时间', null=True, blank=True)
medication_time = models.DateTimeField('开始静脉溶栓时间', null=True, blank=True)
# 介入导管相关字段
send_to_catheter_time = models.DateTimeField('送导管室时间', null=True, blank=True)
talk_time = models.DateTimeField('开始知情谈话时间', null=True, blank=True)
sign_time = models.DateTimeField('介入治疗家属签字时间', null=True, blank=True)
embolectomy_time = models.DateTimeField('开始介入治疗时间', null=True, blank=True)
```
##### 溶栓、介入知情同意书图片字段
```python
intra_acknowlege_images 溶栓知情同意书图片 位于apoplexy/thrombolysis接口
inter_acknowlege_images 介入治疗知情同意书图片 位于 apoplexy/threapy接口
```
### 2021-03-16
##### 更新分诊等级筛选字段
> 使用unknown来筛选分诊等级为空的病例
```js
apoplexy/?assist_examination__illness_grade=unknown
```
##### 腕带信息查询 更新接口
> 查询腕带信息
http://127.0.0.1:8000/api/chestpain/get_wrist_info/?wristlet=100
> 更新腕带信息
```json
http://127.0.0.1:8000/api/chestpain/update_arrive_time/
{"wristlet":"100","field":"arrive_emrescue_room_time"}
```
#### 11:36:16
> 会诊房间命名 胸痛10开头 卒中20开头 创伤30开头
##### 会诊列表 返回病例id illness_grade
```json
"patient": {
"case_id": 16, // 病例id
"illness_grade": null ,
"case_tpe":"apoplexy" //返回病例类型
},
```
### 2021-03-15
#### 心电图字段
> 默认上传格式 图片放在imgs里面 这里传值用 pre_ecg_in 取值用pre_ecg 传值inside_ecg_in 取值inside_ecg
```json
"pre_ecg": [
{
"imgs": [],
"ecg_fetch_time": null,
"ecg_diagnosis_time": null
}
],
"inside_ecg": [
{
"imgs": [],
"ecg_fetch_time": null,
"ecg_diagnosis_time": null
}
```
#### 卒中vitalsign体征内新增院前的字段
> 在原来字段前加上pre前缀
```python
# 院前生命体征
pre_conscious = models.CharField(
'院前意识', choices=CONSCIOUS_CHOICES, max_length=2, null=True, blank=True)
pre_breathe = models.IntegerField('院前呼吸(次/分钟)', null=True, blank=True)
pre_pulse = models.IntegerField('院前脉搏(次/分钟)', null=True, blank=True)
pre_heart_rate = models.IntegerField('院前心率(次/分钟)', null=True, blank=True)
pre_hight_mmhg = models.IntegerField('院前收缩压(mmHg)', null=True, blank=True)
pre_bottom_mmhg = models.IntegerField('院前舒张压(mmHg)', null=True, blank=True)
pre_temperature = models.CharField(u'院前体温(℃)', max_length=15, null=True, blank=True)
pre_height = models.FloatField('院前身高(cm)', null=True, blank=True)
pre_weight = models.FloatField('院前体重(kg)', null=True, blank=True)
pre_quickly_blood_sugar = models.FloatField('院前快速血糖', null=True, blank=True)
pre_bmi = models.FloatField('院前BMI', null=True, blank=True)
pre_blood_oxygen = models.FloatField('血氧饱和度', null=True, blank=True)
pre_ecg_collect_time = models.DateTimeField('院前心电采集时间', null=True, blank=True)
pre_ecg_diagnosis_time = models.DateTimeField('院前心电确诊时间', null=True, blank=True)
pre_troponin = models.FloatField('院前肌钙蛋白', null=True, blank=True)
pre_left_pupil = models.FloatField('院前左瞳孔', null=True, blank=True)
pre_right_pupil = models.FloatField('院前右瞳孔', null=True, blank=True)
pre_light_reflex = models.CharField(
'院前对光反射', choices=LIGHT_REFLEX_CHOICES, max_length=2, null=True, blank=True)
# 主诉及症状
symptoms_multi = models.ManyToManyField(
SymptomsMulti, related_name='vital_signs', verbose_name=u'主诉及症状', blank=True)
collect_blood_time = models.DateTimeField('快速血糖时间', null=True, blank=True)
pre_collect_blood_time = models.DateTimeField('院前快速血糖时间', null=True, blank=True)
delivery_time = models.DateTimeField('送检时间', null=True, blank=True)
```
#### 卒中apoplexy接口内新增字段
##### 基本信息
```python
# 基本信息 院前
car_start_time = models.DateTimeField('救护车出发时间', null=True, blank=True)
car_doctor = models.CharField('出车医生', max_length=50, null=True, blank=True)
car_arrive_time = models.DateTimeField('120到达时间', null=True, blank=True)
in_hospital_time = models.DateTimeField('住院时间', null=True, blank=True)
in_hospital_department = models.CharField('住院科室', max_length=50, null=True, blank=True)
strok_pre_symptom = models.ManyToManyField(
'apoplexy.StrokPreSymptomMultiChoices',
related_name='apoplexy_strok_pre_symptom',
blank=True)
strok_pre_symptom_other = models.CharField('其他卒中预警症状', max_length=200, null=True, blank=True)
```
#### 卒中examination接口内新增字段
> 位于apoplexy接口内 assist_examination字段 或 examination接口 内
##### 入院出院字段
```python
# 神内会诊
ask_nerve_huizhen_time = models.DateTimeField('通知神内会诊时间', null=True, blank=True)
first_nerve_recieve_time = models.DateTimeField('神内一线医生接诊时间', null=True, blank=True)
first_nerve_arrive_time = models.DateTimeField('神经内科会诊到达时间', null=True, blank=True)
first_nerve_doctor = models.CharField('神内一线医生', max_length=50, null=True, blank=True)
into_hospital_status = models.NullBooleanField('入院情况', blank=True)
not_into_hospital_reason = models.CharField(
'未入院原因及去向', choices=NOT_INSIDE_CHOICES, max_length=2, null=True, blank=True)
leave_emergency_time = models.DateTimeField('离开急诊科时间', null=True, blank=True)
into_hospital_time = models.DateTimeField('入院时间', null=True, blank=True)
into_nerve_time = models.DateTimeField('进入神经内科病房时间', null=True, blank=True)
into_nerve2_time = models.DateTimeField('进入神经内科2病房时间', null=True, blank=True)
into_nerve3_time = models.DateTimeField('进入神经内科3病房时间', null=True, blank=True)
into_nerve_sur_time = models.DateTimeField('进入神经外科病房时间', null=True, blank=True)
get_certificate_time = models.DateTimeField('开入院证时间', null=True, blank=True)
arrive_icu_time = models.DateTimeField('到达ICU时间', null=True, blank=True)
```
##### 常规检查部分
```python
# 检验医嘱信息 下医嘱 执行 采样 收养 出报告
collect_blood_advice_time = models.DateTimeField('首次测指尖血糖/血气分析医嘱时间', null=True, blank=True)
blood_advice_time = models.DateTimeField('开具血细胞分析医嘱时间', null=True, blank=True)
coagulation_advice_time = models.DateTimeField('开具术前凝血常规医嘱时间', null=True, blank=True)
liver_kidney_advice_time = models.DateTimeField('开具生化1-6医嘱时间', null=True, blank=True)
biomarker_advice_time = models.DateTimeField('开具心肌标志物医嘱时间', null=True, blank=True)
# 血气血糖时间
collect_blood_time = models.DateTimeField('快速血糖血气实际采血时间', null=True, blank=True)
collect_blood_send_time = models.DateTimeField('快速血糖血气采样时间', null=True, blank=True)
collect_blood_recieve_time = models.DateTimeField('快速血糖血气收样时间', null=True, blank=True)
collect_blood_report_time = models.DateTimeField('快速血糖血气报告时间', null=True, blank=True)
# 血常规
blood_time = models.DateTimeField('血常规实际采血时间', null=True, blank=True)
blood_send_time = models.DateTimeField('血常规采样送检时间', null=True, blank=True)
blood_recieve_time = models.DateTimeField('血常规检验室收样时间', null=True, blank=True)
blood_report_time = models.DateTimeField('血常规检验报告时间', null=True, blank=True)
blood_start_time = models.DateTimeField('血常规检验开始时间', null=True, blank=True)
blood_doctor = models.CharField('血常规检验医生', max_length=50, null=True, blank=True)
# 凝血
coagulation_time = models.DateTimeField('凝血检验实际采血时间', null=True, blank=True)
coagulation_send_time = models.DateTimeField('凝血检验采样时间', null=True, blank=True)
coagulation_recieve_time = models.DateTimeField('凝血检验收样时间', null=True, blank=True)
coagulation_report_time = models.DateTimeField('凝血检验出报告时间', null=True, blank=True)
coagulation_doctor = models.CharField('凝血功能检验医生', max_length=50, null=True, blank=True)
# 生化时间
liver_kidney_electrolyte_time = models.DateTimeField(
'生化检验实际采血时间', null=True, blank=True)
liver_kidney_electrolyte_send_time = models.DateTimeField(
'生化检验采样时间时间', null=True, blank=True)
liver_kidney_electrolyte_recieve_time = models.DateTimeField(
'生化检验收样时间时间', null=True, blank=True)
liver_kidney_electrolyte_report_time = models.DateTimeField(
'生化检验出报告时间', null=True, blank=True)
liver_kidney_electrolyte_check_time = models.DateTimeField(
'生化检验开始时间', null=True, blank=True)
liver_kidney_electrolyte_doctor = models.CharField(
'生化检验医生', max_length=50, null=True, blank=True)
# 心肌标志物
biomarker_time = models.DateTimeField('心肌标志物采血时间', null=True, blank=True)
biomarker_send_time = models.DateTimeField('心肌标志物采样时间', null=True, blank=True)
biomarker_recieve_time = models.DateTimeField('心肌标志物收样时间', null=True, blank=True)
biomarker_report_time = models.DateTimeField('心肌标志物报告时间', null=True, blank=True)
# 肌钙蛋白
troponin_time = models.CharField('肌钙蛋白时间', max_length=50, null=True, blank=True)
troponin_value = models.FloatField('肌钙蛋白值', null=True, blank=True)
```
##### CT彩超部分
```python
color_ct_advice_time = models.DateTimeField('开具彩超医嘱时间', null=True, blank=True)
color_ct_notice_time = models.DateTimeField('通知彩超室时间', null=True, blank=True)
color_ct_check_time = models.DateTimeField('彩超检查时间', null=True, blank=True)
color_ct_result_time = models.DateTimeField('彩超出结果时间', null=True, blank=True)
ct_atient_time = models.DateTimeField('患者到达CT1室时间', null=True, blank=True)
ct_atient_time_2 = models.DateTimeField('患者到达CT2室时间', null=True, blank=True)
ct_atient_time_3 = models.DateTimeField('患者到达CT3室时间', null=True, blank=True)
ct_atient_time_4 = models.DateTimeField('患者到达CT4室时间', null=True, blank=True)
arrive_micu_time = models.DateTimeField('到达MICU时间', null=True, blank=True)
arrive_nicu_time = models.DateTimeField('到达NICU时间', null=True, blank=True)
arrive_eicu_time = models.DateTimeField('到达EICU时间', null=True, blank=True)
arrive_emsg_room_time = models.DateTimeField('到达急诊手术室时间', null=True, blank=True)
arrive_emrescue_room_time = models.DateTimeField('到达抢救室时间', null=True, blank=True)
ct_report_time = models.DateTimeField('CT报告时间', null=True, blank=True)
ct_start_time = models.DateTimeField('CT执行时间', null=True, blank=True)
ct_scan_time = models.DateTimeField('CT扫描时间/首张图像时间', null=True, blank=True)
ct_end_time = models.DateTimeField('CT扫描结束时间', null=True, blank=True)
# 改名为:开具医嘱套餐时间
ct_head_time = models.DateTimeField('开具CT医嘱时间', null=True, blank=True)
```
#### 11:04:52
* apoplexy接口 增加筛选条件 assist_examination__illness_grade
* apoplexy接口 增加 assist_examination 检查字段 可在这里对所有的检查字段进行统一上传
### 2021-03-03
#### 15:42:40
* 是否进行静脉溶栓根据治疗类型来判断,生成word中未溶栓默认不勾选
```python
res = {"is_medication": 429 in apoplexy.treatment_type and True or None,} # 这两个字段根据 治疗类型 来返回值
```
#### 12:47:51
* 新增就诊号返回, patient.admid
* 修复质控单字段
### 服务器部署说明
* 2021-03-03 12:57:11
#### 字体安装(pdf转换用)
```bash
# C:\Windows\Fonts
sudo cp /home/zsy/DENG* /usr/share/fonts
cd /usr/share/fonts
sudo chmod 644 *
sudo fc-cache -fv
#或者使用
yum -y install fontconfig
fc-cache # 刷新字体
```
#### libreoffice 安装(pdf转换用)
```bash
tar -zxvf LibreOffice_6.4.6_Linux_x86-64_rpm.tar.gz
cd LibreOffice_6.4.6.2_Linux_x86-64_rpm/RPMS
rpm -ivh *
ln -s /usr/bin/libreoffice6.4 /usr/bin/libreoffice
ln -s /usr/bin/libreoffice6.4 /usr/bin/lowriter
# 离线安装依赖包 相互依赖的包需同时安装
https://wwa.lanzous.com/i5AO9mew1la
```
#### 其他指令(非必须)
##### 内网调试接口
```bash
curl -v -X DELETE 192.168.221.131/api/account/auth/
curl -v -X POST 192.168.221.131/api/apoplexy/88/
```
### gitlab ci集成方法 (3步骤)
#### gitlab-runner配置
```bash
https://gitlab.dottmed.com/emergency/huaxi_server/settings/ci_cd 在这里获取注册的参数
sudo gitlab-ci-multi-runner register 注册一下
sudo gitlab-ci-multi-runner restart
sudo gitlab-ci-multi-runner list 检查项目有没有开
```
#### 配置gitlab-ci root权限
```bash
sudo nano /etc/systemd/system/gitlab-runner.service
修改excutestart 最后用户名为root
sudo systemctl daemon-reload
sudo systemctl restart gitlab-runner
sudo service gitlab-runner restart
```
#### 配置本地的git权限
```bash
git config --global credential.helper store
添加本地缓存 手动获取clone 输入一次密码即可!
在每个项目目录下使用
sudo nano .git/config 配置账号密码 https://username:password@git.dev.tencent.com/xxx/xxx.git
```