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