class Hospital {
  String? id;
  String? name;

  Hospital({
    this.id,
    this.name,
  });

  factory Hospital.fromJson(Map<String, dynamic> parsedJson) {
    return Hospital(
      id: parsedJson["nid"] ?? parsedJson["id"],
      name: parsedJson["client_name"] ?? parsedJson["value"],
    );
  }

  factory Hospital.fromHospital(Hospital? hospital) {
    return Hospital(
      id: hospital?.id,
      name: hospital?.name,
    );
  }
}
