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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 38df1a5450810d1efd28ee6b8e1d1ecc0fd37958
4
- data.tar.gz: a3722eb0dfe2b7471df3afdd9531098bc018def0
3
+ metadata.gz: 9b54be9ec354925f88b9d21c7eb320dd4aa06b6e
4
+ data.tar.gz: 0a3157507f3d483a808dcfba919c0868f3fa3886
5
5
  SHA512:
6
- metadata.gz: 2f142badeeba234f9254c2a433abd3a50f218c412a1a99d3e8a089584e28cbd0e90156b50cd22dc96909887f8a040c1213f1f7564e59f7511ebc3e5796f7099f
7
- data.tar.gz: 40b6a3ba5ac1db2a34d9cfadf4171b6ef562e8981ec20662f4ba4241feccdda522407bb2c596761e4ab89705549e6ad8c1c7cc155a465a16cfa71daf2f9430da
6
+ metadata.gz: 658df2cd0871c76cf89a8d3261f36222ee57454bc992a2f0eef92a36df46867bd77aaeb221c50f6343290bac8a74d0a9b32daba1ffd8e441adabe36fab92484e
7
+ data.tar.gz: 6121e4c4902657d1720b65b8a7d4a24ad43132bb6ed237c8fadc27f01d2fc53d458488f0fc2e5590f46baa19037891584bc59219787593fdc6c322e2a5104654
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ 1.6.2
2
+ -----
3
+
4
+ - Updated user search endpoint (new strategy)
5
+
1
6
  1.6.1
2
7
  -----
3
8
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lifen (1.6.1)
4
+ lifen (1.6.2)
5
5
  faraday (>= 0.9)
6
6
  inflecto
7
7
  virtus (>= 1.0)
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/#{rpps}")
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["telecom"]).each do |telecom_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(json["address"]).each do |address_json|
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
@@ -1,3 +1,3 @@
1
1
  module Lifen
2
- VERSION = "1.6.1"
2
+ VERSION = "1.6.2"
3
3
  end
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://develop.lifen.fr/fhir/Practitioner/810004085790
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
- - 621eca37c9dd3b3b
30
+ - e916970475956836
31
31
  X-B3-Traceid:
32
- - 621eca37c9dd3b3b
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
- Content-Location:
46
- - http://demo.lifen.fr/public-api/fhir/Practitioner/11e5c86b-e4ba-eee4-9b29-deb9993a92c0
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
- - Thu, 23 Feb 2017 08:21:15 GMT
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": "Practitioner",
64
- "id": "11e5c86b-e4ba-eee4-9b29-deb9993a92c0",
65
- "identifier": [
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
- "telecom": [
84
- {
85
- "id": "11e61052-91cf-185b-8234-6accfa9deeee",
86
- "system": "email",
87
- "value": "William.ECLANCHER@medical75.apicrypt.org"
88
- },
66
+ "type": "searchset",
67
+ "total": 1,
68
+ "link": [
89
69
  {
90
- "id": "11e62721-8caa-da09-b2d8-6accfa9deeee",
91
- "system": "email",
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
- "address": [
74
+ "entry": [
96
75
  {
97
- "id": "11e5c86e-adb9-5453-9b29-deb9993a92c0",
98
- "line": [
99
- "11 RUE CHARLES TELLIER"
100
- ],
101
- "city": "Paris",
102
- "postalCode": "75016",
103
- "country": "FRANCE"
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: Thu, 23 Feb 2017 08:21:15 GMT
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.1
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-02-24 00:00:00.000000000 Z
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.6.8
232
+ rubygems_version: 2.5.2
233
233
  signing_key:
234
234
  specification_version: 4
235
235
  summary: Lifen JSON API ruby client