HL7 FHIR库

fhir的Python项目详细描述


#版权所有(c)2014 Luis Falcon
由自由软件基金会出版的SE,许可证的第3版或任何更高版本。

。有关详细信息,请参阅GNU通用公共许可证。

如果没有,请参见http://www.gnu.org/licenses/>;




fhir python包的相关信息
您可以在萨凡纳的Mercurial服务器上获得最新的开发版本[3]



1.-http://www.hl7.org/fhir
2.-http://www.health.gnu.org
3.-http://www.http://www.savannah.gnu.org/hgweb/health/>

示例用法:




<1)搜索交互
>2)阅读交互
>3)创建交互






<1)1)搜索交互
2)阅读交互
3)创建交互


<35;搜索互动

>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>rest=restffulffhir('http://fhir.healthcinterfaces.com.au/open.au/open''xml')
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>rest=rest=rest=rest.rest=>>>>>>>>>>>>>>>>>>>>>>>>>是的xml version="1.0"encoding="utf-8"?&
<;feed xmlns="http://www.w3.org/2005/atom"gt;
<;title>;搜索资源类型患者的搜索结果;lt;title>;
<;id>;urn:uuiid:8b018fb9-7df4-4e1b-9f4b-8a34495555d86<;id>;
<;link http://fhir.healthcinterfaces.com.au/open/rel="fhir base库库库库库库库库库库库库库库库库库库库库库库库;
<;lt;lt;link http://http://fhir.fhir.fhir.http://http://www.f健康交集网站。au/open/patient/u搜索?搜索ID=49F23DF4-3B9A-4117-9726-41D2AA3256&;amp;amp;标识符=55567890&;amp;amp;搜索排序='u id" rel="self" />>;
<;更新>;2014-03-30t03:2014-03-30t03:51:25z<;更新>;
<;totalresults xmlns;
<;totalresults xmlns="http://a9.com///spec/opensearch/1.1/">;1<;<;<;totalresults>;
<;lt;totalresults xmlns;http://www.w3.www.w3./atom">;
<;标题>;庭院"1046"版"1"版<;lt;lt;lt;lt;id>;
<;lt;id>;http://fhir.healthcinterfaces.com.au/open/patient/1046<;lt;id>;
<;lt;lt;lt;lt;lt;lt;lt;lt;lt;lt;lt;http://fhir.healthcinterfaces.com.au/open/patient/1046/u历史/1" rel="自我" />>;
<;更新>;2014-03-30t03-30t03:3:47:37z<;更新<;更新<;lt;更新>;
>;
<;lt;作者第19.13条<;name>;
<;author>;
<;published>;2014-03-30t03:51:25z<;published>;
<;content type="text/xml">;
<;patient xmlns="http://hl7.org/fhir">;
<;identifier>;
<;use value="normal"/>;
<;label value="ssn"/>;
<;value="55567890"/>;
<;identifier>;
<;name>;
<;use value="official"/>;
<;family value="ana"/>;
<;given value="betz"/>;
<;name>;
<;gender>;
<;coding>;
<;system value="http://hl7.org/fhir/v3/administrativegende"r" /><;code value="f" />>;
<;display value="female" />>;
<;coding>;
<;gender>;
<;birthdate value="1985-10-04" />>;
<;decadedboolean value="false" />>;
<;active value="true"/>;
<;/patient>;
<;/content>;
<;summary type="xhtml">;
<;div xmlns="http://www.w3.org/1999/xhtml">;--此资源没有摘要--<;&div>;
<;/summary>;
<;/entry>;
<;/feed>;


######################################################################

2) ###### Read interaction ##############

>>> from fhir import *

>>> rest = RestfulFHIR('http://fhir.healthintersections.com.au/open', 'xml')
>>> query = rest.read('Patient', 1046)
>;>print query
<;response[200]>;
>;>print query.text
<;?xml version="1.0"encoding="utf-8"?>;
<;patient xmlns="http://hl7.org/fhir">;
<;identifier>;
<;use value="normal"/>;
<;label value="ssn"/>;
<;value="55567890"/>;
<;identifier>;
<;name>;
<;use value="official"/>;
<;family value="ana"/>;
<;给定值="betz"/>;
<;/名称>;
<;性别>;
<;编码>;
<;系统值="http://hl7.org/fhir/v3/administrativegender"/>;
<;代码值="f"/>;
<;显示值="阴性"/>;
<;编码>;
<;/gender>;
<;birthdate value="1985-10-04"/>;
<;decadedboolean value="false"/>;
<;active value="true"/>;
<;patient>;


如果资源ID不存在,将生成404响应

t>>rest=restfulfhir('http://fhir.healthcombices.com.au/open','xml')
>;>query=rest.read('patient',210834)
>;>print query
<;response[404]>;
>;>print query.text
<;?xml version="1.0"encoding="utf-8"?>;
<;operationoutcome xmlns="http://hl7.org/fhir">;
<;text>;
<;status value="generated"/>;
<;div xmlns="http://www.w3.org/1999/xhtml">;
<;p>;resource id"patient/210834"不存在<;/p>;
<;/div>;
<;/text>;
<;lt;issue>;
<;severity value="error/>>;
<;details value="resource id&;quot;patient/210834&;quot;不存在">>;
<;issue>;
<;operationoutcome>;











在患者个人档案上创建互动;在患者个人档案上创建互动;在患者个人档案上创建互动。来自FH的ir import*
>;>import json


患者资源的xml数据元素
hn<;/family>;<;/name>;<;/patient>;"

intersections.com.au/open')
>;>query=rest.create('patient',body)
>;>print query
<;response[201]>;
>;>print query.text
{
"resourcetype":"operationoutcome",
"text":{
"status":"generated",
"div":"\r\n<;divxmlns=\"http://www.w3.org/1999/xhtml\">The operation was succesful</div>"
}
}


########################################################################

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java Spinner选定值未上载到firebase数据库   java如何通过bukkit中的配置添加消息?   java在SharedReference中保存列表的泛型类型   javascript Java小程序未定义   swt在Java中构建控制台应用程序   java OAuth同意屏幕没有突然显示,没有错误?   java webview选择文件安卓不工作   java Spring boot JPA如何从同一连接添加多个数据库?   java JDBC DB2驱动程序计时器线程处于阻塞状态   java我在vscode中运行flatter时看到一个错误在phone中运行应用程序somone能否帮助我plz   Java:生成JSON:如何避免生成不完整的JSON   java Date compareTo()方法始终返回1   当使用Junit runner运行测试时,java Spring自动连线失败   java Android/Sockets如何将信息从主UI线程发送到socket线程?   java Android内存声明全局变量   java如何在JBoss中拥有多个具有相同JNDI名称的数据源?   python在Java中嵌入CPython时,为什么会挂起?   java如何提供深度模拟对象?   java“find:smallint,expected:integer”Hibernate对informix数据库的验证在短时间内失败