Skip to content

Commit a406cdd

Browse files
committed
Hotfix for CapabilityStatement support.
1 parent c05eb51 commit a406cdd

File tree

7 files changed

+422
-3
lines changed

7 files changed

+422
-3
lines changed

Gemfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
source 'https://rubygems.org'
22
ruby RUBY_VERSION
3+
4+
# gem 'fhir_models', :path => '../fhir_models'
5+
36
gemspec
47

58
group :test do

fhir_client.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
2222

2323
spec.add_dependency 'activesupport', '>= 3'
2424
spec.add_dependency 'addressable', '>= 2.3'
25-
spec.add_dependency 'fhir_models', '>= 1.6.6'
25+
spec.add_dependency 'fhir_models', '>= 1.6.8'
2626
spec.add_dependency 'nokogiri'
2727
spec.add_dependency 'oauth2', '~> 1.1'
2828
spec.add_dependency 'rack', '>= 1.5'

lib/fhir_client/client.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,14 @@ def get_oauth2_metadata_from_conformance
162162
options
163163
end
164164

165+
# Method returns a capability statement for the system queried.
166+
def capability_statement(format = @default_format)
167+
conformance_statement(format)
168+
end
169+
165170
# Method returns a conformance statement for the system queried.
166171
# @return
167-
def conformance_statement(format = FHIR::Formats::ResourceFormat::RESOURCE_XML)
172+
def conformance_statement(format = @default_format)
168173
if @cached_conformance.nil? || format != @default_format
169174
try_conformance_formats(format)
170175
end

lib/fhir_client/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module FHIR
22
class Client
3-
VERSION = '1.6.7'
3+
VERSION = '1.6.8'
44
end
55
end
Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
{
2+
"resourceType": "CapabilityStatement",
3+
"id": "example",
4+
"text": {
5+
"status": "generated",
6+
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n \n <p>The EHR Server supports the following transactions for the resource Person: read, vread, \n update, history, search(name,gender), create and updates.</p>\n \n <p>The EHR System supports the following message: admin-notify::Person.</p>\n \n <p>The EHR Application has a \n <a href=\"http://fhir.hl7.org/base/Profilebc054d23-75e1-4dc6-aca5-838b6b1ac81d/_history/b5fdd9fc-b021-4ea1-911a-721a60663796\">general document profile</a>.\n </p>\n \n </div>"
7+
},
8+
"url": "68D043B5-9ECF-4559-A57A-396E0D452311",
9+
"version": "20130510",
10+
"name": "ACME EHR CapabilityStatement statement",
11+
"status": "draft",
12+
"experimental": true,
13+
"date": "2012-01-04",
14+
"publisher": "ACME Corporation",
15+
"contact": [
16+
{
17+
"name": "System Administrator",
18+
"telecom": [
19+
{
20+
"system": "email",
21+
"value": "wile@acme.org"
22+
}
23+
]
24+
}
25+
],
26+
"description": "This is the FHIR CapabilityStatement statement for the main EHR at ACME for the private interface - it does not describe the public interface",
27+
"purpose": "Main EHR CapabilityStatement statement, published for contracting and operational support",
28+
"copyright": "Copyright © Acme Healthcare and GoodCorp EHR Systems",
29+
"kind": "instance",
30+
"software": {
31+
"name": "EHR",
32+
"version": "0.00.020.2134",
33+
"releaseDate": "2012-01-04"
34+
},
35+
"implementation": {
36+
"description": "main EHR at ACME",
37+
"url": "http://10.2.3.4/fhir"
38+
},
39+
"fhirVersion": "1.0.0",
40+
"acceptUnknown": "both",
41+
"format": [
42+
"xml",
43+
"json"
44+
],
45+
"rest": [
46+
{
47+
"mode": "server",
48+
"documentation": "Main FHIR endpoint for acem health",
49+
"security": {
50+
"cors": true,
51+
"service": [
52+
{
53+
"coding": [
54+
{
55+
"system": "http://hl7.org/fhir/restful-security-service",
56+
"code": "SMART-on-FHIR"
57+
}
58+
]
59+
}
60+
],
61+
"description": "See Smart on FHIR documentation",
62+
"certificate": [
63+
{
64+
"type": "application/jwt",
65+
"blob": "IHRoaXMgYmxvYiBpcyBub3QgdmFsaWQ="
66+
}
67+
]
68+
},
69+
"resource": [
70+
{
71+
"type": "Patient",
72+
"profile": {
73+
"reference": "http://fhir.hl7.org/base/Profile7896271d-57f6-4231-89dc-dcc91eab2416"
74+
},
75+
"interaction": [
76+
{
77+
"code": "read"
78+
},
79+
{
80+
"code": "vread",
81+
"documentation": "Only supported for patient records since 12-Dec 2012"
82+
},
83+
{
84+
"code": "update"
85+
},
86+
{
87+
"code": "history-instance"
88+
},
89+
{
90+
"code": "create"
91+
},
92+
{
93+
"code": "history-type"
94+
}
95+
],
96+
"versioning": "versioned-update",
97+
"readHistory": true,
98+
"updateCreate": false,
99+
"conditionalCreate": true,
100+
"conditionalUpdate": false,
101+
"conditionalDelete": "not-supported",
102+
"searchInclude": [
103+
"Organization"
104+
],
105+
"searchRevInclude": [
106+
"Person"
107+
],
108+
"searchParam": [
109+
{
110+
"name": "identifier",
111+
"definition": "http://hl7.org/fhir/SearchParameter/Patient-identifier",
112+
"type": "token",
113+
"documentation": "Only supports search by institution MRN",
114+
"modifier": [
115+
"missing"
116+
]
117+
},
118+
{
119+
"name": "careprovider",
120+
"definition": "http://hl7.org/fhir/SearchParameter/Patient-careprovider",
121+
"type": "reference",
122+
"target": [
123+
"Organization"
124+
],
125+
"modifier": [
126+
"missing"
127+
],
128+
"chain": [
129+
"name",
130+
"identifier"
131+
]
132+
}
133+
]
134+
}
135+
],
136+
"interaction": [
137+
{
138+
"code": "transaction"
139+
},
140+
{
141+
"code": "history-system"
142+
}
143+
],
144+
"compartment": [
145+
"http://hl7.org/fhir/compartment/Patient"
146+
]
147+
}
148+
],
149+
"messaging": [
150+
{
151+
"endpoint": [
152+
{
153+
"protocol": {
154+
"system": "http://hl7.org/fhir/message-transport",
155+
"code": "mllp"
156+
},
157+
"address": "mllp:10.1.1.10:9234"
158+
}
159+
],
160+
"reliableCache": 30,
161+
"documentation": "ADT A08 equivalent for external system notifications",
162+
"event": [
163+
{
164+
"code": {
165+
"system": "http://hl7.org/fhir/message-type",
166+
"code": "admin-notify"
167+
},
168+
"category": "Consequence",
169+
"mode": "receiver",
170+
"focus": "Patient",
171+
"request": {
172+
"reference": "StructureDefinition/daf-patient"
173+
},
174+
"response": {
175+
"reference": "StructureDefinition/MessageHeader"
176+
},
177+
"documentation": "Notification of an update to a patient resource. changing the links is not supported"
178+
}
179+
]
180+
}
181+
],
182+
"document": [
183+
{
184+
"mode": "consumer",
185+
"documentation": "Basic rules for all documents in the EHR system",
186+
"profile": {
187+
"reference": "http://fhir.hl7.org/base/Profilebc054d23-75e1-4dc6-aca5-838b6b1ac81d/_history/b5fdd9fc-b021-4ea1-911a-721a60663796"
188+
}
189+
}
190+
]
191+
}

0 commit comments

Comments
 (0)