roqua-rom-api 0.1.9 → 0.1.10

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: 4bac266254c426f6b3dbc4f723bd32ffa354c30e
4
- data.tar.gz: 0369fa376ee5388965c5398b1240832a35e5c86f
3
+ metadata.gz: 5a95d8bfee28a8a954ee62dc31b632b5516ef7e4
4
+ data.tar.gz: 0b53e11f04d56494713177e82b0c636744df3262
5
5
  SHA512:
6
- metadata.gz: 01acfc52290ea193019465edda26b7a45fd3f864b88b0e8bceea5dd36234b7fcf443b5d8ca9e0675b731a533b82c1adf5393e8b7f8ca7c14d60fc44ccba6ca3f
7
- data.tar.gz: c677875fc78ebfd6c9162682970d6d164ae95c92a4438dc01ffcaf8ecb058fbd339ec782e6936eaf648db4016accddc729de6debd20d2f7de9163a1daf1f61fa
6
+ metadata.gz: 6b201635dbb748824913bb8be850b0288a4b1b6adaeac8af49e252fbdf25b495f54fe7112db0cabc2b0a67ce354edf82db8bd8fd09875c45f1c1371e9d8fa982
7
+ data.tar.gz: e6b8e553487c7ba0e70b1204c4618107c7e12246c90195b527876c3785a605654208030fa3ff643ec98764ced00c7e17139875da0b36413bf7df2b3ba3a705be
@@ -1,3 +1,7 @@
1
+ ### 0.1.10 / 2014-10-07
2
+
3
+ * Add flags parameter to protocol subscriptions
4
+
1
5
  ### 0.1.9 / 2014-10-07
2
6
 
3
7
  * Add API endpoint for updating responses
data/README.md CHANGED
@@ -98,6 +98,7 @@ To subscribe to a protocol run the following command:
98
98
  * `dossier_id:` [Required] - Unique dossier identifier for the patient to be subscribed.
99
99
  * `protocol_key:` [Required] - Key uniquely identifying the protocol of interest as specified in RoQua.
100
100
  * `start_at:` [Defaults to the present] - Timestamp specifying when the first measurement should be prepared.
101
+ * `flags` - Boolean flags that are passed in when a questionnaire is being filled out.
101
102
 
102
103
  When the subscription succeeds, the subscription object is available through the `#result` accessor:
103
104
 
@@ -10,6 +10,7 @@ module Roqua
10
10
  attribute :stop_at, DateTime
11
11
  attribute :protocol_key, String
12
12
  attribute :protocol_name, String
13
+ attribute :flags, Hash
13
14
  end
14
15
  end
15
16
  end
@@ -5,9 +5,10 @@ module Roqua
5
5
  string :dossier_id
6
6
  string :protocol_key
7
7
  time :start_at, default: nil
8
+ hash :flags, default: {}, strip: false
8
9
 
9
10
  def execute
10
- options = {protocol_key: protocol_key}
11
+ options = {protocol_key: protocol_key, flags: flags}
11
12
  options[:start_at] = start_at.to_i if start_at
12
13
  validate_response_for do
13
14
  RomApi.basic_auth_session.post("/dossiers/#{dossier_id}/protocol_subscriptions", options)
@@ -1,5 +1,5 @@
1
1
  module Roqua
2
2
  module RomApi
3
- VERSION = '0.1.9'
3
+ VERSION = '0.1.10'
4
4
  end
5
5
  end
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe StartProtocolSubscription do
4
- let(:options) { {dossier_id: 'some_dossier_id', protocol_key: 'some_key'} }
4
+ let(:options) { {dossier_id: 'some_dossier_id', protocol_key: 'some_key', flags: {some: 'flag'}} }
5
5
  let(:session) { Sessions::BasicAuthSession.new }
6
6
  let(:response) { httparty_response({}) }
7
7
  before do
@@ -11,7 +11,8 @@ describe StartProtocolSubscription do
11
11
 
12
12
  it 'does a post to the rom protocol_subscription api' do
13
13
  expect(session).to receive(:post).with("/dossiers/#{options[:dossier_id]}/protocol_subscriptions",
14
- protocol_key: options[:protocol_key])
14
+ protocol_key: options[:protocol_key],
15
+ flags: {some: 'flag'})
15
16
  StartProtocolSubscription.run!(options)
16
17
  end
17
18
 
@@ -19,7 +20,8 @@ describe StartProtocolSubscription do
19
20
  start_at = Time.now
20
21
  expect(session).to receive(:post).with("/dossiers/#{options[:dossier_id]}/protocol_subscriptions",
21
22
  protocol_key: options[:protocol_key],
22
- start_at: start_at.to_i)
23
+ start_at: start_at.to_i,
24
+ flags: {some: 'flag'})
23
25
  StartProtocolSubscription.run!(options.merge start_at: start_at)
24
26
  end
25
27
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roqua-rom-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Esposito