def _get_prescriptions(smart): bundle = MedicationOrder.where({ 'patient': smart.patient_id }).perform(smart.server) pres = [be.resource for be in bundle.entry ] if bundle is not None and bundle.entry is not None else None if pres is not None and len(pres) > 0: return pres return None
def _get_prescriptions(smart): bundle = MedicationOrder.where({'patient': smart.patient_id}).perform(smart.server) pres = [be.resource for be in bundle.entry] if bundle is not None and bundle.entry is not None else None if pres is not None and len(pres) > 0: return pres return None
def _get_prescriptions(smart): return MedicationOrder.where({'patient': smart.patient_id}).perform(smart.server).entry
def _get_prescriptions(smart): return MedicationOrder.where({"patient": smart.patient_id}).perform(smart.server).entry