class HospitalsModel {
  String? desciption;
  dynamic desciptionN;
  dynamic iD;
  String? legalName;
  String? legalNameN;
  String? name;
  dynamic nameN;
  String? phoneNumber;
  String? setupID;
  dynamic distanceInKilometers;
  bool? isActive;
  String? latitude;
  String? longitude;
  dynamic mainProjectID;
  bool? projectOutSA;
  bool? usingInDoctorApp;
  bool? isHMC;
  String? region;
  String? regionArabic;
  String? regionEnglish;
  String? regionID;

  HospitalsModel(
      {this.desciption,
      this.desciptionN,
      this.iD,
      this.legalName,
      this.legalNameN,
      this.name,
      this.nameN,
      this.phoneNumber,
      this.setupID,
      this.distanceInKilometers,
      this.isActive,
      this.latitude,
      this.longitude,
      this.mainProjectID,
      this.projectOutSA,
    this.usingInDoctorApp,
    this.isHMC,
    this.region,
    this.regionArabic,
    this.regionEnglish,
    this.regionID,
  });

  HospitalsModel.fromJson(Map<String, dynamic> json) {
    desciption = json['Desciption'];
    desciptionN = json['DesciptionN'];
    iD = json['ID'];
    legalName = json['LegalName'];
    legalNameN = json['LegalNameN'];
    name = json['Name'];
    nameN = json['NameN'];
    phoneNumber = json['PhoneNumber'];
    setupID = json['SetupID'];
    distanceInKilometers = json['DistanceInKilometers'];
    isActive = json['IsActive'];
    latitude = json['Latitude'];
    longitude = json['Longitude'];
    mainProjectID = json['MainProjectID'];
    projectOutSA = json['ProjectOutSA'];
    usingInDoctorApp = json['UsingInDoctorApp'];
    this.isHMC = json["IsHMC"];
    this.regionArabic = json['RegionNameN'];
    this.regionEnglish = json['RegionName'];
  }

  String? getRegionName(bool isArabic) {
    if (isArabic) {
      return regionArabic;
    }
    return regionEnglish;
  }

  String? getName(bool isArabic) {
    if (isArabic) {
      return "$nameN";
    }
    return name;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['Desciption'] = this.desciption;
    data['DesciptionN'] = this.desciptionN;
    data['ID'] = this.iD;
    data['LegalName'] = this.legalName;
    data['LegalNameN'] = this.legalNameN;
    data['Name'] = this.name;
    data['NameN'] = this.nameN;
    data['PhoneNumber'] = this.phoneNumber;
    data['SetupID'] = this.setupID;
    data['DistanceInKilometers'] = this.distanceInKilometers;
    data['IsActive'] = this.isActive;
    data['Latitude'] = this.latitude;
    data['Longitude'] = this.longitude;
    data['MainProjectID'] = this.mainProjectID;
    data['ProjectOutSA'] = this.projectOutSA;
    data['UsingInDoctorApp'] = this.usingInDoctorApp;
    return data;
  }
}
