Skip to content

[FIX] carepoint: Enum handling - #20

Merged
tedsalmon merged 1 commit into
release/0.1from
bugfix/0.1/phone-address-enum
Oct 18, 2016
Merged

[FIX] carepoint: Enum handling#20
tedsalmon merged 1 commit into
release/0.1from
bugfix/0.1/phone-address-enum

Conversation

@lasley

@lasley lasley commented Oct 18, 2016

Copy link
Copy Markdown
Member
  • SQLalchemy Enums use string & the key instead of the val - so won't work. Create proxy for:
    • PhoneMixin
    • AddressMixin
    • Order
    • OrderState

@lasley lasley added the bug label Oct 18, 2016
@lasley
lasley force-pushed the bugfix/0.1/phone-address-enum branch 5 times, most recently from 884b80b to faeb76b Compare October 18, 2016 20:44
* SQLalchemy Enums use string & the key instead of the val - so won't work. Create proxy for:
  * PhoneMixin
  * AddressMixin
  * Order
  * OrderState
@lasley
lasley force-pushed the bugfix/0.1/phone-address-enum branch from faeb76b to 7353e9a Compare October 18, 2016 20:46
@lasley lasley added this to the 1.0 milestone Oct 18, 2016
@codecov-io

codecov-io commented Oct 18, 2016

Copy link
Copy Markdown

Current coverage is 97.63% (diff: 100%)

Merging #20 into release/0.1 will increase coverage by 0.01%

@@           release/0.1        #20   diff @@
=============================================
  Files               59         59          
  Lines             1552       1562    +10   
  Methods              0          0          
  Messages             0          0          
  Branches            38         38          
=============================================
+ Hits              1515       1525    +10   
+ Misses              20         19     -1   
- Partials            17         18     +1   

Powered by Codecov. Last update f80c79b...7353e9a

@lasley

lasley commented Oct 18, 2016

Copy link
Copy Markdown
Member Author

Ready for review:

>>> from carepoint import Carepoint
>>> 
>>> cp = Carepoint(
...     server='10.0.13.73',
...     user='${USER}',
...     passwd='${PASS}',
... )
>>> model_obj = cp['PatientAddress']
>>> res = cp.search(model_obj, {'pat_id':1003})
>>> print res[0].addr_type_cn
2
>>> print res[0].addr_type
EnumAddressType.home
>>> print res[0].addr_type.name
home
>>> print res[0].addr_type.value
2

@tedsalmon tedsalmon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 LGTM!

@tedsalmon
tedsalmon merged commit d70b452 into release/0.1 Oct 18, 2016
@tedsalmon
tedsalmon deleted the bugfix/0.1/phone-address-enum branch October 18, 2016 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants