forked from inferno-framework/client-fhir-testing
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparse-transaction.rb
More file actions
31 lines (26 loc) · 795 Bytes
/
parse-transaction.rb
File metadata and controls
31 lines (26 loc) · 795 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
require 'dm-core'
require 'yaml'
opts = YAML.load_file(File.join(File.dirname(__FILE__), 'proxy.yml'))
DataMapper.setup :default, "sqlite://#{File.dirname(__FILE__)}/" + opts[:db]
# DataMapper.setup :default, "sqlite://#{Dir.pwd}/fhir-transactions.db"
class Request
include DataMapper::Resource
property :request_id, Serial
property :request_method, String
property :fhir_action, String
property :request_uri, String
property :remote_addr, String
property :user_agent, String
property :headers, String
property :dt, DateTime
property :data, String
end
class Response
include DataMapper::Resource
property :response_id, Serial
property :request_id, String
property :status, String
property :headers, String
property :dt, DateTime
property :data, String
end