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'];
    isHMC = json["IsHMC"];
    regionArabic = json['RegionNameN'];
    regionEnglish = json['RegionName'];
  }

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

  String? getName(bool isArabic) {

    return name;
  }

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