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迭代集合   java Tomcat请求因超时而取消   如何在java主程序的后台实现事件侦听器?   java使用正则表达式进行拆分,但将第一个数组元素作为空白   java从Documentum查询中读取自定义双精度值   java Android:位图内存不足错误   java Lucene复合查询搜索   java如何修复Struts DispatchAction上的StackOverflower错误?   用于从字符串中捕获数字的java正则表达式   java如何禁用来自外部jar的类或包的记录器   java“调用init方法失败;嵌套异常为javax.persistence.PersistenceException”是什么意思?   异步任务中的java Volatile和Synchronized   互联网上的java UDP。它是如何工作的?   java如何禁用“RMI TCP连接”日志记录?   安卓在Java中除以两个整数会得到0还是100?   spring boot如何在JAVA中的3个实体之间使用乐观锁定   matlab如何在Java中创建空格,轻松运行程序,并查看不同代码段的不同颜色以使其可读?   java无法解析类com。云蜂。哈德逊。插件。文件夹文件夹   java转换时区指定为GMT的日期字符串