def list(self, ): """List. """ request_data = {} errors_mapping = {} errors_mapping[('FILTER_NOT_FOUND', None)] = FilterNotFound( 'The filter can not be found. The error_subtype will hold the filter UUID' ) errors_mapping[('INVALID_CONDITION', None)] = InvalidCondition( 'The condition is not support. The error_subtype will hold the filter expression this applies to' ) errors_mapping[('INVALID_FIELD', None)] = InvalidField( 'The field is not valid for this object. The error_subtype will hold the filter expression this applies to' ) errors_mapping[('INVALID_SORT_FIELD', None)] = InvalidSortField( 'The field is not valid for this object. The error_subtype will hold the field name this applies to' ) errors_mapping[('INVALID_SORT_ORDER', None)] = InvalidSortOrder( 'The sort order for the field is invalid. The error_subtype will hold the field name this applies to' ) query_data = { 'api': self._api, 'url': '/query/list', 'request_data': request_data, 'errors_mapping': errors_mapping, 'required_sid': True, } query_data['paginated_field'] = 'queries' return AsyncQueryOPSF(**query_data)
def transform_list( self, account_id, ): """Transform list. :param account_id: The account uuid """ request_data = { 'account_id': account_id, } errors_mapping = {} errors_mapping[('FILTER_NOT_FOUND', None)] = FilterNotFound('The filter can not be found. The error_subtype will hold the filter UUID') errors_mapping[('INVALID_CONDITION', None)] = InvalidCondition('The condition is not support. The error_subtype will hold the filter expression this applies to') errors_mapping[('INVALID_FIELD', None)] = InvalidField('The field is not valid for this object. The error_subtype will hold the filter expression this applies to') errors_mapping[('INVALID_SORT_FIELD', None)] = InvalidSortField('The field is not valid for this object. The error_subtype will hold the field name this applies to') errors_mapping[('INVALID_SORT_ORDER', None)] = InvalidSortOrder('The sort order for the field is invalid. The error_subtype will hold the field name this applies to') errors_mapping[('MISSING_FIELDS', None)] = MissingFields('A required field is missing or does not have data in it. The error_subtype holds a array of all the missing fields') errors_mapping[('NOT_FOUND', None)] = NotFound('The account can not be found') errors_mapping[('NOT_PERMITTED', None)] = NotPermitted('You are not permitted to view this list') query_data = { 'api': self._api, 'url': '/hl7/transform/list', 'request_data': request_data, 'errors_mapping': errors_mapping, 'required_sid': True, } query_data['paginated_field'] = 'transforms' return AsyncQueryOPSF(**query_data)
def namespace_list( self, account_id=None, plus_phr=None, ): """Namespace list. :param account_id: Only return the namespaces for this account (optional) :param plus_phr: Flag to include the PHR account as well if account_id was specified (optional) """ request_data = { 'plus_phr': plus_phr, 'account_id': account_id, } errors_mapping = {} errors_mapping['FILTER_NOT_FOUND'] = FilterNotFound('The filter can not be found. The error_subtype will hold the filter UUID') errors_mapping['INVALID_CONDITION'] = InvalidCondition('The condition is not support. The error_subtype will hold the filter expression this applies to') errors_mapping['INVALID_FIELD'] = InvalidField('The field is not valid for this object. The error_subtype will hold the filter expression this applies to') query_data = { 'api': self._api, 'url': '/user/namespace/list', 'request_data': request_data, 'errors_mapping': errors_mapping, 'required_sid': True, } return QueryOF(**query_data)
def template_list( self, account_id, active=None, type=None, ): """Template list. :param account_id: uuid of the account :param active: Limit to active templates (optional) :param type: Limit to this type (optional) """ request_data = { 'active': active, 'account_id': account_id, 'type': type, } errors_mapping = {} errors_mapping['FILTER_NOT_FOUND'] = FilterNotFound('The filter can not be found. The error_subtype will hold the filter UUID') errors_mapping['INVALID_CONDITION'] = InvalidCondition('The condition is not support. The error_subtype will hold the filter expression this applies to') errors_mapping['INVALID_FIELD'] = InvalidField('The field is not valid for this object. The error_subtype will hold the filter expression this applies to') errors_mapping['INVALID_SORT_FIELD'] = InvalidSortField('The field is not valid for this object. The error_subtype will hold the field name this applies to') errors_mapping['INVALID_SORT_ORDER'] = InvalidSortOrder('The sort order for the field is invalid. The error_subtype will hold the field name this applies to') errors_mapping['MISSING_FIELDS'] = MissingFields('A required field is missing or does not have data in it. The error_subtype holds a array of all the missing fields') errors_mapping['NOT_PERMITTED'] = NotPermitted('You are not permitted to perform this operation') query_data = { 'api': self._api, 'url': '/radreport/template/list', 'request_data': request_data, 'errors_mapping': errors_mapping, 'required_sid': True, } query_data['paginated_field'] = 'templates' return QueryOPSF(**query_data)
def list(self, ): """List. """ request_data = {} errors_mapping = {} errors_mapping['FILTER_NOT_FOUND'] = FilterNotFound( 'The filter can not be found. The error_subtype will hold the filter UUID' ) errors_mapping['INVALID_CONDITION'] = InvalidCondition( 'The condition is not support. The error_subtype will hold the filter expression this applies to' ) errors_mapping['INVALID_FIELD'] = InvalidField( 'The field is not valid for this object. The error_subtype will hold the filter expression this applies to' ) errors_mapping['INVALID_SORT_FIELD'] = InvalidSortField( 'The field is not valid for this object. The error_subtype will hold the field name this applies to' ) errors_mapping['INVALID_SORT_ORDER'] = InvalidSortOrder( 'The sort order for the field is invalid. The error_subtype will hold the field name this applies to' ) errors_mapping['MISSING_FIELDS'] = MissingFields( 'A required field is missing or does not have data in it. The error_subtype holds a array of all the missing fields' ) query_data = { 'api': self._api, 'url': '/message/list', 'request_data': request_data, 'errors_mapping': errors_mapping, 'required_sid': True, } query_data['paginated_field'] = 'messages' return QueryOPSF(**query_data)
def list( self, account_id, type, ): """List. :param account_id: Limit to global filters and filters within the account namespaces :param type: The type of filter to list """ request_data = { 'account_id': account_id, 'type': type, } errors_mapping = {} errors_mapping['FILTER_NOT_FOUND'] = FilterNotFound('The filter can not be found. The error_subtype will hold the filter UUID') errors_mapping['INVALID_CONDITION'] = InvalidCondition('The condition is not support. The error_subtype will hold the filter expression this applies to') errors_mapping['INVALID_FIELD'] = InvalidField('The field is not valid for this object. The error_subtype will hold the filter expression this applies to') errors_mapping['INVALID_SORT_FIELD'] = InvalidSortField('The field is not valid for this object. The error_subtype will hold the field name this applies to') errors_mapping['INVALID_SORT_ORDER'] = InvalidSortOrder('The sort order for the field is invalid. The error_subtype will hold the field name this applies to') query_data = { 'api': self._api, 'url': '/filter/list', 'request_data': request_data, 'errors_mapping': errors_mapping, 'required_sid': True, } query_data['paginated_field'] = 'filters' return QueryOPSF(**query_data)
def public( self, account_id, ): """Public. :param account_id: The account the user is in """ request_data = { 'account_id': account_id, } errors_mapping = {} errors_mapping['FILTER_NOT_FOUND'] = FilterNotFound('The filter can not be found. The error_subtype will hold the filter UUID') errors_mapping['INVALID_CONDITION'] = InvalidCondition('The condition is not support. The error_subtype will hold the filter expression this applies to') errors_mapping['INVALID_FIELD'] = InvalidField('The field is not valid for this object. The error_subtype will hold the filter expression this applies to') errors_mapping['INVALID_FILTER'] = InvalidFilter('Invalid filter field') errors_mapping['INVALID_SORT_FIELD'] = InvalidSortField('The field is not valid for this object. The error_subtype will hold the field name this applies to') errors_mapping['INVALID_SORT_ORDER'] = InvalidSortOrder('The sort order for the field is invalid. The error_subtype will hold the field name this applies to') errors_mapping['MISSING_FIELDS'] = MissingFields('A required field is missing or does not have data in it. The error_subtype holds a array of all the missing fields') errors_mapping['NOT_FOUND'] = NotFound('The node or account can not be found') errors_mapping['NOT_PERMITTED'] = NotPermitted('You are not permitted to do this') query_data = { 'api': self._api, 'url': '/node/public', 'request_data': request_data, 'errors_mapping': errors_mapping, 'required_sid': True, } query_data['paginated_field'] = 'nodes' return QueryOPSF(**query_data)
def progress_list( self, destination_id=None, node_id=None, ): """Progress list. :param destination_id: destination_id :param node_id: node_id Notes: (node_id OR destination_id) - The node or destination id """ request_data = { 'destination_id': destination_id, 'node_id': node_id, } errors_mapping = {} errors_mapping['FILTER_NOT_FOUND'] = FilterNotFound('The filter can not be found. The error_subtype will hold the filter UUID') errors_mapping['INVALID_CONDITION'] = InvalidCondition('The condition is not support. The error_subtype will hold the filter expression this applies to') errors_mapping['INVALID_FIELD'] = InvalidField('The field is not valid for this object. The error_subtype will hold the filter expression this applies to') errors_mapping['INVALID_SORT_FIELD'] = InvalidSortField('The field is not valid for this object. The error_subtype will hold the field name this applies to') errors_mapping['INVALID_SORT_ORDER'] = InvalidSortOrder('The sort order for the field is invalid. The error_subtype will hold the field name this applies to') errors_mapping['MISSING_FIELDS'] = MissingFields('A required field is missing or does not have data in it. The error_subtype holds a array of all the missing fields') errors_mapping['NOT_FOUND'] = NotFound('The node can not be found') errors_mapping['NOT_PERMITTED'] = NotPermitted('You are not permitted to do this') query_data = { 'api': self._api, 'url': '/node/progress/list', 'request_data': request_data, 'errors_mapping': errors_mapping, 'required_sid': True, } query_data['paginated_field'] = 'progresses' return QueryOPSF(**query_data)
def list( self, object=None, ): """List. :param object: object Notes: object - Object class (Study OR User_account OR Group OR Location OR Account OR Patient OR Case OR Order OR Message) """ request_data = { 'object': object, } errors_mapping = {} errors_mapping['FILTER_NOT_FOUND'] = FilterNotFound('The filter can not be found. The error_subtype will hold the filter UUID') errors_mapping['INVALID_CONDITION'] = InvalidCondition('The condition is not support. The error_subtype will hold the filter expression this applies to') errors_mapping['INVALID_FIELD'] = InvalidField('The field is not valid for this object. The error_subtype will hold the filter expression this applies to') errors_mapping['INVALID_SORT_FIELD'] = InvalidSortField('The field is not valid for this object. The error_subtype will hold the field name this applies to') errors_mapping['INVALID_SORT_ORDER'] = InvalidSortOrder('The sort order for the field is invalid. The error_subtype will hold the field name this applies to') query_data = { 'api': self._api, 'url': '/tag/list', 'request_data': request_data, 'errors_mapping': errors_mapping, 'required_sid': True, } query_data['paginated_field'] = 'tags' return QueryOPSF(**query_data)
def account( self, account_id, download=None, reverse=None, ): """Account. :param account_id: The id of the account :param download: Flag to create a zipped CSV file. A report_id will be returned and the file can be accessed via /report/status and /report/zip (optional) :param reverse: Flag to reverse the default sort order (optional) """ request_data = { 'reverse': reverse, 'download': download, 'account_id': account_id, } errors_mapping = {} errors_mapping['FILTER_NOT_FOUND'] = FilterNotFound('The filter can not be found. The error_subtype will hold the filter UUID') errors_mapping['INVALID_CONDITION'] = InvalidCondition('The condition is not support. The error_subtype will hold the filter expression this applies to') errors_mapping['INVALID_FIELD'] = InvalidField('The field is not valid for this object. The error_subtype will hold the filter expression this applies to') errors_mapping['MISSING_FIELDS'] = MissingFields('A required field is missing or does not have data in it. The error_subtype holds a array of all the missing fields') errors_mapping['NOT_FOUND'] = NotFound('The account was not found') errors_mapping['NOT_PERMITTED'] = NotPermitted('You are not permitted to access this information') query_data = { 'api': self._api, 'url': '/audit/account', 'request_data': request_data, 'errors_mapping': errors_mapping, 'required_sid': True, } query_data['paginated_field'] = 'events' return QueryOPF(**query_data)
def list_count( self, account_id, ): """List count. :param account_id: Limit to activities in this account and the personal activities """ request_data = { 'account_id': account_id, } errors_mapping = {} errors_mapping['FILTER_NOT_FOUND'] = FilterNotFound( 'The filter can not be found. The error_subtype will hold the filter UUID' ) errors_mapping['INVALID_CONDITION'] = InvalidCondition( 'The condition is not support. The error_subtype will hold the filter expression this applies to' ) errors_mapping['INVALID_FIELD'] = InvalidField( 'The field is not valid for this object. The error_subtype will hold the filter expression this applies to' ) errors_mapping['MISSING_FIELDS'] = MissingFields( 'A required field is missing or does not have data in it. The error_subtype holds a array of all the missing fields' ) errors_mapping['RUNNING'] = Running( 'This call is currently runnning for the user') query_data = { 'api': self._api, 'url': '/activity/list/count', 'request_data': request_data, 'errors_mapping': errors_mapping, 'required_sid': True, } return QueryOF(**query_data)
def deploy_list( self, customcode_id=None, namespace_id=None, ): """Deploy list. :param customcode_id: customcode_id :param namespace_id: namespace_id Notes: (namespace_id OR customcode_id) - uuid of either the namespace or customcode to show the deployments for """ request_data = { 'customcode_id': customcode_id, 'namespace_id': namespace_id, } errors_mapping = {} errors_mapping['FILTER_NOT_FOUND'] = FilterNotFound( 'The filter can not be found. The error_subtype will hold the filter UUID' ) errors_mapping['INVALID_CONDITION'] = InvalidCondition( 'The condition is not support. The error_subtype will hold the filter expression this applies to' ) errors_mapping['INVALID_FIELD'] = InvalidField( 'The field is not valid for this object. The error_subtype will hold the filter expression this applies to' ) errors_mapping['INVALID_SORT_FIELD'] = InvalidSortField( 'The field is not valid for this object. The error_subtype will hold the field name this applies to' ) errors_mapping['INVALID_SORT_ORDER'] = InvalidSortOrder( 'The sort order for the field is invalid. The error_subtype will hold the field name this applies to' ) errors_mapping['MISSING_FIELDS'] = MissingFields( 'A required field is missing or does not have data in it. The error_subtype holds a array of all the missing fields' ) errors_mapping['NOT_FOUND'] = NotFound( 'The namespace or customcode can not be found') errors_mapping['NOT_PERMITTED'] = NotPermitted( 'You are not permitted to do this') query_data = { 'api': self._api, 'url': '/customcode/deploy/list', 'request_data': request_data, 'errors_mapping': errors_mapping, 'required_sid': True, } query_data['paginated_field'] = 'deployments' return QueryOPSF(**query_data)
def list( self, account_id, strict_account_filter=None, study_extra=None, ): """List. :param account_id: Limit to activities in this account and the personal activities :param strict_account_filter: Flag to apply the account_id to personal activites as well (optional) :param study_extra: Flag to return extra study fields (optional) """ request_data = { 'account_id': account_id, 'strict_account_filter': strict_account_filter, 'study_extra': study_extra, } errors_mapping = {} errors_mapping[('FILTER_NOT_FOUND', None)] = FilterNotFound( 'The filter can not be found. The error_subtype will hold the filter UUID' ) errors_mapping[('INVALID_CONDITION', None)] = InvalidCondition( 'The condition is not support. The error_subtype will hold the filter expression this applies to' ) errors_mapping[('INVALID_FIELD', None)] = InvalidField( 'The field is not valid for this object. The error_subtype will hold the filter expression this applies to' ) errors_mapping[('INVALID_SORT_FIELD', None)] = InvalidSortField( 'The field is not valid for this object. The error_subtype will hold the field name this applies to' ) errors_mapping[('INVALID_SORT_ORDER', None)] = InvalidSortOrder( 'The sort order for the field is invalid. The error_subtype will hold the field name this applies to' ) errors_mapping[('MISSING_FIELDS', None)] = MissingFields( 'A required field is missing or does not have data in it. The error_subtype holds a array of all the missing fields' ) query_data = { 'api': self._api, 'url': '/activity/list', 'request_data': request_data, 'errors_mapping': errors_mapping, 'required_sid': True, } query_data['paginated_field'] = 'activities' return QueryOPSF(**query_data)
def sps_find( self, account_id, node_id=None, serial_no=None, ): """Sps find. :param account_id: The account uuid if sid authentication is used :param node_id: node_id :param serial_no: serial_no Notes: (sid OR node_id AND serial_no) - Either the sid or the node uuid and serial number """ request_data = { 'serial_no': serial_no, 'node_id': node_id, 'account_id': account_id, } errors_mapping = {} errors_mapping['FILTER_NOT_FOUND'] = FilterNotFound( 'The filter can not be found. The error_subtype will hold the filter UUID' ) errors_mapping['INVALID_CONDITION'] = InvalidCondition( 'The condition is not support. The error_subtype will hold the filter expression this applies to' ) errors_mapping['INVALID_FIELD'] = InvalidField( 'The field is not valid for this object. The error_subtype will hold the filter expression this applies to' ) errors_mapping['MISSING_FIELDS'] = MissingFields( 'A required field is missing or does not have data in it. The error_subtype holds a array of all the missing fields' ) errors_mapping['NOT_FOUND'] = NotFound('The node can not be found') errors_mapping['NOT_PERMITTED'] = NotPermitted( 'You are not permitted to view orders in this account') query_data = { 'api': self._api, 'url': '/order/sps/find', 'request_data': request_data, 'errors_mapping': errors_mapping, 'required_sid': True, } return QueryOF(**query_data)
def list( self, dicom_tags=None, namespace_id=None, study_id=None, ): """List. :param dicom_tags: A JSON list of the DICOM tags to return (optional) :param namespace_id: namespace_id :param study_id: study_id Notes: (study_id OR namespace_id) - uuid of the study or namespace to search """ request_data = { 'study_id': study_id, 'dicom_tags': dicom_tags, 'namespace_id': namespace_id, } errors_mapping = {} errors_mapping['FILTER_NOT_FOUND'] = FilterNotFound( 'The filter can not be found. The error_subtype will hold the filter UUID' ) errors_mapping['INVALID_CONDITION'] = InvalidCondition( 'The condition is not support. The error_subtype will hold the filter expression this applies to' ) errors_mapping['INVALID_FIELD'] = InvalidField( 'The field is not valid for this object. The error_subtype will hold the filter expression this applies to' ) errors_mapping['MISSING_FIELDS'] = MissingFields( 'A required field is missing or does not have data in it. The error_subtype holds a array of all the missing fields' ) errors_mapping['NOT_PERMITTED'] = NotPermitted( 'You are not permitted to view the DICOM data') query_data = { 'api': self._api, 'url': '/dicomdata/list', 'request_data': request_data, 'errors_mapping': errors_mapping, 'required_sid': True, } query_data['paginated_field'] = 'dicomdatas' return QueryOPF(**query_data)
def user_list( self, user_id, ): """User list. :param user_id: The user id """ request_data = { 'user_id': user_id, } errors_mapping = {} errors_mapping[('FILTER_NOT_FOUND', None)] = FilterNotFound( 'The filter can not be found. The error_subtype will hold the filter UUID' ) errors_mapping[('INVALID_CONDITION', None)] = InvalidCondition( 'The condition is not support. The error_subtype will hold the filter expression this applies to' ) errors_mapping[('INVALID_FIELD', None)] = InvalidField( 'The field is not valid for this object. The error_subtype will hold the filter expression this applies to' ) errors_mapping[('INVALID_SORT_FIELD', None)] = InvalidSortField( 'The field is not valid for this object. The error_subtype will hold the field name this applies to' ) errors_mapping[('INVALID_SORT_ORDER', None)] = InvalidSortOrder( 'The sort order for the field is invalid. The error_subtype will hold the field name this applies to' ) errors_mapping[('MISSING_FIELDS', None)] = MissingFields( 'A required field is missing or does not have data in it. The error_subtype holds a array of all the missing fields' ) errors_mapping[('NOT_FOUND', None)] = NotFound('The user was not found.') query_data = { 'api': self._api, 'url': '/radreport/user/list', 'request_data': request_data, 'errors_mapping': errors_mapping, 'required_sid': True, } query_data['paginated_field'] = 'radreports' return AsyncQueryOPSF(**query_data)
def list( self, permissions=None, ): """List. :param permissions: Flag to return the users role and permissions in the accounts (optional) """ request_data = { 'permissions': permissions, } errors_mapping = {} errors_mapping['FILTER_NOT_FOUND'] = FilterNotFound( 'The filter can not be found. The error_subtype will hold the filter UUID' ) errors_mapping['INVALID_CONDITION'] = InvalidCondition( 'The condition is not support. The error_subtype will hold the filter expression this applies to' ) errors_mapping['INVALID_FIELD'] = InvalidField( 'The field is not valid for this object. The error_subtype will hold the filter expression this applies to' ) errors_mapping['INVALID_SORT_FIELD'] = InvalidSortField( 'The field is not valid for this object. The error_subtype will hold the field name this applies to' ) errors_mapping['INVALID_SORT_ORDER'] = InvalidSortOrder( 'The sort order for the field is invalid. The error_subtype will hold the field name this applies to' ) query_data = { 'api': self._api, 'url': '/account/list', 'request_data': request_data, 'errors_mapping': errors_mapping, 'required_sid': True, } query_data['paginated_field'] = 'accounts' return QueryOPSF(**query_data)