wanghaisheng / fhir-cn

FHIR中文版 the Chinese translation of FHIR
https://github.com/FHIR-CN/fhir-spec-ZhCN
72 stars 23 forks source link

分页功能 #39

Open wanghaisheng opened 9 years ago

wanghaisheng commented 9 years ago

在search时候,使用_count 参数可以指定每页返回的数量 但同时spec要求 Bundle.link.relation=self返回查询请求的完整url,同时使用 Bundle.link.relation=first、previous、next、last来表示其他页的查询结果,但是Bundle.link.url应该是怎么样的构造呢 1、第一种 2.1.0.19 Paging

2、第二种是

<link>
<relation value="first" />
<url value="http://fhir-dev.healthintersections.com.au/open/Patient/_search?search-id=75609fab-76fd-4c59-b8ee-d696af325c&&search-sort=_id&search-offset=0&_count=50" />
</link>
<link>
<relation value="next" />
<url value="http://fhir-dev.healthintersections.com.au/open/Patient/_search?search-id=75609fab-76fd-4c59-b8ee-d696af325c&&search-sort=_id&search-offset=50&_count=50" />
</link>
<link>
<relation value="last" />
<url value="http://fhir-dev.healthintersections.com.au/open/Patient/_search?search-id=75609fab-76fd-4c59-b8ee-d696af325c&&search-sort=_id&search-offset=250&_count=50" />
</link>

3、第三种 { "relation": "next", "url": "http://fhirtest.uhn.ca/baseDstu2?_getpages=e8ec8c11-404f-42b8-a0ab-95f926263171&_getpagesoffset=10&_count=10&_pretty=true" }