lifen 1.6.1 → 1.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +1 -1
- data/lib/lifen/user.rb +11 -5
- data/lib/lifen/version.rb +1 -1
- data/spec/cassettes/users/find_by_rpps/existing_rpps.yml +63 -45
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9b54be9ec354925f88b9d21c7eb320dd4aa06b6e
|
4
|
+
data.tar.gz: 0a3157507f3d483a808dcfba919c0868f3fa3886
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 658df2cd0871c76cf89a8d3261f36222ee57454bc992a2f0eef92a36df46867bd77aaeb221c50f6343290bac8a74d0a9b32daba1ffd8e441adabe36fab92484e
|
7
|
+
data.tar.gz: 6121e4c4902657d1720b65b8a7d4a24ad43132bb6ed237c8fadc27f01d2fc53d458488f0fc2e5590f46baa19037891584bc59219787593fdc6c322e2a5104654
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/lib/lifen/user.rb
CHANGED
@@ -115,17 +115,23 @@ module Lifen
|
|
115
115
|
# end
|
116
116
|
|
117
117
|
def self.find_by_rpps(rpps)
|
118
|
-
json = application_client.get("fhir/Practitioner
|
118
|
+
json = application_client.get("fhir/Practitioner/?identifier=#{rpps}")
|
119
119
|
|
120
|
-
json[:uuid] = json["id"]
|
121
120
|
|
122
|
-
user = new(json)
|
123
121
|
|
124
|
-
Array(json["
|
122
|
+
raise "User not found" if Array(json["entry"]).size != 1
|
123
|
+
|
124
|
+
user_json = Array(json["entry"]).first.fetch("resource") { {} }
|
125
|
+
|
126
|
+
user_json[:uuid] = user_json["id"]
|
127
|
+
|
128
|
+
user = new(user_json)
|
129
|
+
|
130
|
+
Array(user_json["telecom"]).each do |telecom_json|
|
125
131
|
user.channels << Lifen::Communication::Channel.from_json(telecom_json, "telecom")
|
126
132
|
end
|
127
133
|
|
128
|
-
Array(
|
134
|
+
Array(user_json["address"]).each do |address_json|
|
129
135
|
user.channels << Lifen::Communication::Channel.from_json(address_json, "address")
|
130
136
|
end
|
131
137
|
|
data/lib/lifen/version.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://develop.lifen.fr/fhir/Practitioner
|
5
|
+
uri: https://develop.lifen.fr/fhir/Practitioner/?identifier=810004085790
|
6
6
|
body:
|
7
7
|
encoding: UTF-8
|
8
8
|
string: "{}"
|
@@ -27,9 +27,9 @@ http_interactions:
|
|
27
27
|
X-B3-Sampled:
|
28
28
|
- '1'
|
29
29
|
X-B3-Spanid:
|
30
|
-
-
|
30
|
+
- e916970475956836
|
31
31
|
X-B3-Traceid:
|
32
|
-
-
|
32
|
+
- e916970475956836
|
33
33
|
X-Content-Type-Options:
|
34
34
|
- nosniff
|
35
35
|
X-Xss-Protection:
|
@@ -42,16 +42,14 @@ http_interactions:
|
|
42
42
|
- '0'
|
43
43
|
X-Powered-By:
|
44
44
|
- HAPI FHIR 2.1 REST Server (FHIR Server; FHIR 1.0.2/DSTU2)
|
45
|
-
|
46
|
-
-
|
47
|
-
Location:
|
48
|
-
- http://demo.lifen.fr/public-api/fhir/Practitioner/11e5c86b-e4ba-eee4-9b29-deb9993a92c0
|
45
|
+
Last-Modified:
|
46
|
+
- Wed, 01 Mar 2017 09:21:41 GMT
|
49
47
|
Content-Type:
|
50
48
|
- application/json+fhir;charset=UTF-8
|
51
49
|
Transfer-Encoding:
|
52
50
|
- chunked
|
53
51
|
Date:
|
54
|
-
-
|
52
|
+
- Wed, 01 Mar 2017 09:21:41 GMT
|
55
53
|
Connection:
|
56
54
|
- close
|
57
55
|
Access-Control-Allow-Credentials:
|
@@ -60,50 +58,70 @@ http_interactions:
|
|
60
58
|
encoding: UTF-8
|
61
59
|
string: |-
|
62
60
|
{
|
63
|
-
"resourceType": "
|
64
|
-
"id": "
|
65
|
-
"
|
66
|
-
|
67
|
-
"system": "http://honestica.com/fhir/identifier/fr/asip",
|
68
|
-
"value": "810004085790"
|
69
|
-
}
|
70
|
-
],
|
71
|
-
"name": {
|
72
|
-
"text": "WILLIAM ECLANCHER",
|
73
|
-
"family": [
|
74
|
-
"ECLANCHER"
|
75
|
-
],
|
76
|
-
"given": [
|
77
|
-
"WILLIAM"
|
78
|
-
],
|
79
|
-
"prefix": [
|
80
|
-
"DR"
|
81
|
-
]
|
61
|
+
"resourceType": "Bundle",
|
62
|
+
"id": "d9015de6-9193-46db-b161-36ac26069a00",
|
63
|
+
"meta": {
|
64
|
+
"lastUpdated": "2017-03-01T09:21:41.553+00:00"
|
82
65
|
},
|
83
|
-
"
|
84
|
-
|
85
|
-
|
86
|
-
"system": "email",
|
87
|
-
"value": "William.ECLANCHER@medical75.apicrypt.org"
|
88
|
-
},
|
66
|
+
"type": "searchset",
|
67
|
+
"total": 1,
|
68
|
+
"link": [
|
89
69
|
{
|
90
|
-
"
|
91
|
-
"
|
92
|
-
"value": "william.eclancher@medecin.mssante.fr"
|
70
|
+
"relation": "self",
|
71
|
+
"url": "http://demo.lifen.fr/public-api/fhir/Practitioner/?identifier=810004085790"
|
93
72
|
}
|
94
73
|
],
|
95
|
-
"
|
74
|
+
"entry": [
|
96
75
|
{
|
97
|
-
"
|
98
|
-
"
|
99
|
-
"
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
76
|
+
"fullUrl": "http://demo.lifen.fr/public-api/fhir/Practitioner/11e5c86b-e4ba-eee4-9b29-deb9993a92c0",
|
77
|
+
"resource": {
|
78
|
+
"resourceType": "Practitioner",
|
79
|
+
"id": "11e5c86b-e4ba-eee4-9b29-deb9993a92c0",
|
80
|
+
"identifier": [
|
81
|
+
{
|
82
|
+
"system": "http://honestica.com/fhir/identifier/fr/asip",
|
83
|
+
"value": "810004085790"
|
84
|
+
}
|
85
|
+
],
|
86
|
+
"name": {
|
87
|
+
"text": "WILLIAM ECLANCHER",
|
88
|
+
"family": [
|
89
|
+
"ECLANCHER"
|
90
|
+
],
|
91
|
+
"given": [
|
92
|
+
"WILLIAM"
|
93
|
+
],
|
94
|
+
"prefix": [
|
95
|
+
"DR"
|
96
|
+
]
|
97
|
+
},
|
98
|
+
"telecom": [
|
99
|
+
{
|
100
|
+
"id": "11e61052-91cf-185b-8234-6accfa9deeee",
|
101
|
+
"system": "email",
|
102
|
+
"value": "William.ECLANCHER@medical75.apicrypt.org"
|
103
|
+
},
|
104
|
+
{
|
105
|
+
"id": "11e62721-8caa-da09-b2d8-6accfa9deeee",
|
106
|
+
"system": "email",
|
107
|
+
"value": "william.eclancher@medecin.mssante.fr"
|
108
|
+
}
|
109
|
+
],
|
110
|
+
"address": [
|
111
|
+
{
|
112
|
+
"id": "11e5c86e-adb9-5453-9b29-deb9993a92c0",
|
113
|
+
"line": [
|
114
|
+
"11 RUE CHARLES TELLIER"
|
115
|
+
],
|
116
|
+
"city": "Paris",
|
117
|
+
"postalCode": "75016",
|
118
|
+
"country": "FRANCE"
|
119
|
+
}
|
120
|
+
]
|
121
|
+
}
|
104
122
|
}
|
105
123
|
]
|
106
124
|
}
|
107
125
|
http_version:
|
108
|
-
recorded_at:
|
126
|
+
recorded_at: Wed, 01 Mar 2017 09:21:41 GMT
|
109
127
|
recorded_with: VCR 3.0.3
|
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: 1.6.
|
4
|
+
version: 1.6.2
|
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-
|
11
|
+
date: 2017-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -229,7 +229,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
229
229
|
version: '0'
|
230
230
|
requirements: []
|
231
231
|
rubyforge_project:
|
232
|
-
rubygems_version: 2.
|
232
|
+
rubygems_version: 2.5.2
|
233
233
|
signing_key:
|
234
234
|
specification_version: 4
|
235
235
|
summary: Lifen JSON API ruby client
|