lifen 2.2.0 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +1 -1
- data/README.md +11 -0
- data/lib/lifen.rb +1 -0
- data/lib/lifen/communication.rb +5 -0
- data/lib/lifen/content_string.rb +15 -0
- data/lib/lifen/version.rb +1 -1
- data/spec/cassettes/communication/send/binary_and_content_string.yml +75 -0
- data/spec/communication_spec.rb +10 -0
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bdf996b1b369517305a6d0f55e0d39c472865bf8
|
4
|
+
data.tar.gz: b88053a0efbfda43d4d3e17c0b6107ee23d85dfd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b24f4fc247bf01b59fb2633206ef3703c0a2399cbb646a7ecf669af56740c4f4b9546e24c60248d405e096a61bd18e1916308608c1bc8252d2fbdb047fa2ccab
|
7
|
+
data.tar.gz: 5ddb23a6d2e6ae0a2369e3a0913da7eae7e211fbde985402781480bd6d339db051dc75e0b334860d197f259bc23460b91891ccace5d6e4bb5bd614ec5ef7384b
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -182,6 +182,17 @@ channel = recipient.create_address(type: "address", lines: ["39 rue Aboukir"], c
|
|
182
182
|
channel = recipient.create_telecom(type: "telecom", system: "fax", value: "+33102030405")
|
183
183
|
```
|
184
184
|
|
185
|
+
## Deploying to Rubygems
|
186
|
+
|
187
|
+
Once the new version is validated, the deployment follows those steps :
|
188
|
+
|
189
|
+
1. update `lib/lifen/version.rb`
|
190
|
+
2. run `bundle install` to update `Gemfile.lock`
|
191
|
+
3. update `CHANGELOG.md` with the additional features of the new version
|
192
|
+
4. commit changes to Github
|
193
|
+
5. build the gem using `gem build lifen.gemspec`
|
194
|
+
6. publish the gem using `gem publish lifen-X.X.X.gem`
|
195
|
+
7. run `bundle update lifen` in related projects :)
|
185
196
|
|
186
197
|
## Contributing
|
187
198
|
|
data/lib/lifen.rb
CHANGED
data/lib/lifen/communication.rb
CHANGED
@@ -11,6 +11,7 @@ module Lifen
|
|
11
11
|
attribute :patient, Lifen::Patient
|
12
12
|
attribute :attachment, Lifen::Attachment
|
13
13
|
attribute :binary, Lifen::Binary
|
14
|
+
attribute :content_string, Lifen::ContentString
|
14
15
|
|
15
16
|
attribute :status, String
|
16
17
|
attribute :sent_at, DateTime
|
@@ -64,6 +65,10 @@ module Lifen
|
|
64
65
|
]
|
65
66
|
end
|
66
67
|
|
68
|
+
if content_string
|
69
|
+
payload[:payload] << content_string.fhir_payload
|
70
|
+
end
|
71
|
+
|
67
72
|
payload
|
68
73
|
end
|
69
74
|
|
data/lib/lifen/version.rb
CHANGED
@@ -0,0 +1,75 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://develop.lifen.fr/fhir/CommunicationRequest
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"resourceType":"CommunicationRequest","sender":[{"reference":"valid_sender_uuid"}],"recipient":[{"reference":"valid_recipient_uuid"}],"contained":[{"id":"11e5b841-4ff8-2dbb-9643-eabb809fa654","resourceType":"Practitioner","address":[{"id":"valid_channel_uuid"}]}],"category":[{"coding":[{"system":"http://honestica.com/fhir/communication/category","code":"MEDICAL_REPORT"}]}],"payload":[{"contentReference":{"reference":"Binary/valid_binary_id"}},{"contentString":"Cher
|
9
|
+
Dr Coeur, je viens de voir votre patiente Mme Paulette Michu"}]}'
|
10
|
+
headers:
|
11
|
+
User-Agent:
|
12
|
+
- Faraday v0.11.0
|
13
|
+
Authorization:
|
14
|
+
- Bearer valid_application_access_token
|
15
|
+
Accept:
|
16
|
+
- application/json
|
17
|
+
Content-Type:
|
18
|
+
- application/json
|
19
|
+
Accept-Encoding:
|
20
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
21
|
+
response:
|
22
|
+
status:
|
23
|
+
code: 201
|
24
|
+
message: Created
|
25
|
+
headers:
|
26
|
+
Server:
|
27
|
+
- nginx/1.6.2
|
28
|
+
Date:
|
29
|
+
- Mon, 24 Apr 2017 07:36:03 GMT
|
30
|
+
Content-Type:
|
31
|
+
- application/json+fhir;charset=UTF-8
|
32
|
+
Location:
|
33
|
+
- http://develop.lifen.fr/fhir/OperationOutcome/f585aaf9-a024-4b40-bc30-727e9fa034e8
|
34
|
+
Transfer-Encoding:
|
35
|
+
- chunked
|
36
|
+
Connection:
|
37
|
+
- keep-alive
|
38
|
+
X-B3-Sampled:
|
39
|
+
- '1'
|
40
|
+
X-B3-Spanid:
|
41
|
+
- 18020f441c973c54
|
42
|
+
X-B3-Traceid:
|
43
|
+
- 18020f441c973c54
|
44
|
+
X-Content-Type-Options:
|
45
|
+
- nosniff
|
46
|
+
X-Xss-Protection:
|
47
|
+
- 1; mode=block
|
48
|
+
Cache-Control:
|
49
|
+
- no-cache, no-store, max-age=0, must-revalidate
|
50
|
+
Pragma:
|
51
|
+
- no-cache
|
52
|
+
Expires:
|
53
|
+
- '0'
|
54
|
+
X-Powered-By:
|
55
|
+
- HAPI FHIR 2.2 REST Server (FHIR Server; FHIR 1.0.2/DSTU2)
|
56
|
+
Content-Location:
|
57
|
+
- http://develop.lifen.fr/fhir/OperationOutcome/f585aaf9-a024-4b40-bc30-727e9fa034e8
|
58
|
+
Access-Control-Allow-Credentials:
|
59
|
+
- 'true'
|
60
|
+
body:
|
61
|
+
encoding: UTF-8
|
62
|
+
string: |-
|
63
|
+
{
|
64
|
+
"resourceType": "OperationOutcome",
|
65
|
+
"id": "f585aaf9-a024-4b40-bc30-727e9fa034e8",
|
66
|
+
"issue": [
|
67
|
+
{
|
68
|
+
"severity": "information",
|
69
|
+
"diagnostics": "CommunicationRequest accepted"
|
70
|
+
}
|
71
|
+
]
|
72
|
+
}
|
73
|
+
http_version:
|
74
|
+
recorded_at: Mon, 24 Apr 2017 07:36:04 GMT
|
75
|
+
recorded_with: VCR 3.0.3
|
data/spec/communication_spec.rb
CHANGED
@@ -43,6 +43,7 @@ describe Lifen::Communication do
|
|
43
43
|
describe ':send with a Binary' do
|
44
44
|
|
45
45
|
let(:communication) { Lifen::Communication.new(sender: sender, recipient: recipient, channel: channel, binary: binary, patient: patient) }
|
46
|
+
let(:contentString) { Lifen::ContentString.new(text: "Cher Dr Coeur, je viens de voir votre patiente Mme Paulette Michu")}
|
46
47
|
|
47
48
|
it 'works' do
|
48
49
|
|
@@ -53,6 +54,15 @@ describe Lifen::Communication do
|
|
53
54
|
expect(communication.uuid).to_not be_nil
|
54
55
|
end
|
55
56
|
|
57
|
+
it 'works with contentString' do
|
58
|
+
communication.content_string = contentString
|
59
|
+
VCR.use_cassette "communication/send/binary_and_content_string" do
|
60
|
+
communication.send
|
61
|
+
end
|
62
|
+
|
63
|
+
expect(communication.uuid).to_not be_nil
|
64
|
+
end
|
65
|
+
|
56
66
|
end
|
57
67
|
|
58
68
|
describe ':find' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lifen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Etienne Depaulis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-04-
|
11
|
+
date: 2017-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -162,6 +162,7 @@ files:
|
|
162
162
|
- lib/lifen/client.rb
|
163
163
|
- lib/lifen/communication.rb
|
164
164
|
- lib/lifen/configuration.rb
|
165
|
+
- lib/lifen/content_string.rb
|
165
166
|
- lib/lifen/error.rb
|
166
167
|
- lib/lifen/flow.rb
|
167
168
|
- lib/lifen/flows.rb
|
@@ -179,6 +180,7 @@ files:
|
|
179
180
|
- spec/cassettes/binary/download/valid.yml
|
180
181
|
- spec/cassettes/communication/find/invalid_uuid.yml
|
181
182
|
- spec/cassettes/communication/find/valid_uuid.yml
|
183
|
+
- spec/cassettes/communication/send/binary_and_content_string.yml
|
182
184
|
- spec/cassettes/communication/send/binary_valid_attributes.yml
|
183
185
|
- spec/cassettes/communication/send/valid_attributes.yml
|
184
186
|
- spec/cassettes/flows/attach_users/invalid_flow_uuid.yml
|
@@ -253,6 +255,7 @@ test_files:
|
|
253
255
|
- spec/cassettes/binary/download/valid.yml
|
254
256
|
- spec/cassettes/communication/find/invalid_uuid.yml
|
255
257
|
- spec/cassettes/communication/find/valid_uuid.yml
|
258
|
+
- spec/cassettes/communication/send/binary_and_content_string.yml
|
256
259
|
- spec/cassettes/communication/send/binary_valid_attributes.yml
|
257
260
|
- spec/cassettes/communication/send/valid_attributes.yml
|
258
261
|
- spec/cassettes/flows/attach_users/invalid_flow_uuid.yml
|