12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019 |
- {
- "swagger": "2.0",
- "info": {
- "title": "sws xcx api doc",
- "description": "圣卫士小程序API接口文档\n",
- "version": "1.0.0",
- "contact": {},
- "license": {
- "name": "领透科技"
- }
- },
- "basePath": "/xcx",
- "paths": {
- "/api/device/binddevice": {
- "post": {
- "tags": [
- "api/device"
- ],
- "description": "绑定设备\n\u003cbr\u003e",
- "operationId": "DeviceApiController.BindDevice",
- "parameters": [
- {
- "in": "query",
- "name": "qrcode",
- "description": "设备二维码",
- "required": true,
- "type": "string"
- }
- ],
- "responses": {
- "200": {
- "description": "success"
- },
- "500": {
- "description": "error"
- }
- },
- "security": [
- {
- "token": []
- }
- ]
- }
- },
- "/api/device/getdevicedetail": {
- "get": {
- "tags": [
- "api/device"
- ],
- "description": "根据设备ID获取设备详细信息\n\u003cbr\u003e",
- "operationId": "DeviceApiController.GetDeviceDetail",
- "parameters": [
- {
- "in": "query",
- "name": "deviceid",
- "description": "设备ID",
- "required": true,
- "type": "integer",
- "format": "int64"
- }
- ],
- "responses": {
- "200": {
- "description": "success",
- "schema": {
- "$ref": "#/definitions/models.Device"
- }
- },
- "500": {
- "description": "error"
- }
- },
- "security": [
- {
- "token": []
- }
- ]
- }
- },
- "/api/device/getmydevices": {
- "get": {
- "tags": [
- "api/device"
- ],
- "description": "获取绑定的设备列表\n\u003cbr\u003e",
- "operationId": "DeviceApiController.GetMyDevices",
- "responses": {
- "200": {
- "description": "success",
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/models.Device"
- }
- }
- },
- "500": {
- "description": "error"
- }
- },
- "security": [
- {
- "token": []
- }
- ]
- }
- },
- "/api/device/unbinddevice": {
- "post": {
- "tags": [
- "api/device"
- ],
- "description": "解绑设备\n\u003cbr\u003e",
- "operationId": "DeviceApiController.UnBindDevice",
- "parameters": [
- {
- "in": "query",
- "name": "deviceid",
- "description": "设备ID",
- "required": true,
- "type": "integer",
- "format": "int64"
- }
- ],
- "responses": {
- "200": {
- "description": "success"
- },
- "500": {
- "description": "error"
- }
- },
- "security": [
- {
- "token": []
- }
- ]
- }
- },
- "/api/sysdic/getcheckitems": {
- "get": {
- "tags": [
- "api/sysdic"
- ],
- "description": "获取检测项目列表\n\u003cbr\u003e",
- "operationId": "SysDicApiController.GetCheckItems",
- "responses": {
- "200": {
- "description": "success",
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/models.CheckItem"
- }
- }
- },
- "500": {
- "description": "error"
- }
- }
- }
- },
- "/api/sysdic/getdevicetypes": {
- "get": {
- "tags": [
- "api/sysdic"
- ],
- "description": "获取设备类型列表\n\u003cbr\u003e",
- "operationId": "SysDicApiController.GetDeviceTypes",
- "responses": {
- "200": {
- "description": "success",
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/models.DicResp"
- }
- }
- },
- "500": {
- "description": "error"
- }
- }
- }
- },
- "/api/sysdic/getillness": {
- "get": {
- "tags": [
- "api/sysdic"
- ],
- "description": "获取病情字典\n\u003cbr\u003e",
- "operationId": "SysDicApiController.GetIllness",
- "responses": {
- "200": {
- "description": "success",
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/models.DicResp"
- }
- }
- },
- "500": {
- "description": "error"
- }
- }
- }
- },
- "/api/sysdic/getrenalstatus": {
- "get": {
- "tags": [
- "api/sysdic"
- ],
- "description": "获取肾功能情况列表\n\u003cbr\u003e",
- "operationId": "SysDicApiController.GetRenalStatus",
- "responses": {
- "200": {
- "description": "success",
- "schema": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/models.DicResp"
- }
- }
- },
- "500": {
- "description": "error"
- }
- }
- }
- },
- "/api/user/gethealthprofile": {
- "get": {
- "tags": [
- "api/user"
- ],
- "description": "获取健康档案\n\u003cbr\u003e",
- "operationId": "UserApiController.GetHealthProfile",
- "responses": {
- "200": {
- "description": "success",
- "schema": {
- "$ref": "#/definitions/models.HealthProfileResp"
- }
- },
- "500": {
- "description": "error"
- }
- },
- "security": [
- {
- "token": []
- }
- ]
- }
- },
- "/api/user/getuserinfo": {
- "get": {
- "tags": [
- "api/user"
- ],
- "description": "获取个人中心信息\n\u003cbr\u003e",
- "operationId": "UserApiController.GetUserInfo",
- "responses": {
- "200": {
- "description": "success",
- "schema": {
- "$ref": "#/definitions/models.UserInfoResp"
- }
- },
- "500": {
- "description": "error"
- }
- },
- "security": [
- {
- "token": []
- }
- ]
- }
- },
- "/api/user/login": {
- "post": {
- "tags": [
- "api/user"
- ],
- "description": "微信小程序登录\n\u003cbr\u003e",
- "operationId": "LoginApiController.WxXcxLogin",
- "parameters": [
- {
- "in": "body",
- "name": "body",
- "description": "小程序登录请求参数",
- "required": true,
- "schema": {
- "$ref": "#/definitions/models.WxXcxLoginReq"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "",
- "schema": {
- "$ref": "#/definitions/models.WxXcxLoginResp"
- }
- },
- "500": {
- "description": "error"
- }
- }
- }
- },
- "/api/user/savehealthprofile": {
- "post": {
- "tags": [
- "api/user"
- ],
- "description": "保存健康档案\n\u003cbr\u003e",
- "operationId": "UserApiController.SaveHealthProfile",
- "parameters": [
- {
- "in": "body",
- "name": "body",
- "description": "小程序登录请求参数",
- "required": true,
- "schema": {
- "$ref": "#/definitions/models.SaveHealthProfileReq"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "success"
- },
- "500": {
- "description": "error"
- }
- },
- "security": [
- {
- "token": []
- }
- ]
- }
- },
- "/api/user/saveuserinfo": {
- "post": {
- "tags": [
- "api/user"
- ],
- "description": "个人中心保存用户信息和透析病友信息\n\u003cbr\u003e",
- "operationId": "UserApiController.SaveUserInfo",
- "parameters": [
- {
- "in": "body",
- "name": "body",
- "description": "小程序登录请求参数",
- "required": true,
- "schema": {
- "$ref": "#/definitions/models.SaveUserInfoReq"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "success"
- },
- "500": {
- "description": "error"
- }
- },
- "security": [
- {
- "token": []
- }
- ]
- }
- },
- "/api/user/updatephonebycode": {
- "post": {
- "tags": [
- "api/user"
- ],
- "description": "获取小程序绑定的手机号码并更新到用户信息\n\u003cbr\u003e",
- "operationId": "UserApiController.UpdatePhoneByCode",
- "parameters": [
- {
- "in": "body",
- "name": "body",
- "description": "小程序登录请求参数",
- "required": true,
- "schema": {
- "$ref": "#/definitions/models.WxXcxLoginReq"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "success",
- "schema": {
- "$ref": "#/definitions/models.XcxUser"
- }
- },
- "500": {
- "description": "error"
- }
- },
- "security": [
- {
- "token": []
- }
- ]
- }
- }
- },
- "definitions": {
- "models.CheckItem": {
- "title": "CheckItem",
- "type": "object",
- "properties": {
- "check_item_number": {
- "description": "排序",
- "type": "integer",
- "format": "int64"
- },
- "check_type": {
- "description": "检测类型(试纸类型)",
- "type": "string"
- },
- "ctime": {
- "description": "创建时间",
- "type": "string",
- "format": "datetime"
- },
- "delete_flag": {
- "description": "删除标志",
- "type": "integer",
- "format": "int64"
- },
- "details": {
- "description": "描述",
- "type": "string"
- },
- "device_type": {
- "description": "设备类型",
- "type": "string"
- },
- "id": {
- "description": "检测项目ID",
- "type": "integer",
- "format": "int64"
- },
- "language": {
- "description": "cn: 中文 en 英文",
- "type": "string"
- },
- "mtime": {
- "description": "更新时间 ",
- "type": "string",
- "format": "datetime"
- },
- "name_cn": {
- "description": "检测项目中文名",
- "type": "string"
- },
- "name_en": {
- "description": "检测项目英文名",
- "type": "string"
- },
- "reference_value": {
- "description": " 参考值",
- "type": "string"
- },
- "remark": {
- "description": "备注",
- "type": "string"
- },
- "scope_list": {
- "description": "范围value 值,type =1为正常、2及以上为异 常",
- "type": "string"
- },
- "text": {
- "description": "文本",
- "type": "string"
- },
- "unit": {
- "description": "单位",
- "type": "string"
- }
- }
- },
- "models.Device": {
- "title": "Device",
- "type": "object",
- "properties": {
- "batch_number": {
- "description": "批号",
- "type": "integer",
- "format": "int64"
- },
- "ctime": {
- "description": "创建时间",
- "type": "string",
- "format": "datetime"
- },
- "delete_flag": {
- "description": "删除标志",
- "type": "integer",
- "format": "int64"
- },
- "device_name": {
- "description": "设备名称",
- "type": "string"
- },
- "device_type": {
- "description": "设备类型",
- "type": "string"
- },
- "emq_password": {
- "description": "emq密码",
- "type": "string"
- },
- "id": {
- "description": "设备ID",
- "type": "integer",
- "format": "int64"
- },
- "inform_type": {
- "description": "通知类型:0跳转小程序、1跳转网页 、默认跳转小程序",
- "type": "integer",
- "format": "int64"
- },
- "language": {
- "description": "语言",
- "type": "string"
- },
- "mac": {
- "type": "string"
- },
- "mcu": {
- "type": "string"
- },
- "mcu_type": {
- "description": "MCU芯片类型",
- "type": "string"
- },
- "mtime": {
- "description": "更新时间 ",
- "type": "string",
- "format": "datetime"
- },
- "name": {
- "description": "设备名称",
- "type": "string"
- },
- "number": {
- "description": "序号",
- "type": "integer",
- "format": "int64"
- },
- "oem_company": {
- "description": "厂商(0:自营 1:艾玛OEM)",
- "type": "integer",
- "format": "int64"
- },
- "paper_check": {
- "description": "试纸检查状态",
- "type": "integer",
- "format": "int64"
- },
- "production_date_number": {
- "description": "生产日期",
- "type": "integer",
- "format": "int64"
- },
- "qr_code": {
- "type": "string"
- },
- "sensor_mode": {
- "description": "传感放大倍数",
- "type": "string"
- },
- "serialno": {
- "description": "设备编号",
- "type": "string"
- },
- "status": {
- "description": "状态(0:未分配 1:已分配 2:包装中 3:待出厂 6:废弃 99:已出厂 100:销售中 101:已售出)",
- "type": "integer",
- "format": "int64"
- },
- "ver": {
- "description": "软件版本",
- "type": "string"
- },
- "wifi_ver": {
- "description": "WIFI版本",
- "type": "string"
- }
- }
- },
- "models.DicResp": {
- "title": "DicResp",
- "type": "object",
- "properties": {
- "name": {
- "description": "字典名称",
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "value": {
- "description": "字典值",
- "type": "integer",
- "format": "int64"
- }
- }
- },
- "models.HealthProfileResp": {
- "title": "HealthProfileResp",
- "type": "object",
- "properties": {
- "birthday": {
- "$ref": "#/definitions/models.Time",
- "description": "生日"
- },
- "blood_type": {
- "description": "血型",
- "type": "string"
- },
- "creatine_time": {
- "$ref": "#/definitions/models.Time",
- "description": "肌酐检测时间"
- },
- "creatinine": {
- "description": "血肌酐",
- "type": "integer",
- "format": "int64"
- },
- "creatinine_unit": {
- "description": "肌酐单位(umol/L,mg/dl)",
- "type": "string"
- },
- "ctime": {
- "$ref": "#/definitions/models.Time",
- "description": "创建时间"
- },
- "gender": {
- "description": "性别(0:未知 1:男 2:女)",
- "type": "integer",
- "format": "int64"
- },
- "height": {
- "description": "身高",
- "type": "integer",
- "format": "int64"
- },
- "id": {
- "description": "Primary Key ID",
- "type": "integer",
- "format": "int64"
- },
- "illness_state": {
- "description": "病情",
- "type": "string"
- },
- "mtime": {
- "$ref": "#/definitions/models.Time",
- "description": "更新时间 "
- },
- "renal_function_status": {
- "description": "肾功能情况(0:未透析,1: 血液透析,2:腹膜透析,3:肾脏移植)",
- "type": "integer",
- "format": "int64"
- },
- "status": {
- "description": "状态(1:有效 0:无效 )",
- "type": "integer",
- "format": "int64"
- },
- "urine_protein": {
- "description": "尿蛋白",
- "type": "integer",
- "format": "int64"
- },
- "urine_protein_24h": {
- "description": "24小时尿蛋白",
- "type": "integer",
- "format": "int64"
- },
- "urine_protein_24h_time": {
- "$ref": "#/definitions/models.Time",
- "description": "24小时尿蛋白检测时间"
- },
- "urine_protein_24h_unit": {
- "description": "24小时尿蛋白单位(g/24h,mg/24h)",
- "type": "string"
- },
- "urine_protein_time": {
- "$ref": "#/definitions/models.Time",
- "description": "尿蛋白检测时间"
- },
- "urine_protein_unit": {
- "description": "尿蛋白单位(g,mg)",
- "type": "string"
- },
- "weight": {
- "description": "体重",
- "type": "integer",
- "format": "int64"
- }
- }
- },
- "models.SaveHealthProfileReq": {
- "title": "SaveHealthProfileReq",
- "type": "object",
- "properties": {
- "birthday": {
- "description": "生日 yyyy-MM-dd HH:mm:ss",
- "type": "string"
- },
- "blood_type": {
- "description": "血型",
- "type": "string"
- },
- "creatine_time": {
- "description": "肌酐检测时间 yyyy-MM-dd HH:mm:ss",
- "type": "string"
- },
- "creatinine": {
- "description": "血肌酐",
- "type": "integer",
- "format": "int64"
- },
- "creatinine_unit": {
- "description": "肌酐单位(umol/L,mg/dl)",
- "type": "string"
- },
- "gender": {
- "description": "性别(0:未知 1:男 2:女)",
- "type": "integer",
- "format": "int64"
- },
- "height": {
- "description": "身高",
- "type": "integer",
- "format": "int64"
- },
- "illness_state": {
- "description": "病情",
- "type": "string"
- },
- "renal_function_status": {
- "description": "肾功能情况(0:未透析,1: 血液透析,2:腹膜透析,3:肾脏移植)",
- "type": "integer",
- "format": "int64"
- },
- "urine_protein": {
- "description": "尿蛋白",
- "type": "integer",
- "format": "int64"
- },
- "urine_protein_24h": {
- "description": "24小时尿蛋白",
- "type": "integer",
- "format": "int64"
- },
- "urine_protein_24h_time": {
- "description": "24小时尿蛋白检测时间 yyyy-MM-dd HH:mm:ss",
- "type": "string"
- },
- "urine_protein_24h_unit": {
- "description": "24小时尿蛋白单位(g/24h,mg/24h)",
- "type": "string"
- },
- "urine_protein_time": {
- "description": "尿蛋白检测时间 yyyy-MM-dd HH:mm:ss",
- "type": "string"
- },
- "urine_protein_unit": {
- "description": "尿蛋白单位(g,mg)",
- "type": "string"
- },
- "weight": {
- "description": "体重",
- "type": "integer",
- "format": "int64"
- }
- }
- },
- "models.SaveUserInfoReq": {
- "title": "SaveUserInfoReq",
- "type": "object",
- "properties": {
- "avatar": {
- "description": "头像",
- "type": "string"
- },
- "email": {
- "description": "邮件",
- "type": "string"
- },
- "id_card": {
- "description": "身份证号",
- "type": "string"
- },
- "inpatient_reg_phone": {
- "description": "住院登记手机号",
- "type": "string"
- },
- "nick_name": {
- "description": "昵称",
- "type": "string"
- },
- "phone": {
- "description": "手机号码",
- "type": "string"
- },
- "real_name": {
- "description": "真实姓名",
- "type": "string"
- }
- }
- },
- "models.Time": {
- "title": "Time",
- "type": "object"
- },
- "models.UserInfoResp": {
- "title": "UserInfoResp",
- "type": "object",
- "properties": {
- "avatar": {
- "description": "头像",
- "type": "string"
- },
- "ctime": {
- "$ref": "#/definitions/models.Time",
- "description": "创建时间"
- },
- "email": {
- "description": "邮件",
- "type": "string"
- },
- "id": {
- "description": "Primary Key ID",
- "type": "integer",
- "format": "int64"
- },
- "id_card": {
- "description": "身份证号",
- "type": "string"
- },
- "inpatient_reg_phone": {
- "description": "住院登记手机号",
- "type": "string"
- },
- "mtime": {
- "$ref": "#/definitions/models.Time",
- "description": "更新时间 "
- },
- "nick_name": {
- "description": "昵称",
- "type": "string"
- },
- "open_id": {
- "description": "OpenID",
- "type": "string"
- },
- "patient_id": {
- "type": "integer",
- "format": "int64"
- },
- "phone": {
- "description": "手机号码",
- "type": "string"
- },
- "privacy_protocol_versions": {
- "description": "隐私政策版本",
- "type": "integer",
- "format": "int64"
- },
- "real_name": {
- "description": "真实姓名",
- "type": "string"
- },
- "source": {
- "description": "用户来源",
- "type": "string"
- },
- "status": {
- "description": "状态(1:有效0:无效)",
- "type": "integer",
- "format": "int64"
- },
- "union_id": {
- "description": "unionid",
- "type": "string"
- },
- "user_org_id": {
- "type": "integer",
- "format": "int64"
- }
- }
- },
- "models.WxXcxLoginReq": {
- "title": "WxXcxLoginReq",
- "type": "object",
- "properties": {
- "code": {
- "type": "string"
- }
- }
- },
- "models.WxXcxLoginResp": {
- "title": "WxXcxLoginResp",
- "type": "object",
- "properties": {
- "openid": {
- "type": "string"
- },
- "patient_id": {
- "type": "integer",
- "format": "int64"
- },
- "token": {
- "type": "string"
- },
- "user_org_id": {
- "type": "integer",
- "format": "int64"
- }
- }
- },
- "models.XcxUser": {
- "title": "XcxUser",
- "type": "object",
- "properties": {
- "avatar": {
- "description": "头像",
- "type": "string"
- },
- "ctime": {
- "description": "创建时间",
- "type": "string",
- "format": "datetime"
- },
- "email": {
- "description": "邮件",
- "type": "string"
- },
- "id": {
- "description": "Primary Key ID",
- "type": "integer",
- "format": "int64"
- },
- "mtime": {
- "description": "更新时间 ",
- "type": "string",
- "format": "datetime"
- },
- "nick_name": {
- "description": "昵称",
- "type": "string"
- },
- "open_id": {
- "description": "OpenID",
- "type": "string"
- },
- "patient_id": {
- "type": "integer",
- "format": "int64"
- },
- "phone": {
- "description": "手机号码",
- "type": "string"
- },
- "privacy_protocol_versions": {
- "description": "隐私政策版本",
- "type": "integer",
- "format": "int64"
- },
- "role_type": {
- "description": "角色类型 0或空:普通 1:管理员 2:测试",
- "type": "integer",
- "format": "int64"
- },
- "session_key": {
- "type": "string"
- },
- "source": {
- "description": "用户来源",
- "type": "string"
- },
- "status": {
- "description": "状态(1:有效 0: 无效)",
- "type": "integer",
- "format": "int64"
- },
- "union_id": {
- "description": "unionid",
- "type": "string"
- },
- "user_org_id": {
- "type": "integer",
- "format": "int64"
- }
- }
- }
- },
- "securityDefinitions": {
- "token": {
- "type": "apiKey",
- "name": "Authorization",
- "in": "header"
- }
- }
- }
|