This repository has been archived on 2024-10-18. You can view files and clone it, but cannot push or open issues or pull requests.
ftc_patient_app/lib/models/create_care_plan_request.dart

106 lines
3.8 KiB
Dart

class CreateCarePlanRequest {
CreateCarePlanRequest({
this.eventDateTime,
this.userId,
this.addedby,
this.noteDetails,
this.noteType,
this.title,
this.flag,
this.isHTML,
this.healthNote,
this.category,
this.complaint,
this.moodRating,
});
int? eventDateTime;
String? userId;
String? addedby;
String? noteDetails;
String? noteType;
String? title;
bool? flag;
bool? isHTML;
String? healthNote;
String? category;
String? complaint;
String? moodRating;
//-------------------------------------
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
if (eventDateTime != null) map['eventDateTime'] = eventDateTime;
if (userId != null) map['userId'] = userId;
if (addedby != null) map['addedby'] = addedby;
if (noteDetails != null) map['noteDetails'] = noteDetails;
if (noteType != null) map['noteType'] = noteType;
if (title != null) map['title'] = title;
map['flag'] = flag ?? false;
map['isHTML'] = isHTML ?? false;
if (healthNote != null) map['healthNote'] = healthNote;
if (category != null) map['category'] = category;
if (complaint != null) map['complaint'] = complaint;
if (moodRating != null) map['moodRating'] = moodRating;
return map;
}
static String heightWeightHtmlReq(
String height, String weight, String comments) {
return """<div class="col-md-6">
<p><strong>Height - (CM): </strong><span id="heightData">$height</span></p>
</div>
<div class="col-md-6">
<p><strong>Weight - (KG): </strong><span id="weightData">$weight</span></p>
</div>
<div class="col-md-12">
<p><strong>Comments: </strong><span id="commentsData">$comments</span></p>
</div>""";
}
static String injuryHealthIssueHtmlReq({
required String nameOfWitnesses,
required String placeOfAccident,
required String accidentDescription,
required String recordOfInjury,
required String conditionOfPatient,
required String isParentContacted,
String? howParentContacted,
String? nameOfParentContacted,
String? parentContactedTime,
}) {
String ifParentContactedHtml = (isParentContacted == "Yes")
? """<div className="col-md-12">
<p><strong>If Yes how parent was contacted?: </strong><span id="howParentContactedData">$howParentContacted</span></p>
</div>
<div className="col-md-12">
<p><strong>Name of Parent Contacted: </strong>
<span id="nameOfParentContactedData">$nameOfParentContacted</span><br />
Contacted at:
<span id="parentContactedTimeData">$parentContactedTime</span>
</p>
</div>"""
: "";
return """<div className="col-md-12">
<p><strong>Name of witnesses/adults present: </strong><span id="nameOfWitnessesData">$nameOfWitnesses</span></p>
</div>
<div className="col-md-12">
<p><strong>Place accident occured: </strong><span id="placeOfAccidentData">$placeOfAccident </span></p>
</div>
<div className="col-md-12">
<p><strong>Description how the accident occured: </strong><span id="accidentDescriptionData">$accidentDescription</span></p>
</div>
<div className="col-md-12">
<p><strong>Record of any injury and action taken: </strong><span id="recordOfInjuryData">$recordOfInjury</span></p>
</div>
<div className="col-md-12">
<p><strong>Condition of the patient following of the accident: </strong><span id="conditionOfPatientData">$conditionOfPatient</span></p>
</div>
<div className="col-md-12">
<p><strong>Parent Contacted: </strong><span id="isParentContactedData">$isParentContacted</span></p>
</div>$ifParentContactedHtml
""";
}
}