Module: FHIR::Sections::History
- Included in:
- Client
- Defined in:
- lib/sections/history.rb
Instance Method Summary collapse
-
#all_history ⇒ Object
Retrieve the update history for all resource types since the start of server records.
-
#all_history_as_of(lastUpdate) ⇒ Object
Retrieve the update history for all resource types since a specific last update date/time.
-
#history(options) ⇒ Object
Retrieve the update history for a resource with given id since last update time.
- #resource_history(klass) ⇒ Object
- #resource_history_as_of(klass, lastUpdate) ⇒ Object
- #resource_instance_history(klass, id) ⇒ Object
-
#resource_instance_history_as_of(klass, id, lastUpdate) ⇒ Object
Retrieve the entire update history for a resource with the given id.
Instance Method Details
#all_history ⇒ Object
Retrieve the update history for all resource types since the start of server records.
61 62 63 |
# File 'lib/sections/history.rb', line 61 def all_history history(history:{}) end |
#all_history_as_of(lastUpdate) ⇒ Object
Retrieve the update history for all resource types since a specific last update date/time.
Note:
72 73 74 |
# File 'lib/sections/history.rb', line 72 def all_history_as_of(lastUpdate) history(history:{since: lastUpdate}) end |
#history(options) ⇒ Object
Retrieve the update history for a resource with given id since last update time. Last update may be null TODO - ensure this is the case.
public <T extends Resource> AtomFeed history(Calendar lastUpdate, Class<T> resourceClass, String id); public <T extends Resource> AtomFeed history(DateAndTime lastUpdate, Class<T> resourceClass, String id);
26 27 28 29 30 31 |
# File 'lib/sections/history.rb', line 26 def history() reply = get resource_url(), fhir_headers().except(:history) reply.resource = parse_reply([:resource], @default_format_bundle, reply) reply.resource_class = [:resource] reply end |
#resource_history(klass) ⇒ Object
50 51 52 |
# File 'lib/sections/history.rb', line 50 def resource_history(klass) history(resource: klass, history:{}) end |
#resource_history_as_of(klass, lastUpdate) ⇒ Object
54 55 56 |
# File 'lib/sections/history.rb', line 54 def resource_history_as_of(klass, lastUpdate) history(resource: klass, history:{since: lastUpdate}) end |
#resource_instance_history(klass, id) ⇒ Object
46 47 48 |
# File 'lib/sections/history.rb', line 46 def resource_instance_history(klass, id) history(resource: klass, id: id, history:{}) end |
#resource_instance_history_as_of(klass, id, lastUpdate) ⇒ Object
Retrieve the entire update history for a resource with the given id. Last update may be null TODO - ensure this is the case.
42 43 44 |
# File 'lib/sections/history.rb', line 42 def resource_instance_history_as_of(klass, id, lastUpdate) history(resource: klass, id: id, history:{since: lastUpdate}) end |