Skip to content

Commit

Permalink
Merge pull request #78 from Lightmatter/develop
Browse files Browse the repository at this point in the history
release/v0.1.0
  • Loading branch information
samamorgan authored Sep 6, 2023
2 parents c38698b + 13e19db commit 6995c17
Show file tree
Hide file tree
Showing 42 changed files with 6,322 additions and 1,289 deletions.
1,095 changes: 633 additions & 462 deletions poetry.lock

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[tool.poetry]
name = "welkin"
version = "0.0.8"
version = "0.1.0"
description = "Python Welkin Health API Wrapper."
authors = ["Sam Morgan <sam@lightmatter.com>"]
authors = ["Sam Morgan <sama4mail@gmail.com>"]
license = "GPL-3.0-or-later"
readme = "README.md"
repository = "https://github.com/lightmatter/welkin-health"
Expand All @@ -19,6 +19,7 @@ classifiers = [
[tool.poetry.dependencies]
python = "^3.7"
requests = "^2.28.1"
portalocker = "^2.7.0"

[tool.poetry.group.dev]
optional = true
Expand All @@ -35,6 +36,8 @@ pytest = "^7.1.3"
pytest-cov = "^4.0.0"
pytest-dotenv = "^0.5.2"
pytest-vcr = "^1.0.2"
pytest-xdist = "^3.2.1"
tomli = "^2.0.1"

[tool.poetry.group.docs]
optional = true
Expand All @@ -54,4 +57,5 @@ build-backend = "poetry.core.masonry.api"
profile = "black"

[tool.pytest.ini_options]
addopts = ["-n=auto"]
env_files = [".env", ".env.example"]
72 changes: 72 additions & 0 deletions test/cassettes/TestFormation.test_assessment_read.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
interactions:
- request:
body: null
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate
Authorization:
- API_TOKEN_314de199-515d-420c-be31-baee23f0b70e
Connection:
- keep-alive
User-Agent:
- python-welkin/0.1.0
method: GET
uri: https://api.live.welkincloud.io/tenant_REDACTED/instance_REDACTED/formations/current/assessments/asm-coaching-notes
response:
body:
string: '{"id": "7898f4c6-4eb2-472b-b14d-871591496688", "title": "Coaching Notes",
"name": "asm-coaching-notes", "version": 75, "sections": [{"title": "Coaching
Notes", "name": "section-1", "order": 0, "fields": [{"label": "Internal Member
Overview - General information about patient such as important relationships,
current issues, etc. ", "name": "", "refCdtName": "cdt-coaching-notes", "refCdtFieldName":
"cdtf-patient-overview", "order": 0, "viewType": "question", "meta": {"type":
"textarea", "required": false}, "prePopulatedValue": {"type": "PREVIOUS_ASSESSMENT"},
"attachments": []}, {"label": "Internal Session Notes", "name": "", "refCdtName":
"cdt-coaching-notes", "refCdtFieldName": "cdtf-focus-today", "order": 1, "viewType":
"question", "meta": {"type": "textarea", "required": false}, "prePopulatedValue":
null, "attachments": []}, {"label": "External Notes for Patient", "name":
"", "refCdtName": "cdt-soap-notes", "refCdtFieldName": "cdtf-visit-summary",
"order": 2, "viewType": "question", "meta": {"type": "textarea", "required":
false}, "prePopulatedValue": null, "attachments": []}]}], "scoring": {"formula":
"SUM", "groups": []}, "programs": [], "template": null, "conditionSettings":
{"elements": [], "events": []}, "displayType": "SECTIONS", "autoCompleted":
false, "_containsPHI": true}'
headers:
Access-Control-Allow-Headers:
- authorization, content-type, xsrf-token, security-role
Access-Control-Allow-Methods:
- GET, POST, PUT, DELETE, PATCH, OPTIONS
Access-Control-Allow-Origin:
- '*'
Access-Control-Expose-Headers:
- xsrf-token
Access-Control-Max-Age:
- '3600'
Cache-Control:
- no-cache, no-store, max-age=0, must-revalidate
Connection:
- keep-alive
Content-Type:
- application/json
Date:
- Fri, 01 Sep 2023 22:24:41 GMT
Expires:
- '0'
Pragma:
- no-cache
Strict-Transport-Security:
- max-age=31536000 ; includeSubDomains
Transfer-Encoding:
- chunked
X-Content-Type-Options:
- nosniff
X-XSS-Protection:
- 1; mode=block
content-length:
- '1204'
status:
code: 200
message: OK
version: 1
933 changes: 933 additions & 0 deletions test/cassettes/TestFormation.test_assessments_read.yaml

Large diffs are not rendered by default.

118 changes: 118 additions & 0 deletions test/cassettes/TestFormation.test_cdt_read.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
interactions:
- request:
body: null
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate
Authorization:
- API_TOKEN_2401a0af-3af9-4928-9d46-bbccd56314af
Connection:
- keep-alive
User-Agent:
- python-welkin/0.1.0
method: GET
uri: https://api.live.welkincloud.io/tenant_REDACTED/instance_REDACTED/formations/current/cdts/allergies
response:
body:
string: '{"id": "be69c457-3dcc-44ad-8aba-667b14ef11a5", "name": "allergies",
"title": null, "label": null, "version": 75, "internal": false, "readable":
true, "updatable": true, "type": "MULTI_RECORD", "relation": "COMMON", "fields":
[{"name": "allergy", "type": "text", "formula": null, "dictionary": null,
"profileDataType": null, "editable": true, "searchable": false, "bulkEdit":
false, "phi": false, "disable": false, "injectedSource": false, "displayType":
null, "valueType": null, "meta": {"required": false}}, {"name": "reaction_symptom",
"type": "text", "formula": null, "dictionary": null, "profileDataType": null,
"editable": true, "searchable": false, "bulkEdit": false, "phi": false, "disable":
false, "injectedSource": false, "displayType": null, "valueType": null, "meta":
{"required": false}}, {"name": "severity", "type": "select", "formula": null,
"dictionary": null, "profileDataType": null, "editable": true, "searchable":
false, "bulkEdit": false, "phi": false, "disable": false, "injectedSource":
false, "displayType": "SELECT", "valueType": "STRING", "meta": {"required":
false, "options": [{"label": "Mild", "value": "Mild", "refCdtName": null},
{"label": "Moderate", "value": "Moderate", "refCdtName": null}, {"label":
"Some", "value": "Some", "refCdtName": null}, {"label": "Small", "value":
"Small", "refCdtName": null}, {"label": "Severe", "value": "Severe", "refCdtName":
null}], "multiple": false}}, {"name": "id", "type": "text", "formula": null,
"dictionary": null, "profileDataType": null, "editable": false, "searchable":
false, "bulkEdit": false, "phi": false, "disable": false, "injectedSource":
false, "displayType": null, "valueType": null, "meta": {"required": false}},
{"name": "created_at", "type": "datetime", "formula": null, "dictionary":
null, "profileDataType": null, "editable": false, "searchable": false, "bulkEdit":
false, "phi": false, "disable": false, "injectedSource": false, "displayType":
null, "valueType": null, "meta": {"required": false}}, {"name": "created_by",
"type": "text", "formula": null, "dictionary": null, "profileDataType": null,
"editable": false, "searchable": false, "bulkEdit": false, "phi": false, "disable":
false, "injectedSource": false, "displayType": null, "valueType": null, "meta":
{"required": false}}, {"name": "created_by_name", "type": "text", "formula":
null, "dictionary": null, "profileDataType": null, "editable": false, "searchable":
false, "bulkEdit": false, "phi": false, "disable": false, "injectedSource":
false, "displayType": null, "valueType": null, "meta": {"required": false}},
{"name": "updated_at", "type": "datetime", "formula": null, "dictionary":
null, "profileDataType": null, "editable": false, "searchable": false, "bulkEdit":
false, "phi": false, "disable": false, "injectedSource": false, "displayType":
null, "valueType": null, "meta": {"required": false}}, {"name": "updated_by",
"type": "text", "formula": null, "dictionary": null, "profileDataType": null,
"editable": false, "searchable": false, "bulkEdit": false, "phi": false, "disable":
false, "injectedSource": false, "displayType": null, "valueType": null, "meta":
{"required": false}}, {"name": "updated_by_name", "type": "text", "formula":
null, "dictionary": null, "profileDataType": null, "editable": false, "searchable":
false, "bulkEdit": false, "phi": false, "disable": false, "injectedSource":
false, "displayType": null, "valueType": null, "meta": {"required": false}},
{"name": "source_name", "type": "text", "formula": null, "dictionary": null,
"profileDataType": null, "editable": false, "searchable": false, "bulkEdit":
false, "phi": false, "disable": false, "injectedSource": false, "displayType":
null, "valueType": null, "meta": {"required": false}}, {"name": "source_type",
"type": "text", "formula": null, "dictionary": null, "profileDataType": null,
"editable": false, "searchable": false, "bulkEdit": false, "phi": false, "disable":
false, "injectedSource": false, "displayType": null, "valueType": null, "meta":
{"required": false}}, {"name": "source_id", "type": "text", "formula": null,
"dictionary": null, "profileDataType": null, "editable": false, "searchable":
false, "bulkEdit": false, "phi": false, "disable": false, "injectedSource":
false, "displayType": null, "valueType": null, "meta": {"required": false}},
{"name": "external_id", "type": "text", "formula": null, "dictionary": null,
"profileDataType": null, "editable": true, "searchable": false, "bulkEdit":
false, "phi": false, "disable": false, "injectedSource": false, "displayType":
null, "valueType": null, "meta": {"required": false}}, {"name": "external_guid",
"type": "text", "formula": null, "dictionary": null, "profileDataType": null,
"editable": true, "searchable": false, "bulkEdit": false, "phi": false, "disable":
false, "injectedSource": false, "displayType": null, "valueType": null, "meta":
{"required": false}}], "_containsPHI": false}'
headers:
Access-Control-Allow-Headers:
- authorization, content-type, xsrf-token, security-role
Access-Control-Allow-Methods:
- GET, POST, PUT, DELETE, PATCH, OPTIONS
Access-Control-Allow-Origin:
- '*'
Access-Control-Expose-Headers:
- xsrf-token
Access-Control-Max-Age:
- '3600'
Cache-Control:
- no-cache, no-store, max-age=0, must-revalidate
Connection:
- keep-alive
Content-Type:
- application/json
Date:
- Fri, 01 Sep 2023 22:24:41 GMT
Expires:
- '0'
Pragma:
- no-cache
Strict-Transport-Security:
- max-age=31536000 ; includeSubDomains
Transfer-Encoding:
- chunked
X-Content-Type-Options:
- nosniff
X-XSS-Protection:
- 1; mode=block
content-length:
- '4411'
status:
code: 200
message: OK
version: 1
Loading

0 comments on commit 6995c17

Please sign in to comment.