文章 Lilian Huang · 七月 18 2m read

Fhir-丙型肝炎预测应用

大家好!

本文主要丰富了上一篇文章的内容,并介绍了应用程序的使用方法。

也许您已经读过上一篇文章,但我还是想说,
在完成初始化操作(包括模型创建和训练)后,Fhir HepatitisC Predict 应用程序将预测丙型肝炎(HepatitisC)。

首先

您需要在应用程序上输入一些信息,当然,只是一些检查结果,不包括隐私数据

SHOW显示

点击显示按钮,将显示该指标的数据是否在正常范围内,指标是高还是低。当然,每个指标的数据范围都是通过查询信息获得的,可能与实际范围略有不同。

Prediction预测

完成信息输入后,点击预测实际上涉及到应用程序中的许多操作。

1. 将发送的 JSON 格式检查结果转换为 FHIR 资源(对部分患者基本信息和其他隐私数据使用模拟数据)
2. 通过 FHIR Server 提供的 API 接口(ip: port/hir/r4/)将转换后的 FHIR 资源注册到 FHIR 资源库,类似于使用 Postman 进行接口调用。需要注意的是,将内容类型设为 application/JSON+fhir

ClassMethod HTTPSend(IPAddress As%String, Port As%String, Url As%String, Body As%String, Output HttpResponse As%String(MAXLEN=256000)) As%Status
{
	
	Set httpRequest=##class(%Net.HttpRequest).%New()
	Do httpRequest.SetHeader("Content-Type","application/json+fhir")
	Do httpRequest.SetHeader("Accept","*/*")
    Set httpRequest.Port=Port
    Set httpRequest.Server=IPAddress
    Set httpRequest.Https=0Set httpRequest.Timeout=600Set httpRequest.ContentCharset="UTF-8"Set httpRequest.ContentEncoding="UTF-8"d httpRequest.EntityBody.Write(Body)
    Set status=httpRequest.Post(Url)
    IF 'status {
	    Set HttpResponse = "Connection failed, call exception"return"Connection failed, call exception:"_$SYSTEM.Status.GetErrorText(status)
	}
    Set response = httpRequest.HttpResponse
    Set ResponseData = response.Data
    Set HttpResponse=""while 'ResponseData.AtEnd{
	    Set HttpResponse=HttpResponse_ResponseData.Read()
    }

    return$$$OK
}

  1. 然后,使用训练有素的模型来预测数据,就可以看到预测结果了。

当然,这也完成了预测。