lifen_fhir 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +17 -0
  3. data/.rspec +2 -0
  4. data/.ruby-version +1 -0
  5. data/CHANGELOG.md +9 -0
  6. data/Gemfile +3 -0
  7. data/Gemfile.lock +74 -0
  8. data/License.txt +22 -0
  9. data/README.md +131 -0
  10. data/lib/lifen_fhir/app_authenticated_client.rb +38 -0
  11. data/lib/lifen_fhir/attachment.rb +26 -0
  12. data/lib/lifen_fhir/base.rb +7 -0
  13. data/lib/lifen_fhir/binary.rb +29 -0
  14. data/lib/lifen_fhir/category.rb +26 -0
  15. data/lib/lifen_fhir/channel.rb +31 -0
  16. data/lib/lifen_fhir/client.rb +107 -0
  17. data/lib/lifen_fhir/communication_request.rb +67 -0
  18. data/lib/lifen_fhir/configuration.rb +22 -0
  19. data/lib/lifen_fhir/content_string.rb +15 -0
  20. data/lib/lifen_fhir/error.rb +27 -0
  21. data/lib/lifen_fhir/medium.rb +15 -0
  22. data/lib/lifen_fhir/patient.rb +27 -0
  23. data/lib/lifen_fhir/practitioner.rb +97 -0
  24. data/lib/lifen_fhir/user_authenticated_client.rb +39 -0
  25. data/lib/lifen_fhir/version.rb +3 -0
  26. data/lib/lifen_fhir.rb +29 -0
  27. data/lifen_fhir.gemspec +30 -0
  28. data/spec/binary_spec.rb +29 -0
  29. data/spec/cassettes/binary/download/invalid.yml +65 -0
  30. data/spec/cassettes/binary/download/valid.yml +1320 -0
  31. data/spec/cassettes/communication_request/send/invalid_medium.yml +69 -0
  32. data/spec/cassettes/communication_request/send/valid_attributes.yml +75 -0
  33. data/spec/cassettes/communication_request/send/valid_attributes_binary.yml +74 -0
  34. data/spec/cassettes/practitionner/create_channel/address/old_valid_attributes.yml +71 -0
  35. data/spec/cassettes/practitionner/create_channel/address/valid_attributes.yml +71 -0
  36. data/spec/cassettes/practitionner/create_channel/telecom/valid_attributes.yml +70 -0
  37. data/spec/cassettes/practitionner/find_by_rpps/existing_rpps.yml +125 -0
  38. data/spec/cassettes/practitionner/find_by_rpps/missing_line_attribute.yml +122 -0
  39. data/spec/cassettes/practitionner/find_by_rpps/wrong_rpps.yml +68 -0
  40. data/spec/category_spec.rb +21 -0
  41. data/spec/communication_request_spec.rb +64 -0
  42. data/spec/practitionner_spec.rb +76 -0
  43. data/spec/spec_helper.rb +24 -0
  44. data/spec/support/master_plan.pdf +0 -0
  45. metadata +232 -0
@@ -0,0 +1,69 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://develop.lifen.fr/fhir/CommunicationRequest
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"resourceType":"CommunicationRequest","sender":[{"reference":"Practitioner/valid-sender-uuid"}],"recipient":[{"reference":"Practitioner/valid-recipient-uuid-1"},{"reference":"Practitioner/valid-recipient-uuid-2"}],"contained":[{"id":"patient","resourceType":"Patient","name":[{"family":["Dupond"],"given":["Jean"]}],"birthDate":"2000-01-01"}],"medium":[{"coding":[{"id":"invalid-medium-uuid"}]},{"coding":[{"id":"valid-medium-uuid-2"}]}],"category":[{"coding":[{"system":"http://honestica.com/fhir/communication/category","code":"MEDICAL_REPORT"}]}],"payload":[{"contentReference":{"reference":"Binary/valid-binary-uuid"}}],"subject":[{"reference":"patient"}]}'
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.11.0
12
+ Authorization:
13
+ - Bearer valid_application_access_token
14
+ Accept:
15
+ - application/json
16
+ Content-Type:
17
+ - application/json
18
+ Accept-Encoding:
19
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
20
+ response:
21
+ status:
22
+ code: 422
23
+ message: Unprocessable Entity
24
+ headers:
25
+ Server:
26
+ - Apache-Coyote/1.1
27
+ X-B3-Sampled:
28
+ - '1'
29
+ X-B3-Spanid:
30
+ - 19af71499c00926d
31
+ X-B3-Traceid:
32
+ - 19af71499c00926d
33
+ X-Content-Type-Options:
34
+ - nosniff
35
+ X-Xss-Protection:
36
+ - 1; mode=block
37
+ Cache-Control:
38
+ - no-cache, no-store, max-age=0, must-revalidate
39
+ Pragma:
40
+ - no-cache
41
+ Expires:
42
+ - '0'
43
+ X-Powered-By:
44
+ - HAPI FHIR 2.4 REST Server (FHIR Server; FHIR 3.0.1/DSTU3)
45
+ Content-Type:
46
+ - application/json+fhir;charset=UTF-8
47
+ Transfer-Encoding:
48
+ - chunked
49
+ Date:
50
+ - Wed, 26 Apr 2017 18:02:05 GMT
51
+ Access-Control-Allow-Credentials:
52
+ - 'true'
53
+ body:
54
+ encoding: UTF-8
55
+ string: |-
56
+ {
57
+ "resourceType": "OperationOutcome",
58
+ "id": "e9b8a4e8-9686-4e15-bcf8-a87ff9267ba1",
59
+ "issue": [
60
+ {
61
+ "severity": "fatal",
62
+ "code": "value",
63
+ "diagnostics": "The id of coding is invalid."
64
+ }
65
+ ]
66
+ }
67
+ http_version:
68
+ recorded_at: Wed, 26 Apr 2017 18:01:24 GMT
69
+ recorded_with: VCR 3.0.3