-
Notifications
You must be signed in to change notification settings - Fork 19
Description
I have been attempting to run the reconciliation with a test list that I created myself (using med name strings from RxTerms).
I noticed that if I omit the instructions part of a med, the script throws an error. Is this by design, or should the algorithm be able to function if supplied only with a med name?
Here is the stack trace of the error thrown:
Traceback (most recent call last):
File "C:\inetpub\wwwroot\medrec-master\reconcile-service.py", line 417, in
main()
File "C:\inetpub\wwwroot\medrec-master\reconcile-service.py", line 364, in main
print output_json(demo_list_1, demo_list_2, l1, l2, rec)
File "C:\inetpub\wwwroot\medrec-master\json_output.py", line 20, in output_json
'new_list_1': [x.as_dictionary() for x in l1],
AttributeError: 'Medication' object has no attribute 'as_dictionary'
And, here is an example of a list that the reconcile.py script failed on:
topiramate 200 MG Oral Tablet [Topamax]
lamotrigine 150 MG Oral Tablet [Lamictal]
Cyclobenzaprine hydrochloride 5 MG Oral Tablet [Flexeril]
******
topiramate 25 MG Oral Capsule [Topamax]
lamotrigine 150 MG Oral Tablet [Lamictal]
Cyclobenzaprine hydrochloride 10 MG Oral Tablet [Flexeril]
24 HR Metformin hydrochloride 1000 MG / saxagliptin 2.5 MG Extended Release Tablet
******
However, when I simply append on instructions, the algorithm succeeds:
topiramate 200 MG Oral Tablet [Topamax];TAKE AS DIRECTED.; Rx
lamotrigine 150 MG Oral Tablet [Lamictal];TAKE AS DIRECTED.; Rx
Cyclobenzaprine hydrochloride 5 MG Oral Tablet [Flexeril];TAKE AS DIRECTED.; Rx
******
topiramate 25 MG Oral Capsule [Topamax];TAKE AS DIRECTED.; Rx
lamotrigine 150 MG Oral Tablet [Lamictal];TAKE AS DIRECTED.; Rx
Cyclobenzaprine hydrochloride 10 MG Oral Tablet [Flexeril];TAKE AS DIRECTED.; Rx
24 HR Metformin hydrochloride 1000 MG / saxagliptin 2.5 MG Extended Release Tablet;TAKE AS DIRECTED.; Rx
******