HISUI
HOS系统中集成HIS消息的步骤
2022年10月19日 08时57分

一、编写查询消息的类方法

在iMedical中编写查询消息的类方法,用于HOS中获得消息信息,返回的消息JSON格式见此处说明

/// @param {String} userCode 用户工号
/// @param {String} postCode 岗位编码
/// @param {String} orgCode  组织编码,科室编码
/// 入参格式不固定,基础平台会通过HOS入参名称注入到入参中。
/// 如:ClassMethod MessageTest(postCode = ""){}也可以得到入参
/// 如:ClassMethod MessageTest(userCode = ""){}也可以得到入参
ClassMethod MessageTest(userCode = "", postCode = "", orgCode = "")
{
    Set obj = {"code":200,"data":50,"msg":"","success":true,"userCode":(userCode),"postCode":(postCode),"orgCode":(orgCode)}
    w obj.%ToJSON()
    q ""
}

二、在HIS中创建服务

为了实现安全访问iMedical系统中页面,需要对入口进行统一管理。使用管理员进入iMedical系统,在【侧菜单】-【系统配置】–【系统接口管理】界面上维护接口方法

2.1 记录下接口代码(hosGetMessageTest

系统接口管理
配置好后,可以使用POST方法访问https://ip:port/imedical/rest/hos/接口代码来调用类方法,入参为HOS发送过来的请求参数

消息服务测试

2.2 记录下接口子路径(/message/test

subpath

此时访问rest服务为:

POST https://114.251.235.22:1443/imedical/rest/hos/message/test HTTP/1.1
Content-Type: application/x-www-form-urlencoded

userCode=1001&postCode=1002

配置子路径后,代码形式https://114.251.235.22:1443/imedical/rest/hos/hosGetMessageTest不可再使用

三、在HOS中创建消息组件

在HOS中注册消息组件时,应用系统选择【HIS系统】,在链接地址上必须按照/接口代码格式配置参数,如下图:
HOS挂入HIS消息

上一篇: 下一篇:

发表评论

您的电子邮箱地址不会被公开。 必填项已用 * 标注

访问量: 379659