Consultation Type And Related Types
Dealing With ConsultationType
In order to deal with the Consultations and the functionality related to consultations, we use the Class Consultation
class Consultation {
int? id;
int? userId;
String? question;
String? doctorName;
String? doctorAvatar;
String? medium;
String? status;
int? isFulfilled;
int? parentConsultationId;
String? createdAt;
String? updatedAt;
User? user;
Consultation? parentConsultation;
List<Media>? media;
List<Consultation>? consultations;
String? pusherChannel;
String? pusherApiKey;
ChatConfig? chatConfig;
VoipConfig? voipConfig;
VoipConfig? videoConfig;
ChatHistory? chatHistory;
Recommendation? recommendation;
Double? doctorAverageRating;
Consultation({
this.id,
this.userId,
this.question,
this.medium,
this.status,
this.isFulfilled,
this.parentConsultationId,
this.createdAt,
this.updatedAt,
this.parentConsultation,
this.media,
this.user,
this.consultations,
this.pusherChannel,
this.pusherApiKey,
this.chatConfig,
this.voipConfig,
this.videoConfig,
this.chatHistory,
this.recommendation,
this.doctorName,
this.doctorAvatar,
this.doctorAverageRating,
});
}
Consultation related types
Also, there are some pre-defined types included in the ConsultationType interface
MediaType
The consultation data might include some media files related to the consultation represented as MediaType array and here is the Media Class
class Media {
String? id;
String? type;
String? name;
String? path;
String? extension;
String? url;
int? size;
Media({this.id, this.type, this.name, this.path, this.extension, this.size,this.url});
}
ChatConfig
The ChatConfig object contains the data related to chat consultations, here is the ChatConfig Class
class ChatConfig {
int? id;
int? consultationId;
String? groupId;
String? chatUserId;
String? appId;
String? chatUserToken;
ChatConfig({
this.id,
this.consultationId,
this.groupId,
this.appId,
this.chatUserId,
this.chatUserToken,
});
}
VoipConfig
The VoipConfig object contains the data related to Video or Voip consultations, here is the VoipConfig Class
class VoipConfig {
int? id;
int? consultationId;
String? apiKey;
String? callId;
String? token;
VoipConfig({
this.id,
this.consultationId,
this.apiKey,
this.callId,
this.token,
});
}
ChatHistory
The ChatHistory object contains the data related to chat history of chat consultations, here is the ChatHistory Class
class ChatHistory {
ChatHistory({
this.id,
this.consultationId,
this.data,
this.createdAt,
this.updatedAt,
});
late final int? id;
late final int? consultationId;
late final List<Data>? data;
late final String? createdAt;
late final String? updatedAt;
}
The data array of ChatHistory object is an array of ChatData type, and here is the Data Class
class Data {
Data({
this.id,
this.message,
this.sentAt,
this.chatUserId,
});
late final String? id;
late final String? message;
late final String? sentAt;
late final String? chatUserId;
}
Recommendation
The Recommendation object contains the recommendation data filled by the doctor, here is the Recommendation Class
class Recommendation {
int? id;
int? consultationId;
RecommendationData? data;
String? createdAt;
String? updatedAt;
Recommendation({
this.id,
this.consultationId,
this.data,
this.createdAt,
this.updatedAt,
});
}
The data of the Recommendation object is an object of RecommendationData type and here is the RecommendationData Class
class RecommendationData {
RecommendationLab? lab;
RecommendationDrug? drug;
RecommendationICD10? icd10;
List<RecommendationFollowUp>? followUp;
RecommendationDoctorReferral? doctorReferral;
List<RecommendationPostCallAnswer>? postCallAnswer;
RecommendationData({
this.lab,
this.drug,
this.icd10,
this.followUp,
this.doctorReferral,
this.postCallAnswer,
});
}
Each field of the RecommendationData object is a pre-defined type and here are all the class related to RecommendationData object
RecommendationLab The RecommendationLab field contains an array of labs prescribed after the consultation
class RecommendationLab {
List<RecommendationLabItem>? lab;
List<RecommendationLabItem>? panel;
RecommendationLab({
this.lab,
this.panel,
});
}
And here is the RecommendationLabItem class related to RecommendationLab
class RecommendationLabItem {
String? name;
RecommendationLabItem({
this.name,
});
}
RecommendationDrug The RecommendationDrug field contains an array of fdaDrugs prescribed after the consultation
class RecommendationDrug {
List<RecommendationFdaDrug>? fdaDrug;
RecommendationDrug({
this.fdaDrug,
});
}
And here is the RecommendationFdaDrug class related to RecommendationDrug
class RecommendationFdaDrug {
String? name;
String? dosage;
int? duration;
String? howToUse;
String? frequency;
String? tradeName;
String? dosageForm;
String? dosageUnit;
String? packageSize;
String? packageType;
String? strengthValue;
String? relationWithFood;
String? specialInstructions;
String? routeOfAdministration;
RecommendationFdaDrug({
this.name,
this.dosage,
this.duration,
this.howToUse,
this.frequency,
this.tradeName,
this.dosageForm,
this.dosageUnit,
this.packageSize,
this.packageType,
this.strengthValue,
this.relationWithFood,
this.specialInstructions,
this.routeOfAdministration,
});
}
RecommendationICD10 The RecommendationICD10 field contains an array of symptoms and array of diagnosis defined after the consultation
class RecommendationICD10 {
List<RecommendationSymptom>? symptom;
List<RecommendationDiagnosis>? diagnosis;
RecommendationICD10({
this.symptom,
this.diagnosis,
});
}
And here are the RecommendationSymptom and RecommendationDiagnosis class related to RecommendationICD10
class RecommendationSymptom {
String? code;
String? name;
RecommendationSymptom({
this.code,
this.name,
});
}
class RecommendationDiagnosis {
String? code;
String? name;
RecommendationDiagnosis({
this.code,
this.name,
});
}
RecommendationFollowUp The RecommendationFollowUp field is an array of follow-ups related to the consultation
class RecommendationFollowUp {
String? name;
RecommendationFollowUp({
this.name,
});
}
RecommendationDoctorReferral The RecommendationDoctorReferral field is an object contains the referral speciality recommended in the consultation
class RecommendationDoctorReferral {
String? name;
RecommendationDoctorReferral({
this.name,
});
}
RecommendationPostCallAnswer The RecommendationPostCallAnswer field is an array of predefined questions answered in the recommendation
class RecommendationPostCallAnswer {
String? answer;
String? question;
RecommendationPostCallAnswer({
this.answer,
this.question,
});
}
Consultation Functionalities
The following are the functionalities relate to consultations
APi | Params |
---|---|
createConsultation | consultationData : Consultation |
getConsultationInfo | consultation_id: number |
getLastConsultation | |
getConsultationList | user_id: number (required), page: number, perPage: number |
deleteConsultation | consultation_id: number |
cancelConsultation | consultation_id: number |