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如何在Extjs的不同页面中使用相同的存储   java Jung,大顶点的布局重叠,图形出现在奇怪的位置   java如何在Android中通过画布绘制圆?   java验证库设计模式选择   java研磨机未知标记“timedTests”   java Android领域子类实例方法   java使用resteasy/jaxrs从请求负载接收两种类型的数据   缓冲策略Java缓冲策略有时不能正确绘制   java跟踪棋子   密度无关像素如何在java中锐化图像缩略图?   java如何在MongoDB更新查询中编写(或)更新   java A*寻路游戏系统退出问题   java在安卓中读取xml的最佳方式是什么?   通过反射调用的方法的java抑制警告   安卓 java。语言错误:信号11(SIGSEGV),代码10(?),故障地址006e006f   java lombok 1.18.2使用DexBuilderForDebug抛出TransformClasses   java JOptionPane CD对话框按钮?   java只返回json中的一些值,而不是完整实体对象   java包不存在错误,请稍后重试