{% extends 'base.html' %} {% load static %} {% block title %}Delete Data Source - Hospital Management{% endblock %} {% block content %}
Data Source to be Deleted

{{ data_source.name }}

{{ data_source.description|default:"No description provided" }}

{{ data_source.get_source_type_display }}
{% if data_source.status == 'active' %} Active {% elif data_source.status == 'error' %} Error {% else %} Inactive {% endif %}
{{ data_source.record_count|default:"0"|floatformat:0 }}
{% if data_source.last_sync %} {{ data_source.last_sync|timesince }} ago {% else %} Never {% endif %}
{{ data_source.created_by|default:"System" }}
{{ data_source.created_at|date:"M d, Y" }}
{% if data_source.source_type == 'database' %} {% elif data_source.source_type == 'api' %} {% elif data_source.source_type == 'file' %} {% elif data_source.source_type == 'stream' %} {% endif %}
{{ data_source.get_source_type_display }}
{{ data_source.total_syncs|default:"0" }} Total Syncs
{{ data_source.widgets_count|default:"0" }} Widgets
Deletion Impact
What will be deleted:
  • Data source configuration
    1
  • Cached data records
    {{ data_source.record_count|default:"0"|floatformat:0 }}
  • Sync history
    {{ data_source.total_syncs|default:"0" }}
  • Associated widgets
    {{ data_source.widgets_count|default:"0" }}
What will remain:
  • Original data source
    Safe
  • Other dashboards
    Safe
  • User accounts
    Safe
  • System settings
    Safe
{% if data_source.widgets_count > 0 %}
Warning: This data source is used by {{ data_source.widgets_count }} widget{{ data_source.widgets_count|pluralize }}. Deleting it will break these widgets and they will need to be reconfigured.
{% endif %}
Alternative Actions

Consider these alternatives before deleting the data source:

Deactivate Source

Temporarily disable without deleting data.

Export Data

Download data before deletion.

Backup Configuration

Save configuration for future use.

Edit Source

Modify instead of deleting.

Edit Instead
Confirm Deletion
{% csrf_token %}
{% if data_source.widgets_count > 0 %}
{% endif %}
{% endblock %}