(self["webpackChunkapp"] = self["webpackChunkapp"] || []).push([["src_app_pages_inpatient-care-treatment-view_inpatient-care-treatment-view_module_ts"],{

/***/ 22423:
/*!*****************************************************************************************************!*\
  !*** ./src/app/pages/inpatient-care-treatment-view/inpatient-care-treatment-view-routing.module.ts ***!
  \*****************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   InpatientCareTreatmentViewPageRoutingModule: () => (/* binding */ InpatientCareTreatmentViewPageRoutingModule)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tslib */ 24398);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ 37580);
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/router */ 95072);
/* harmony import */ var _inpatient_care_treatment_view_page__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./inpatient-care-treatment-view.page */ 50585);




const routes = [{
  path: '',
  component: _inpatient_care_treatment_view_page__WEBPACK_IMPORTED_MODULE_0__.InpatientCareTreatmentViewPage
}];
let InpatientCareTreatmentViewPageRoutingModule = class InpatientCareTreatmentViewPageRoutingModule {};
InpatientCareTreatmentViewPageRoutingModule = (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__decorate)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_2__.NgModule)({
  imports: [_angular_router__WEBPACK_IMPORTED_MODULE_3__.RouterModule.forChild(routes)],
  exports: [_angular_router__WEBPACK_IMPORTED_MODULE_3__.RouterModule]
})], InpatientCareTreatmentViewPageRoutingModule);


/***/ }),

/***/ 66886:
/*!*********************************************************************************************!*\
  !*** ./src/app/pages/inpatient-care-treatment-view/inpatient-care-treatment-view.module.ts ***!
  \*********************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   InpatientCareTreatmentViewPageModule: () => (/* binding */ InpatientCareTreatmentViewPageModule)
/* harmony export */ });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tslib */ 24398);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ 37580);
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/common */ 60316);
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/forms */ 34456);
/* harmony import */ var _ionic_angular__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @ionic/angular */ 21507);
/* harmony import */ var _inpatient_care_treatment_view_routing_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./inpatient-care-treatment-view-routing.module */ 22423);
/* harmony import */ var _inpatient_care_treatment_view_page__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./inpatient-care-treatment-view.page */ 50585);
/* harmony import */ var src_app_components_shared_module__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/components/shared.module */ 47774);








let InpatientCareTreatmentViewPageModule = class InpatientCareTreatmentViewPageModule {};
InpatientCareTreatmentViewPageModule = (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__decorate)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_4__.NgModule)({
  imports: [_angular_common__WEBPACK_IMPORTED_MODULE_5__.CommonModule, _angular_forms__WEBPACK_IMPORTED_MODULE_6__.FormsModule, _ionic_angular__WEBPACK_IMPORTED_MODULE_7__.IonicModule, _inpatient_care_treatment_view_routing_module__WEBPACK_IMPORTED_MODULE_0__.InpatientCareTreatmentViewPageRoutingModule, src_app_components_shared_module__WEBPACK_IMPORTED_MODULE_2__.SharedModule],
  declarations: [_inpatient_care_treatment_view_page__WEBPACK_IMPORTED_MODULE_1__.InpatientCareTreatmentViewPage]
})], InpatientCareTreatmentViewPageModule);


/***/ }),

/***/ 50585:
/*!*******************************************************************************************!*\
  !*** ./src/app/pages/inpatient-care-treatment-view/inpatient-care-treatment-view.page.ts ***!
  \*******************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   InpatientCareTreatmentViewPage: () => (/* binding */ InpatientCareTreatmentViewPage)
/* harmony export */ });
/* harmony import */ var _workdir_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ 89204);
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! tslib */ 24398);
/* harmony import */ var _inpatient_care_treatment_view_page_html_ngResource__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./inpatient-care-treatment-view.page.html?ngResource */ 20355);
/* harmony import */ var _inpatient_care_treatment_view_page_scss_ngResource__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./inpatient-care-treatment-view.page.scss?ngResource */ 8615);
/* harmony import */ var _inpatient_care_treatment_view_page_scss_ngResource__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_inpatient_care_treatment_view_page_scss_ngResource__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/core */ 37580);
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/router */ 95072);
/* harmony import */ var src_app_services_inpatient_care_treatment_api_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! src/app/services/inpatient_care_treatment_api.service */ 62446);
/* harmony import */ var src_app_util_baseHelper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! src/app/util/baseHelper */ 76434);
/* harmony import */ var _app_constants_icons_constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @app/constants/icons.constants */ 35997);

var _InpatientCareTreatmentViewPage;








let InpatientCareTreatmentViewPage = (_InpatientCareTreatmentViewPage = class InpatientCareTreatmentViewPage {
  constructor(activatedRoute, router, api, b) {
    this.activatedRoute = activatedRoute;
    this.router = router;
    this.api = api;
    this.b = b;
    this.icons = _app_constants_icons_constants__WEBPACK_IMPORTED_MODULE_5__.ICONS;
  }
  ngOnInit() {
    var _this = this;
    return (0,_workdir_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      _this.id = _this.activatedRoute.snapshot.paramMap.get('id');
      _this.load(null);
    })();
  }
  /**
   * Load inpatient care treatment data
   */
  load(event) {
    var _this2 = this;
    return (0,_workdir_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
      try {
        const treatmentResponse = yield _this2.api.getTreatment(_this2.id);
        const schemaResponse = yield _this2.api.getFormSchemaAndPrefill();
        if (treatmentResponse.data && schemaResponse.data) {
          // Format response to match survey-view structure
          _this2.response = {
            survey_form: {
              schema: schemaResponse.data.schema || [],
              title: schemaResponse.data.title || 'Inpatient Care Treatment',
              description: schemaResponse.data.description || ''
            },
            response: treatmentResponse.data.sc_response || {},
            beneficiary_id: treatmentResponse.data.beneficiary_id,
            from_inf_id: treatmentResponse.data.from_inf_id,
            action_inf_id: treatmentResponse.data.action_inf_id,
            status: treatmentResponse.data.status,
            transfer_reason: treatmentResponse.data.transfer_reason,
            created_at: treatmentResponse.data.created_at,
            updated_at: treatmentResponse.data.updated_at,
            sync_status: treatmentResponse.data.sync_status
          };
        }
        if (event) {
          setTimeout(() => {
            event.target.complete();
          }, 2000);
        }
      } catch (error) {
        _this2.b.errorToast('Failed to load treatment data');
      }
    })();
  }
  /**
   * Get combined schema with answers for display
   */
  getCombinedSchemaWithAnswers() {
    var _this$response;
    if (!((_this$response = this.response) !== null && _this$response !== void 0 && (_this$response = _this$response.survey_form) !== null && _this$response !== void 0 && _this$response.schema)) return [];
    return this.response.survey_form.schema.filter(field => {
      var _field$templateOption;
      return ((_field$templateOption = field.templateOptions) === null || _field$templateOption === void 0 ? void 0 : _field$templateOption.type) !== 'hidden';
    }).map(field => {
      if (field.type === 'template') {
        return field;
      }
      const hasAnswer = field.key && this.response.response[field.key] !== undefined && this.response.response[field.key] !== null && this.response.response[field.key] !== '' && this.isFieldVisible(field);
      return {
        ...field,
        hasAnswer,
        value: hasAnswer ? this.response.response[field.key] : null
      };
    });
  }
  /**
   * Check if field is visible based on hideExpression
   */
  isFieldVisible(field) {
    if (!field.hideExpression) return true;
    const model = this.response.response;
    try {
      if (typeof field.hideExpression === 'string') {
        let expression = field.hideExpression;
        // Replace model references with actual values
        Object.keys(model).forEach(key => {
          const value = model[key];
          if (Array.isArray(value)) {
            expression = expression.replace(new RegExp(`model\\.${key}`, 'g'), JSON.stringify(value));
          } else if (typeof value === 'string') {
            expression = expression.replace(new RegExp(`model\\.${key}`, 'g'), `"${value}"`);
          } else {
            expression = expression.replace(new RegExp(`model\\.${key}`, 'g'), String(value));
          }
        });
        // Evaluate the expression
        return !eval(expression);
      } else if (typeof field.hideExpression === 'function') {
        return !field.hideExpression(model, {}, field);
      }
    } catch (e) {
      return true;
    }
    return true;
  }
  /**
   * Get display value for field
   */
  getDisplayValue(field) {
    var _field$templateOption2, _field$templateOption3, _field$templateOption4;
    if (!field.value) return '-';
    // Handle arrays (like repeat fields)
    if (Array.isArray(field.value)) {
      return `${field.value.length} record(s)`;
    }
    // Handle dates
    if (((_field$templateOption2 = field.templateOptions) === null || _field$templateOption2 === void 0 ? void 0 : _field$templateOption2.type) === 'date') {
      return this.formatDate(field.value);
    }
    // Handle times
    if (((_field$templateOption3 = field.templateOptions) === null || _field$templateOption3 === void 0 ? void 0 : _field$templateOption3.type) === 'time') {
      return field.value;
    }
    // Handle radio/select with options
    if ((_field$templateOption4 = field.templateOptions) !== null && _field$templateOption4 !== void 0 && _field$templateOption4.options) {
      const option = field.templateOptions.options.find(opt => opt.value === field.value);
      return option ? option.label : field.value;
    }
    // Handle booleans
    if (typeof field.value === 'boolean') {
      return field.value ? 'Yes' : 'No';
    }
    // Default
    return String(field.value);
  }
  /**
   * Format date for display
   */
  formatDate(dateString) {
    if (!dateString) return '-';
    const date = new Date(dateString);
    return date.toLocaleDateString('en-GB', {
      day: '2-digit',
      month: 'short',
      year: 'numeric'
    });
  }
  /**
   * Get status color
   */
  getStatusColor(status) {
    switch (status === null || status === void 0 ? void 0 : status.toLowerCase()) {
      case 'admitted':
        return 'primary';
      case 'discharged':
        return 'success';
      case 'transferred':
        return 'warning';
      default:
        return 'medium';
    }
  }
  /**
   * Edit treatment
   */
  editTreatment() {
    this.router.navigate(['/inpatient-care-treatment', this.id], {
      state: {
        edit_mode: true,
        action_inf_id: this.response.action_inf_id
      }
    });
  }
  /**
   * Back to list
   */
  goBack() {
    this.router.navigate(['/inpatient-care-treatment-list']);
  }
  /**
   * Refresh data
   */
  refresh(event) {
    this.load(event);
  }
}, _InpatientCareTreatmentViewPage.ctorParameters = () => [{
  type: _angular_router__WEBPACK_IMPORTED_MODULE_6__.ActivatedRoute
}, {
  type: _angular_router__WEBPACK_IMPORTED_MODULE_6__.Router
}, {
  type: src_app_services_inpatient_care_treatment_api_service__WEBPACK_IMPORTED_MODULE_3__.InpatientCareTreatmentAPIService
}, {
  type: src_app_util_baseHelper__WEBPACK_IMPORTED_MODULE_4__.BaseHelper
}], _InpatientCareTreatmentViewPage);
InpatientCareTreatmentViewPage = (0,tslib__WEBPACK_IMPORTED_MODULE_7__.__decorate)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_8__.Component)({
  selector: 'app-inpatient-care-treatment-view',
  template: _inpatient_care_treatment_view_page_html_ngResource__WEBPACK_IMPORTED_MODULE_1__,
  styles: [(_inpatient_care_treatment_view_page_scss_ngResource__WEBPACK_IMPORTED_MODULE_2___default())]
})], InpatientCareTreatmentViewPage);


/***/ }),

/***/ 8615:
/*!********************************************************************************************************!*\
  !*** ./src/app/pages/inpatient-care-treatment-view/inpatient-care-treatment-view.page.scss?ngResource ***!
  \********************************************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

// Imports
var ___CSS_LOADER_API_SOURCEMAP_IMPORT___ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ 53142);
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ 35950);
var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);
// Module
___CSS_LOADER_EXPORT___.push([module.id, `ion-content {
  --padding-start: 16px;
  --padding-end: 16px;
  --padding-top: 20px;
  --padding-bottom: 20px;
}

.card-container {
  max-width: 800px;
  margin: 0 auto 20px auto;
}

ion-card {
  border-radius: 16px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  margin: 0 0 16px 0;
}

.section-header-main {
  max-width: 800px;
  margin: 0 auto 24px auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 4px;
  flex-wrap: wrap;
}

.section-title-main {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  color: var(--ion-color-dark);
  flex: 1 1 auto;
}
.section-title-main ion-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 0 16px;
  gap: 16px;
  flex-wrap: wrap;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 600;
  margin: 0;
  color: var(--ion-color-dark);
  flex: 1 1 auto;
  min-width: 0;
}
.section-title ion-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.summary-stat {
  background: var(--ion-color-light);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
}
.summary-stat .stat-label {
  font-size: 12px;
  color: var(--ion-color-medium);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.summary-stat .stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--ion-color-primary);
  line-height: 1.3;
  word-break: break-word;
}

.description-block {
  margin-top: 12px;
  background: rgba(var(--ion-color-primary-rgb), 0.04);
  border-radius: 12px;
  padding: 16px;
}
.description-block .stat-label {
  display: block;
  font-size: 12px;
  color: var(--ion-color-medium);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
}
.description-block .description-content {
  margin: 0;
  color: var(--ion-color-dark);
  font-size: 15px;
  line-height: 1.5;
}

.response-content {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.template-content {
  background: rgba(var(--ion-color-tertiary-rgb), 0.08);
  border-left: 4px solid var(--ion-color-tertiary);
  border-radius: 12px;
  padding: 16px;
  color: var(--ion-color-dark);
  font-size: 14px;
  line-height: 1.5;
}
.template-content h3, .template-content h4, .template-content h5 {
  margin-top: 0;
  color: var(--ion-color-dark);
}
.template-content h3 {
  font-size: 18px;
  font-weight: 600;
}
.template-content h4 {
  font-size: 16px;
  font-weight: 600;
}
.template-content h5 {
  font-size: 14px;
  font-weight: 600;
}

.response-item {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(var(--ion-color-primary-rgb), 0.12);
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.response-item .response-label {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  color: var(--ion-color-dark);
  line-height: 1.45;
}
.response-item .response-value {
  flex-shrink: 0;
  max-width: 55%;
  min-height: 32px;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
  background: rgba(146, 148, 156, 0.16);
  color: var(--ion-color-dark);
  border: 1px solid transparent;
  letter-spacing: 0.2px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: var(--ion-color-medium);
}
.empty-state ion-icon {
  font-size: 48px;
  margin-bottom: 12px;
}
.empty-state h3 {
  margin: 0 0 8px;
  font-size: 20px;
  color: var(--ion-color-dark);
}
.empty-state p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  max-width: 320px;
}

@media (max-width: 768px) {
  ion-content {
    --padding-start: 12px;
    --padding-end: 12px;
    --padding-top: 16px;
    --padding-bottom: 16px;
  }
  .section-title-main {
    font-size: 20px;
  }
  .section-title-main ion-icon {
    font-size: 24px;
  }
  .section-header {
    padding: 0 12px;
  }
  .summary-stat .stat-value {
    font-size: 16px;
  }
  .response-item {
    flex-direction: column;
    align-items: flex-start;
  }
  .response-item .response-value {
    max-width: 100%;
    width: 100%;
  }
}
@media (prefers-color-scheme: dark) {
  ion-card {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    background: #1c1c1d;
  }
  .summary-stat {
    background: rgba(255, 255, 255, 0.04);
  }
  .summary-stat .stat-value {
    color: var(--ion-color-primary-tint);
  }
  .description-block {
    background: rgba(255, 255, 255, 0.05);
  }
  .response-item {
    background: #1f1f20;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
  }
  .response-item .response-value {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: #f4f5f8;
  }
  .template-content {
    background: rgba(var(--ion-color-tertiary-rgb), 0.16);
  }
}`, "",{"version":3,"sources":["webpack://./src/app/pages/inpatient-care-treatment-view/inpatient-care-treatment-view.page.scss"],"names":[],"mappings":"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","sourcesContent":["ion-content {\n  --padding-start: 16px;\n  --padding-end: 16px;\n  --padding-top: 20px;\n  --padding-bottom: 20px;\n}\n\n.card-container {\n  max-width: 800px;\n  margin: 0 auto 20px auto;\n}\n\nion-card {\n  border-radius: 16px;\n  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);\n  overflow: hidden;\n  margin: 0 0 16px 0;\n}\n\n.section-header-main {\n  max-width: 800px;\n  margin: 0 auto 24px auto;\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  gap: 16px;\n  padding: 0 4px;\n  flex-wrap: wrap;\n}\n\n.section-title-main {\n  display: flex;\n  align-items: center;\n  gap: 10px;\n  font-size: 24px;\n  font-weight: 700;\n  margin: 0;\n  color: var(--ion-color-dark);\n  flex: 1 1 auto;\n\n  ion-icon {\n    font-size: 28px;\n    flex-shrink: 0;\n  }\n}\n\n.section-header {\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  margin-bottom: 16px;\n  padding: 0 16px;\n  gap: 16px;\n  flex-wrap: wrap;\n}\n\n.section-title {\n  display: flex;\n  align-items: center;\n  gap: 8px;\n  font-size: 20px;\n  font-weight: 600;\n  margin: 0;\n  color: var(--ion-color-dark);\n  flex: 1 1 auto;\n  min-width: 0;\n\n  ion-icon {\n    font-size: 24px;\n    flex-shrink: 0;\n  }\n}\n\n.summary-stat {\n  background: var(--ion-color-light);\n  border-radius: 12px;\n  padding: 16px;\n  display: flex;\n  flex-direction: column;\n  gap: 6px;\n  height: 100%;\n\n  .stat-label {\n    font-size: 12px;\n    color: var(--ion-color-medium);\n    font-weight: 600;\n    text-transform: uppercase;\n    letter-spacing: 0.6px;\n  }\n\n  .stat-value {\n    font-size: 18px;\n    font-weight: 700;\n    color: var(--ion-color-primary);\n    line-height: 1.3;\n    word-break: break-word;\n  }\n}\n\n.description-block {\n  margin-top: 12px;\n  background: rgba(var(--ion-color-primary-rgb), 0.04);\n  border-radius: 12px;\n  padding: 16px;\n\n  .stat-label {\n    display: block;\n    font-size: 12px;\n    color: var(--ion-color-medium);\n    font-weight: 600;\n    text-transform: uppercase;\n    letter-spacing: 0.6px;\n    margin-bottom: 8px;\n  }\n\n  .description-content {\n    margin: 0;\n    color: var(--ion-color-dark);\n    font-size: 15px;\n    line-height: 1.5;\n  }\n}\n\n.response-content {\n  display: flex;\n  flex-direction: column;\n  gap: 18px;\n}\n\n.template-content {\n  background: rgba(var(--ion-color-tertiary-rgb), 0.08);\n  border-left: 4px solid var(--ion-color-tertiary);\n  border-radius: 12px;\n  padding: 16px;\n  color: var(--ion-color-dark);\n  font-size: 14px;\n  line-height: 1.5;\n\n  h3, h4, h5 {\n    margin-top: 0;\n    color: var(--ion-color-dark);\n  }\n\n  h3 {\n    font-size: 18px;\n    font-weight: 600;\n  }\n\n  h4 {\n    font-size: 16px;\n    font-weight: 600;\n  }\n\n  h5 {\n    font-size: 14px;\n    font-weight: 600;\n  }\n}\n\n.response-item {\n  padding: 16px;\n  border-radius: 14px;\n  border: 1px solid rgba(var(--ion-color-primary-rgb), 0.12);\n  background: #ffffff;\n  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);\n  display: flex;\n  align-items: flex-start;\n  justify-content: space-between;\n  gap: 16px;\n\n  .response-label {\n    flex: 1;\n    font-size: 15px;\n    font-weight: 600;\n    color: var(--ion-color-dark);\n    line-height: 1.45;\n  }\n\n  .response-value {\n    flex-shrink: 0;\n    max-width: 55%;\n    min-height: 32px;\n    padding: 7px 16px;\n    border-radius: 999px;\n    font-size: 13px;\n    font-weight: 600;\n    line-height: 1.35;\n    text-align: center;\n    white-space: normal;\n    background: rgba(146, 148, 156, 0.16);\n    color: var(--ion-color-dark);\n    border: 1px solid transparent;\n    letter-spacing: 0.2px;\n  }\n}\n\n.empty-state {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  padding: 60px 20px;\n  text-align: center;\n  color: var(--ion-color-medium);\n\n  ion-icon {\n    font-size: 48px;\n    margin-bottom: 12px;\n  }\n\n  h3 {\n    margin: 0 0 8px;\n    font-size: 20px;\n    color: var(--ion-color-dark);\n  }\n\n  p {\n    margin: 0;\n    font-size: 14px;\n    line-height: 1.6;\n    max-width: 320px;\n  }\n}\n\n@media (max-width: 768px) {\n  ion-content {\n    --padding-start: 12px;\n    --padding-end: 12px;\n    --padding-top: 16px;\n    --padding-bottom: 16px;\n  }\n\n  .section-title-main {\n    font-size: 20px;\n\n    ion-icon {\n      font-size: 24px;\n    }\n  }\n\n  .section-header {\n    padding: 0 12px;\n  }\n\n  .summary-stat .stat-value {\n    font-size: 16px;\n  }\n\n  .response-item {\n    flex-direction: column;\n    align-items: flex-start;\n\n    .response-value {\n      max-width: 100%;\n      width: 100%;\n    }\n  }\n}\n\n@media (prefers-color-scheme: dark) {\n  ion-card {\n    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);\n    background: #1c1c1d;\n  }\n\n  .summary-stat {\n    background: rgba(255, 255, 255, 0.04);\n\n    .stat-value {\n      color: var(--ion-color-primary-tint);\n    }\n  }\n\n  .description-block {\n    background: rgba(255, 255, 255, 0.05);\n  }\n\n  .response-item {\n    background: #1f1f20;\n    border-color: rgba(255, 255, 255, 0.08);\n    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);\n  }\n\n  .response-item .response-value {\n    background: rgba(255, 255, 255, 0.06);\n    border-color: rgba(255, 255, 255, 0.12);\n    color: #f4f5f8;\n  }\n\n  .template-content {\n    background: rgba(var(--ion-color-tertiary-rgb), 0.16);\n  }\n}\n"],"sourceRoot":""}]);
// Exports
module.exports = ___CSS_LOADER_EXPORT___.toString();


/***/ }),

/***/ 20355:
/*!********************************************************************************************************!*\
  !*** ./src/app/pages/inpatient-care-treatment-view/inpatient-care-treatment-view.page.html?ngResource ***!
  \********************************************************************************************************/
/***/ ((module) => {

"use strict";
module.exports = "<ion-header>\n  <ion-toolbar>\n    <ion-buttons slot=\"start\">\n      <ion-back-button defaultHref=\"/home\"></ion-back-button>\n    </ion-buttons>\n    <ion-title>{{ response?.survey_form?.title || 'Inpatient Care Treatment' }}</ion-title>\n    <ion-buttons slot=\"end\">\n      <ion-button (click)=\"editTreatment()\">\n        <ion-icon slot=\"icon-only\" [name]=\"icons.EDIT\"></ion-icon>\n      </ion-button>\n    </ion-buttons>\n  </ion-toolbar>\n</ion-header>\n\n<ion-content class=\"ion-padding\">\n  <ion-refresher slot=\"fixed\" (ionRefresh)=\"refresh($event)\">\n    <ion-refresher-content></ion-refresher-content>\n  </ion-refresher>\n\n  <ng-container *ngIf=\"response; else skeleton\">\n    <div class=\"section-header-main\">\n      <h2 class=\"section-title-main\">\n        <ion-icon [name]=\"icons.MEDICAL\" color=\"primary\"></ion-icon>\n        {{ response?.survey_form?.title || 'Inpatient Care Treatment' }}\n      </h2>\n    </div>\n\n    <div class=\"card-container\">\n      <ion-card class=\"survey-summary-card\">\n        <div class=\"section-header\">\n          <h2 class=\"section-title\">\n            <ion-icon [name]=\"icons.INFORMATION_CIRCLE\" color=\"primary\"></ion-icon>\n            Treatment Summary\n          </h2>\n        </div>\n        <ion-card-content>\n          <ion-grid>\n            <ion-row>\n              <ion-col size=\"12\" size-md=\"4\" *ngIf=\"response?.status\">\n                <div class=\"summary-stat\">\n                  <span class=\"stat-label\">Status</span>\n                  <ion-badge [color]=\"getStatusColor(response.status)\">\n                    {{ response.status }}\n                  </ion-badge>\n                </div>\n              </ion-col>\n              <ion-col size=\"12\" size-md=\"4\" *ngIf=\"response?.transfer_reason\">\n                <div class=\"summary-stat\">\n                  <span class=\"stat-label\">Transfer Reason</span>\n                  <span class=\"stat-value\">{{ response.transfer_reason }}</span>\n                </div>\n              </ion-col>\n              <ion-col size=\"12\" size-md=\"4\" *ngIf=\"response?.updated_at\">\n                <div class=\"summary-stat\">\n                  <span class=\"stat-label\">Last Updated</span>\n                  <span class=\"stat-value\">{{ response.updated_at | date:'d MMM yyyy, h:mm a' }}</span>\n                </div>\n              </ion-col>\n            </ion-row>\n            <ion-row *ngIf=\"response?.survey_form?.description\">\n              <ion-col size=\"12\">\n                <div class=\"description-block\">\n                  <span class=\"stat-label\">Description</span>\n                  <div class=\"description-content\" [innerHTML]=\"response.survey_form.description\"></div>\n                </div>\n              </ion-col>\n            </ion-row>\n          </ion-grid>\n        </ion-card-content>\n      </ion-card>\n    </div>\n\n    <div class=\"card-container\">\n      <ion-card class=\"survey-response-card\">\n        <div class=\"section-header\">\n          <h2 class=\"section-title\">\n            <ion-icon [name]=\"icons.LIST\" color=\"primary\"></ion-icon>\n            Treatment Details\n          </h2>\n        </div>\n        <ion-card-content>\n          <div class=\"response-content\">\n            <ng-container *ngFor=\"let field of getCombinedSchemaWithAnswers(); let i = index\">\n              <!-- Template fields (headings, sections, etc.) -->\n              <div *ngIf=\"field.type === 'template'\" class=\"template-content\" [innerHTML]=\"field.templateOptions?.template\"></div>\n\n              <!-- Regular fields with answers -->\n              <div *ngIf=\"field.type !== 'template' && field.hasAnswer\" class=\"response-item\">\n                <div class=\"response-label\">{{ field.templateOptions?.label || field.key }}</div>\n                <div class=\"response-value\">{{ getDisplayValue(field) }}</div>\n              </div>\n            </ng-container>\n          </div>\n        </ion-card-content>\n      </ion-card>\n    </div>\n  </ng-container>\n\n  <ng-template #skeleton>\n    <app-skeleton></app-skeleton>\n  </ng-template>\n</ion-content>\n";

/***/ })

}]);
//# sourceMappingURL=src_app_pages_inpatient-care-treatment-view_inpatient-care-treatment-view_module_ts.js.map