ctmrbio / claritylims

Customizations for our GenoLogics BaseSpace Clarity LIMS
MIT License
2 stars 2 forks source link

Add get_consent #260

Closed boulund closed 3 years ago

boulund commented 3 years ago

Add support for Consent endpoint

boulund commented 3 years ago

I just tested this and the failure modes, and everything seems to work well.

Should be ready to merge to develop @chichackles. I will use when I build the biobank export step later so we only export samples with a valid consent (i.e. OPTIN).

It's straightforward to use:

import clarity_ext_scripts.covid.partner_api_client.PartnerAPIV7Client as client
consent = client.get_consent("000000")  # some valid patient number

This returns the Consent resource from the json response. The actual consent can be accessed by:

>>> consent["policyRule"]["coding"]["code"]
u'OPTIN'
chichackles commented 3 years ago

Merged

От: Fredrik Boulund notifications@github.com Обратный адрес: ctmrbio/claritylims reply@reply.github.com Дата: пятница, 16 октября 2020 г. в 13:31 Кому: ctmrbio/claritylims claritylims@noreply.github.com Копия: Dmitry Chekmenev dmitry.chekmenev@scilifelab.se, Review requested review_requested@noreply.github.com Тема: Re: [ctmrbio/claritylims] Add get_consent (#260)

@boulundhttps://github.com/boulund requested your review on: #260https://github.com/ctmrbio/claritylims/pull/260 Add get_consent.

— You are receiving this because your review was requested. Reply to this email directly, view it on GitHubhttps://github.com/ctmrbio/claritylims/pull/260#event-3885922663, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJFXYOY3UXZDUHTUUBLMGG3SLAVKDANCNFSM4STESGLQ.