예제 #1
0
 def create_columns(self):
     device = self.get_device()
     return [
         AttributeTableColumn('Datetime Added',
                              'datetime_added',
                              default_sort_direction='desc',
                              default_sort=True),
         AttributeTableColumn('Added By',
                              'added_by.get_reversed_name',
                              proxy_field='added_by.last_name'),
         AttributeTableColumn('Problem', 'get_problem_str'),
         AttributeTableColumn('Description', 'description'),
         AttributeTableColumn('Confirmed?', 'is_validated'),
         ActionTableColumn(
             'Edit',
             actions=[
                 ActionItem(
                     'Edit Complaint',
                     GenesisTableLink('gdrives:edit-complaint',
                                      url_args=[
                                          device.pk,
                                          GenesisTableLinkAttrArg('pk')
                                      ])),
                 ActionItem(
                     'RMA Report',
                     GenesisTableLink('gdrives:rma-inspection-pdf',
                                      url_args=[
                                          device.pk,
                                          GenesisTableLinkAttrArg('pk')
                                      ],
                                      prefix=''))
             ])
     ]
예제 #2
0
 def create_columns(self):
     if self.request.user.is_admin():
         actions = [
             ActionItem(
                 'Detail',
                 GenesisTableLink('accounts:manage-professionals-detail',
                                  url_args=[GenesisTableLinkAttrArg('pk')]))
         ]
     else:
         actions = [
             ActionItem(
                 'Edit Professional',
                 GenesisTableLink('accounts:manage-professionals-edit',
                                  url_args=[GenesisTableLinkAttrArg('pk')
                                            ])),
             ActionItem(
                 'Manage Patients',
                 GenesisTableLink('accounts:manage-professionals-patients',
                                  url_args=[GenesisTableLinkAttrArg('pk')]))
         ]
     return [
         AttributeTableColumn('Contact Name',
                              'get_reversed_name',
                              cell_class='main',
                              proxy_field='last_name'),
         AttributeTableColumn('Contact #',
                              'professional_profile.contact.phone',
                              sortable=False),
         AttributeTableColumn('# of Patients',
                              'professional_profile.patients.count'),
         ActionTableColumn('View', actions=actions)
     ]
예제 #3
0
 def create_columns(self):
     return [
         AttributeTableColumn("Order Created",
                              'datetime_added',
                              searchable=False,
                              default_sort_direction='desc',
                              default_sort=True),
         AttributeTableColumn("Patient",
                              'patient.get_reversed_name',
                              proxy_field='patient.last_name'),
         AttributeTableColumn('Rx Partner', 'rx_partner.name'),
         AttributeTableColumn("Order Type", 'get_order_type_display'),
         AttributeTableColumn("Employer / Group",
                              "patient.patient_profile.company.name"),
         ActionTableColumn(
             "View",
             actions=[
                 ActionItem(
                     'Details',
                     GenesisTableLink(
                         'orders:details',
                         url_args=[GenesisTableLinkAttrArg('id')]))
             ]),
         ActionTableColumn(
             "Claim",
             actions=[
                 ActionItem(
                     'Claim Order',
                     GenesisTableLink(
                         'orders:claim',
                         url_args=[GenesisTableLinkAttrArg('id')]))
             ])
     ]
 def create_columns(self):
     return [
         AttributeTableColumn('Carton Number', 'number'),
         AttributeTableColumn('Lot Number', 'lot_number'),
         AttributeTableColumn('Date Shipped', 'date_shipped'),
         ActionTableColumn(
             'Actions',
             actions=[
                 ActionItem('Inspect',
                            GenesisTableLink(
                                'gdrives:inspect-manufacturer-carton',
                                url_args=[GenesisTableLinkAttrArg('pk')]),
                            condition=['!is_inspected']),
                 ActionItem('Inspection Report',
                            GenesisTableLink(
                                'gdrives:manufacturer-carton-pdf',
                                url_args=[GenesisTableLinkAttrArg('pk')],
                                prefix=''),
                            condition=['is_inspected']),
                 ActionItem(
                     'Edit',
                     GenesisTableLink(
                         'gdrives:edit-manufacturer-carton',
                         url_args=[GenesisTableLinkAttrArg('pk')]))
             ])
     ]
예제 #5
0
 def create_columns(self):
     return [
         AttributeTableColumn(
             "Shipment Created",
             'shipped_date',
             searchable=False,
             default_sort_direction='desc',
             default_sort=True
         ),
         AttributeTableColumn(
             "Patient",
             'order.patient.get_reversed_name',
             proxy_field='order.patient.last_name'),
         AttributeTableColumn('Rx Partner', 'order.rx_partner.name'),
         AttributeTableColumn("Order Type", 'order.get_order_type_display'),
         AttributeTableColumn("Category", 'order.category.name'),
         AttributeTableColumn(
             "Employer / Group",
             "order.patient.patient_profile.company.name"),
         AttributeTableColumn("Tracking Number", "tracking_number"),
         ActionTableColumn(
             "Details",
             actions=[
                 ActionItem(
                     'Details',
                     GenesisTableLink(
                         'orders:details',
                         url_args=[GenesisTableLinkAttrArg('order.id')]
                     ))
             ]
         ),
         ActionTableColumn(
             "Edit Shipment",
             actions=[
                 ActionItem(
                     'Edit Shipment',
                     GenesisTableLink(
                         'orders:edit-shipment',
                         url_args=[GenesisTableLinkAttrArg('id')]
                     ))
             ]
         ),
         ActionTableColumn(
             "Packing List",
             actions=[
                 ActionItem(
                     'Packing List',
                     GenesisTableLink(
                         'orders:shipment-packing-list',
                         url_args=[GenesisTableLinkAttrArg('order.id')],
                         prefix=''
                     ))
             ]
         )
     ]
예제 #6
0
 def create_columns(self):
     return [
         AttributeTableColumn('Last Name', 'last_name', cell_class='main'),
         AttributeTableColumn('First Name', 'first_name'),
         AttributeTableColumn('Business Partner',
                              'get_profile.business_partner',
                              failsafe='None',
                              searchable=False,
                              sortable=False),
         AttributeTableColumn('Employer',
                              'get_profile.company',
                              failsafe='None',
                              searchable=False,
                              sortable=False),
         AttributeTableColumn('Date of Birth',
                              'get_profile.date_of_birth',
                              sortable=False),
         AttributeTableColumn('Address',
                              'get_profile.contact.address1',
                              searchable=False,
                              sortable=False),
         AttributeTableColumn('City',
                              'get_profile.contact.city',
                              searchable=False,
                              sortable=False),
         AttributeTableColumn('State',
                              'get_profile.contact.state',
                              searchable=False,
                              sortable=False),
         AttributeTableColumn('Zip',
                              'get_profile.contact.zip',
                              searchable=False,
                              sortable=False),
         AttributeTableColumn('Login Type',
                              'get_profile.login_type',
                              searchable=False,
                              sortable=False),
         ActionTableColumn(
             'View',
             actions=[
                 ActionItem('Details',
                            GenesisTableLink(
                                'accounts:manage-patients-detail',
                                url_args=[GenesisTableLinkAttrArg('pk')]),
                            condition=['is_patient']),
                 ActionItem('Details',
                            GenesisTableLink(
                                'accounts:manage-professionals-detail',
                                url_args=[GenesisTableLinkAttrArg('pk')]),
                            condition=['is_professional'])
             ])
     ]
예제 #7
0
 def create_columns(self):
     group = self.get_group()
     if group:
         url_args = [group.id]
         edit_patient_link = 'accounts:manage-groups-demo-edit'
     else:
         url_args = []
         edit_patient_link = 'accounts:manage-demo-edit'
     return [
         AttributeTableColumn('Name', 'get_reversed_name'),
         AttributeTableColumn('MEID', 'patient_profile.get_device.meid'),
         AttributeTableColumn('Last Reading',
                              'patient_profile.get_last_reading_date',
                              searchable=False),
         AttributeTableColumn('Device Assigned Date',
                              'patient_profile.get_device_assigned_date',
                              searchable=False),
         AttributeTableColumn('Groups',
                              'patient_profile.group_list',
                              sortable=False),
         ActionTableColumn(
             'Actions',
             actions=[
                 ActionItem(
                     'Edit Patient',
                     GenesisTableLink(edit_patient_link,
                                      url_args=url_args +
                                      [GenesisTableLinkAttrArg('pk')])),
                 ActionItem('View Device',
                            GenesisTableLink(
                                'gdrives:edit',
                                url_args=[
                                    GenesisTableLinkAttrArg(
                                        'patient_profile.get_device.id')
                                ],
                            ),
                            condition='patient_profile.get_device'),
                 ActionItem(
                     'Manage Login',
                     GenesisTableLink(
                         'accounts:manage-login',
                         url_args=[GenesisTableLinkAttrArg('pk')])),
                 ActionItem(
                     'View Reports',
                     GenesisTableLink(
                         'reports:patient-index',
                         url_args=[GenesisTableLinkAttrArg('pk')]))
             ])
     ]
예제 #8
0
    def create_columns(self):
        group = self.get_group()
        if self.request.user.is_admin():
            edit_url_name = 'accounts:manage-groups-companies-edit'
            url_args = [group.id]
        else:
            edit_url_name = 'accounts:manage-companies-edit'
            url_args = []
        columns = [
            AttributeTableColumn('Name', 'name', cell_class='main'),
            AttributeTableColumn('Payor/TPA', 'payor.name'),
            AttributeTableColumn('# of Patients', 'patients.count',
                                 searchable=False),
            AttributeTableColumn('Contact Name', 'contact.get_full_name'),
            AttributeTableColumn('Contact #', 'contact.phone', sortable=False),
            AttributeTableColumn('Address', 'contact.get_full_address'),
            AttributeTableColumn('City', 'contact.city'),
            AttributeTableColumn('State', 'contact.state'),
            AttributeTableColumn('Zip', 'contact.zip'),
            ActionTableColumn(
                'Actions',
                actions=[
                    ActionItem(
                        'Edit Company',
                        GenesisTableLink(
                            edit_url_name,
                            url_args=url_args + [
                                GenesisTableLinkAttrArg('pk')]
                        )
                    ),

                ]
            )
        ]
        if self.request.user.is_admin():
            columns.append(ActionTableColumn(
                'Admin',
                actions=[
                    ActionItem(
                        'Admin',
                        GenesisTableLink(
                            'accounts:manage-groups-companies-admin',
                            url_args=url_args + [GenesisTableLinkAttrArg('pk')]
                        )
                    )
                ]
            ))
        return columns
예제 #9
0
    def create_columns(self):
        group = self.get_group()
        if group:
            edit_link = 'accounts:manage-groups-payors-edit'
            url_args = [group.pk]
        else:
            edit_link = 'accounts:manage-payors-edit'
            url_args = []

        return [
            AttributeTableColumn('Payor/TPA', 'name', cell_class='main'),
            AttributeTableColumn('# of Patients', 'get_patients.count'),
            AttributeTableColumn('# of Employers', 'companies.all.count'),
            AttributeTableColumn('Contact Name', 'contact.get_full_name'),
            AttributeTableColumn('Contact #', 'contact.phone'),
            AttributeTableColumn('Address', 'contact.get_full_address'),
            AttributeTableColumn('City', 'contact.city'),
            AttributeTableColumn('State', 'contact.state'),
            AttributeTableColumn('Zip', 'contact.zip'),
            ActionTableColumn(
                'Actions',
                actions=[
                    ActionItem(
                        'Edit Payor/TPA',
                        GenesisTableLink(edit_link,
                                         url_args=url_args +
                                         [GenesisTableLinkAttrArg('pk')]))
                ])
        ]
예제 #10
0
 def create_columns(self):
     days = self.get_days()
     return [
         AttributeTableColumn('Last Name', 'last_name', cell_class='main'),
         AttributeTableColumn('First Name', 'first_name'),
         AttributeTableColumn('Contact #',
                              'patient_profile.contact.phone',
                              sortable=False),
         AttributeTableColumn(
             'Compliance',
             'patient_profile.stats.readings_last_{0}'.format(days),
             string_format='%1.f'),
         AttributeTableColumn(
             'Testing Compliance',
             'patient_profile.get_compliance_for_professional',
             func_args=[self.request.user],
             searchable=False),
         AttributeTableColumn('Last Reading Date',
                              'patient_profile.get_last_reading_display',
                              searchable=False),
         ActionTableColumn(
             'Reports',
             actions=[
                 ActionItem(
                     'View Reports',
                     GenesisTableLink(
                         'reports:patient-index',
                         url_args=[GenesisTableLinkAttrArg('pk')]))
             ])
     ]
예제 #11
0
 def create_columns(self):
     return [
         AttributeTableColumn('MEID', 'meid'),
         AttributeTableColumn('Serial #', 'device_id'),
         AttributeTableColumn('Warehouse Carton #',
                              'warehouse_carton.number'),
         AttributeTableColumn('Lot #', 'manufacturer_carton.lot_number'),
         AttributeTableColumn('Last Reading',
                              'last_reading.reading_datetime_utc',
                              searchable=False,
                              sortable=False),
         AttributeTableColumn('Device Status',
                              'get_network_status_display',
                              searchable=False,
                              proxy_field='network_status'),
         ActionTableColumn(
             'View',
             actions=[
                 ActionItem(
                     'View',
                     GenesisTableLink(
                         'gdrives:detail',
                         url_args=[GenesisTableLinkAttrArg('pk')]))
             ])
     ]
예제 #12
0
 def create_columns(self):
     return [
         AttributeTableColumn("Datetime Added",
                              'datetime_added',
                              searchable=False,
                              default_sort_direction='desc',
                              default_sort=True),
         AttributeTableColumn("Patient",
                              'patient.get_reversed_name',
                              proxy_field='patient.last_name'),
         AttributeTableColumn('Rx Partner', 'rx_partner.name'),
         AttributeTableColumn("Order Type",
                              'get_order_type_display',
                              proxy_field='order_type'),
         AttributeTableColumn("Order Category", 'category.name'),
         AttributeTableColumn("Employer / Group",
                              "patient.patient_profile.company.name"),
         AttributeTableColumn("Order Origin",
                              'get_order_origin_display',
                              proxy_field='order_origin'),
         AttributeTableColumn("Held By",
                              'hold_requested_by.get_reversed_name',
                              proxy_field='hold_requested_by.last_name'),
         AttributeTableColumn("Hold Reason", 'hold_reason'),
         ActionTableColumn(
             "Details",
             actions=[
                 ActionItem(
                     'Details',
                     GenesisTableLink(
                         'orders:details',
                         url_args=[GenesisTableLinkAttrArg('id')]))
             ])
     ]
예제 #13
0
 def create_columns(self):
     days = self.get_days()
     return [
         AttributeTableColumn('Last Name', 'last_name', cell_class='main'),
         AttributeTableColumn('First Name', 'first_name'),
         AttributeTableColumn('Contact #',
                              'patient_profile.contact.phone',
                              sortable=False),
         AttributeTableColumn(
             'Daily Glucose',
             'patient_profile.stats.average_value_last_{0}'.format(days),
             string_format='%1.f',
             searchable=False),
         AttributeTableColumn('Target Ranges',
                              'patient_profile.target_range_breakdown',
                              func_args=[self.request.user],
                              searchable=False),
         AttributeTableColumn('Last Reading Date',
                              'patient_profile.get_last_reading_display',
                              searchable=False),
         ActionTableColumn(
             'Reports',
             actions=[
                 ActionItem(
                     'View Reports',
                     GenesisTableLink(
                         'reports:patient-index',
                         url_args=[GenesisTableLinkAttrArg('pk')]))
             ])
     ]
예제 #14
0
 def get_columns(self):
     return [
         AttributeTableColumn(
             'Datetime Added',
             'datetime_added',
             default_sort_direction='desc',
             default_sort=True),
         AttributeTableColumn(
             'Order Status',
             'get_order_status_display',
             proxy_field='order_status'),
         AttributeTableColumn(
             'Order Origin',
             'get_order_origin_display',
             proxy_field='order_origin'),
         ActionTableColumn(
             'Details',
             actions=[
                 ActionItem(
                     'Details',
                     GenesisTableLink(
                         'orders:details',
                         url_args=[GenesisTableLinkAttrArg('pk')]
                     )
                 )
             ]
         )
     ]
예제 #15
0
 def create_columns(self):
     return [
         AttributeTableColumn('MEID', 'meid'),
         AttributeTableColumn('Serial #', 'device_id'),
         AttributeTableColumn('Patient',
                              'patient.get_reversed_name',
                              searchable=False,
                              proxy_field='patient.last_name'),
         AttributeTableColumn(
             'Patient Status',
             'patient.patient_profile.get_account_status_display',
             searchable=False,
             proxy_field='patient.patient_profile.account_status'),
         AttributeTableColumn('Last Reading',
                              'get_last_reading_date',
                              searchable=False,
                              sortable=False),
         AttributeTableColumn('Device Status',
                              'get_network_status_display',
                              searchable=True,
                              proxy_field='network_status'),
         ActionTableColumn(
             'View',
             actions=[
                 ActionItem(
                     'View',
                     GenesisTableLink(
                         'gdrives:detail',
                         url_args=[GenesisTableLinkAttrArg('pk')]))
             ])
     ]
예제 #16
0
 def create_columns(self):
     return [
         AttributeTableColumn('Datetime Added',
                              'datetime_added',
                              default_sort_direction='desc',
                              default_sort=True),
         AttributeTableColumn('Added By',
                              'added_by.get_reversed_name',
                              proxy_field='added_by.last_name',
                              searchable=False),
         AttributeTableColumn('Reference Number', 'id'),
         AttributeTableColumn('Patient',
                              'patient.get_reversed_name',
                              proxy_field='patient.last_name'),
         AttributeTableColumn('Business Partner',
                              'patient.patient_profile.group.name'),
         AttributeTableColumn('Subject', 'subject'),
         AttributeTableColumn('Last Updated', 'datetime_updated'),
         AttributeTableColumn('Last Updated By',
                              'last_updated_by.get_reversed_name',
                              proxy_field='last_updated_by.last_name'),
         AttributeTableColumn('Status', 'status.name'),
         ActionTableColumn(
             'View',
             actions=[
                 ActionItem(
                     'View',
                     GenesisTableLink(
                         'accounts:edit-communication',
                         url_args=[
                             GenesisTableLinkAttrArg('patient.pk'),
                             GenesisTableLinkAttrArg('pk')
                         ])),
                 ActionItem(
                     'Report',
                     GenesisTableLink(
                         'accounts:communication-report-pdf',
                         url_args=[
                             GenesisTableLinkAttrArg('patient.pk'),
                             GenesisTableLinkAttrArg('pk')
                         ],
                         prefix=''))
             ])
     ]
예제 #17
0
 def create_columns(self):
     return [
         AttributeTableColumn(
             'Datetime Added',
             'datetime_added'),
         AttributeTableColumn(
             'Datetime Due',
             'datetime_due',
             default_sort_direction='asc',
             default_sort=True
         ),
         AttributeTableColumn('Name', 'name'),
         AttributeTableColumn('Type', 'item_type'),
         AttributeTableColumn('Status', 'status'),
         AttributeTableColumn('Passed QA?', 'is_passed_qa'),
         ActionTableColumn(
             'View',
             actions=[
                 ActionItem(
                     'View',
                     GenesisTableLink(
                         'work_queue:view-item',
                         url_args=[GenesisTableLinkAttrArg('pk')])
                 ),
                 ActionItem(
                     'Approve',
                     GenesisTableLink(
                         'work_queue:approve-item',
                         url_args=[GenesisTableLinkAttrArg('pk')]
                     ),
                     condition=['!is_passed_qa']
                 ),
                 ActionItem(
                     'Delay',
                     GenesisTableLink(
                         'work_queue:delay-item',
                         url_args=[GenesisTableLinkAttrArg('pk')]
                     )
                 )
             ]
         )
     ]
예제 #18
0
 def create_columns(self):
     patient = self.get_patient()
     return [
         AttributeTableColumn(
             'Datetime Added',
             'datetime_added',
             default_sort_direction='desc',
             default_sort=True),
         AttributeTableColumn(
             'Added By',
             'added_by.get_reversed_name',
             proxy_field='added_by.last_name'),
         AttributeTableColumn('Subject', 'subject'),
         AttributeTableColumn('Last Updated', 'datetime_updated'),
         AttributeTableColumn(
             'Last Updated By',
             'last_updated_by.get_reversed_name',
             proxy_field='last_updated_by.last_name'),
         AttributeTableColumn('Status', 'status.name'),
         ActionTableColumn(
             'View',
             actions=[
                 ActionItem(
                     'View',
                     GenesisTableLink(
                         'accounts:edit-communication',
                         url_args=[patient.pk,
                                   GenesisTableLinkAttrArg('pk')])
                 ),
                 ActionItem(
                     'Report',
                     GenesisTableLink(
                         'accounts:communication-report-pdf',
                         url_args=[patient.pk,
                                   GenesisTableLinkAttrArg('pk')],
                         prefix='')
                 )
             ]
         )
     ]
예제 #19
0
 def create_columns(self):
     parent = self.get_parent()
     patient = parent.get_patient()
     request = self.get_request()
     actions = []
     if request and request.user.is_superuser:
         actions.extend([
             ActionItem('Assign Device',
                        GenesisTableLink('gdrives:assign-to-patient',
                                         url_args=[
                                             GenesisTableLinkAttrArg('pk'),
                                             patient.pk
                                         ]),
                        condition=['!patient']),
             ActionItem('Unassign Device',
                        GenesisTableLink(
                            'gdrives:unassign',
                            url_args=[GenesisTableLinkAttrArg('pk')]),
                        condition=['patient'])
         ])
     actions.append(
         ActionItem(
             'Details',
             GenesisTableLink('gdrives:detail',
                              url_args=[GenesisTableLinkAttrArg('pk')])))
     return [
         AttributeTableColumn('Device No', 'ordinal', cell_class='main'),
         AttributeTableColumn('MEID', 'meid'),
         AttributeTableColumn('Serial #', 'device_id'),
         AttributeTableColumn('Status',
                              'get_status_display',
                              proxy_field='status'),
         AttributeTableColumn('Network Status',
                              'get_network_status_display',
                              proxy_field='network_status'),
         AttributeTableColumn('Assigned', 'datetime_assigned'),
         AttributeTableColumn('Replaced', 'datetime_replaced'),
         ActionTableColumn('Actions', actions=actions)
     ]
예제 #20
0
 def create_columns(self):
     return [
         AttributeTableColumn('MEID', 'meid', cell_class='main'),
         AttributeTableColumn('Serial #', 'device_id'),
         AttributeTableColumn('Group',
                              'group',
                              hide_for_user_types=['professional']),
         # TODO: this column still being used?
         AttributeTableColumn('Status', 'network_status'),
         AttributeTableColumn('Patient',
                              'patient.get_reversed_name',
                              failsafe=''),
         AttributeTableColumn('Last Reading', 'get_last_reading_date'),
         ActionTableColumn(
             'Actions',
             actions=[
                 ActionItem(
                     'Edit Device',
                     GenesisTableLink(
                         'gdrives:edit',
                         url_args=[GenesisTableLinkAttrArg('pk')])),
                 ActionItem(
                     'Delete Device',
                     GenesisTableLink(
                         'gdrives:delete',
                         url_args=[GenesisTableLinkAttrArg('pk')])),
                 ActionItem('Assign Device',
                            GenesisTableLink(
                                'gdrives:assign',
                                url_args=[GenesisTableLinkAttrArg('pk')]),
                            condition=['!patient']),
                 ActionItem('Unassign Device',
                            GenesisTableLink(
                                'gdrives:unassign',
                                url_args=[GenesisTableLinkAttrArg('pk')]),
                            condition=['patient']),
             ])
     ]
예제 #21
0
 def create_columns(self):
     return [
         AttributeTableColumn('Business Partner', 'patient_profile.group.name'),
         AttributeTableColumn('Group/Employer', 'patient_profile.company.name'),
         AttributeTableColumn('Name', 'get_reversed_name', proxy_field='last_name'),
         AttributeTableColumn('DOB', 'patient_profile.date_of_birth'),
         AttributeTableColumn(
             'Phone',
             'patient_profile.contact.phone',
             searchable='patient_profile.contact.phonenumber_set.phone'),
         AttributeTableColumn('Latest Note', 'patient_profile.get_latest_note_summary'),
         ActionTableColumn(
             'View',
             actions=[
                 ActionItem(
                     'View',
                     GenesisTableLink(
                         'accounts:manage-patients-professional-detail',
                         url_args=[GenesisTableLinkAttrArg('pk')]
                     )
                 ),
             ]
         ),
         ActionTableColumn(
             'Testing Details',
             actions=[
                 ActionItem(
                     'Testing Details',
                     GenesisTableLink(
                         'reports:test-history-for-patient',
                         url_args=[GenesisTableLinkAttrArg('pk')]
                     )
                 )
             ]
         )
     ]
예제 #22
0
 def create_columns(self):
     return [
         AttributeTableColumn('Name', 'name'),
         AttributeTableColumn('Part Number', 'part_number'),
         AttributeTableColumn('Unit', 'unit'),
         AttributeTableColumn('Description', 'description'),
         AttributeTableColumn('Manufacturer', 'manufacturer'),
         ActionTableColumn(
             'View',
             actions=[
                 ActionItem(
                     'Detail',
                     GenesisTableLink(
                         'products:edit',
                         url_args=[GenesisTableLinkAttrArg('pk')]))
             ])
     ]
예제 #23
0
 def create_columns(self):
     return [
         AttributeTableColumn('Name', 'name'),
         AttributeTableColumn('Phone Number',
                              'phone_number',
                              sortable=False),
         AttributeTableColumn('Email', 'email'),
         AttributeTableColumn('Active', 'active'),
         ActionTableColumn(
             'Actions',
             actions=[
                 ActionItem(
                     'Edit Alert',
                     GenesisTableLink(
                         'alerts:alerts-edit',
                         url_args=[GenesisTableLinkAttrArg('pk')]))
             ])
     ]
예제 #24
0
 def create_columns(self):
     return [
         AttributeTableColumn('Download Date/Time',
                              'datetime_added',
                              default_sort=True,
                              default_sort_direction="desc"),
         AttributeTableColumn('Valid Until', 'valid_until'),
         AttributeTableColumn('Filename', 'filename'),
         ActionTableColumn(
             'Download',
             actions=[
                 ActionItem(
                     'Download',
                     GenesisTableLink(
                         'reports:temp-download',
                         url_args=[GenesisTableLinkAttrArg('pk')],
                         prefix=""))
             ])
     ]
예제 #25
0
 def create_columns(self):
     return [
         AttributeTableColumn('Name', 'name', cell_class='main'),
         AttributeTableColumn('Type', 'get_group_type_display'),
         AttributeTableColumn('Contact', 'contact'),
         AttributeTableColumn('Number of Patients',
                              'get_patients.count',
                              searchable=False),
         AttributeTableColumn('Number of Professionals',
                              'get_professionals.count',
                              searchable=False),
         ActionTableColumn(
             'View',
             actions=[
                 ActionItem('Detail',
                            GenesisTableLink(
                                'accounts:manage-groups-detail',
                                url_args=[GenesisTableLinkAttrArg('pk')]),
                            required_user_types=['admin']),
             ])
     ]
예제 #26
0
 def create_columns(self):
     return [
         AttributeTableColumn('MEID', 'meid'),
         AttributeTableColumn('Serial #', 'device_id'),
         AttributeTableColumn('Rx Partner', 'rx_partner.name'),
         AttributeTableColumn('Device Status',
                              'get_status_display',
                              searchable=False,
                              proxy_field='status'),
         AttributeTableColumn('Carton #', 'warehouse_carton.number'),
         AttributeTableColumn('Date Shipped', 'date_shipped_to_rx_partner'),
         ActionTableColumn(
             'View',
             actions=[
                 ActionItem(
                     'View',
                     GenesisTableLink(
                         'gdrives:detail',
                         url_args=[GenesisTableLinkAttrArg('pk')]))
             ])
     ]
예제 #27
0
 def create_columns(self):
     return [
         AttributeTableColumn('Order No',
                              'order_number',
                              default_sort=True,
                              default_sort_direction='desc'),
         AttributeTableColumn('Order Date', 'order_date', searchable=False),
         AttributeTableColumn('Meter',
                              'meter_request',
                              sortable=False,
                              searchable=False),
         AttributeTableColumn('Strips',
                              'strips_request',
                              sortable=False,
                              searchable=False),
         AttributeTableColumn('Lancets',
                              'lancet_request',
                              sortable=False,
                              searchable=False),
         AttributeTableColumn('Control Solution',
                              'control_solution_request',
                              sortable=False,
                              searchable=False),
         AttributeTableColumn('Lancing Device',
                              'lancing_device_request',
                              sortable=False,
                              searchable=False),
         AttributeTableColumn('Order Type', 'order_type', sortable=False),
         AttributeTableColumn('Status', 'order_status', sortable=False),
         AttributeTableColumn('Ship Date', 'ship_date', searchable=False),
         ActionTableColumn(
             "Actions",
             actions=[
                 ActionItem(
                     'Details',
                     GenesisTableLink(
                         'epc:patient-orders-details',
                         url_args=[GenesisTableLinkAttrArg('pk')]))
             ]),
     ]
예제 #28
0
 def create_columns(self):
     return [
         AttributeTableColumn('Datetime Added', 'datetime_added'),
         AttributeTableColumn('Patient',
                              'patient.get_reversed_name',
                              proxy_field='patient.last_name'),
         AttributeTableColumn('Rx Partner', 'rx_partner.name'),
         AttributeTableColumn('Category', 'category.name'),
         AttributeTableColumn('Order Status',
                              'get_order_status_display',
                              proxy_field='order_status'),
         AttributeTableColumn('Order Type',
                              'get_order_type_display',
                              proxy_field='order_type'),
         ActionTableColumn(
             "Details",
             actions=[
                 ActionItem(
                     'Details',
                     GenesisTableLink(
                         'orders:details',
                         url_args=[GenesisTableLinkAttrArg('pk')]))
             ])
     ]
예제 #29
0
 def create_columns(self):
     return [
         AttributeTableColumn('EPC Identifier', 'epc_identifier'),
         AttributeTableColumn('Name', 'name'),
         AttributeTableColumn(
             'Address', 'get_full_address', searchable=False),
         AttributeTableColumn('City', 'city', searchable=False),
         AttributeTableColumn('State', 'state', searchable=False),
         AttributeTableColumn('ZIP', 'zip', searchable=False),
         AttributeTableColumn('Contact', 'contact_name', searchable=False),
         AttributeTableColumn(
             'Phone Number', 'phone_number', searchable=False),
         ActionTableColumn(
             "Details",
             actions=[
                 ActionItem(
                     'Details',
                     GenesisTableLink(
                         'pharmacy:details',
                         url_args=[GenesisTableLinkAttrArg('pk')]
                     ))
             ]
         ),
     ]
예제 #30
0
 def create_columns(self):
     parent = self.get_parent()
     patient = parent.get_patient()
     request = self.get_request()
     actions = []
     if request.user.is_superuser:
         actions.append(
             ActionItem('Assign Device',
                        GenesisTableLink('gdrives:assign-to-patient',
                                         url_args=[
                                             GenesisTableLinkAttrArg('pk'),
                                             patient.pk
                                         ]),
                        condition=['!patient']))
     return [
         AttributeTableColumn('MEID', 'meid'),
         AttributeTableColumn('Serial #', 'device_id'),
         AttributeTableColumn('Warehouse Carton #',
                              'warehouse_carton.number'),
         AttributeTableColumn('Lot #', 'manufacturer_carton.lot_number'),
         AttributeTableColumn('Last Reading',
                              'last_reading.reading_datetime_utc'),
         ActionTableColumn('Actions', actions=actions)
     ]