WD: adding the physical examinatoin.
parent
5e31c9cf98
commit
a1960c8799
@ -0,0 +1,93 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class Condition {
|
||||
String? conditionCode;
|
||||
String? conditionName;
|
||||
|
||||
Condition();
|
||||
|
||||
Condition.fromJson(Map<String, dynamic> json) {
|
||||
conditionCode = json['conditionCode'];
|
||||
conditionName = json['conditionName'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
return {
|
||||
'conditionCode': conditionCode,
|
||||
'conditionName': conditionName,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
class Category {
|
||||
int? categoryId;
|
||||
String? code;
|
||||
String? codeAlias;
|
||||
List<Condition>? conditionsList;
|
||||
String? description;
|
||||
String? descriptionAlias;
|
||||
int? id;
|
||||
bool? isActive;
|
||||
bool? isBuiltin;
|
||||
String? languageCode;
|
||||
String? name;
|
||||
String? nameAlias;
|
||||
int? rowVersion;
|
||||
int? specialityId;
|
||||
String? specialityName;
|
||||
List<dynamic>? translationValues;
|
||||
bool isSelected = false;
|
||||
TextEditingController remarksController = TextEditingController();
|
||||
int selectedCondition = -1;
|
||||
String? pomrId;
|
||||
int? paitientId;
|
||||
int? userID;
|
||||
|
||||
Category();
|
||||
|
||||
Category.fromJson(Map<String, dynamic> json,int? specialityId, String specialityName, String? pomrId, int paitientId, int userID) {
|
||||
categoryId = json['categoryId'];
|
||||
code = json['code'];
|
||||
codeAlias = json['codeAlias'];
|
||||
if (json['conditionsList'] != null) {
|
||||
conditionsList = <Condition>[];
|
||||
json['conditionsList'].forEach((v) {
|
||||
conditionsList!.add(Condition.fromJson(v));
|
||||
});
|
||||
}
|
||||
description = json['description'];
|
||||
descriptionAlias = json['descriptionAlias'];
|
||||
id = json['id'];
|
||||
isActive = json['isActive'];
|
||||
isBuiltin = json['isBuiltin'];
|
||||
languageCode = json['languageCode'];
|
||||
name = json['name'];
|
||||
nameAlias = json['nameAlias'];
|
||||
rowVersion = json['rowVersion'];
|
||||
translationValues = json['translationValues'];
|
||||
this.specialityName = specialityName;
|
||||
this.specialityId = specialityId;
|
||||
this.pomrId = pomrId;
|
||||
this.paitientId = paitientId;
|
||||
this.userID = userID;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
return {
|
||||
'categoryId': categoryId,
|
||||
'code': code,
|
||||
'codeAlias': codeAlias,
|
||||
'conditionsList': conditionsList?.map((v) => v.toJson()).toList(),
|
||||
'description': description,
|
||||
'descriptionAlias': descriptionAlias,
|
||||
'id': id,
|
||||
'isActive': isActive,
|
||||
'isBuiltin': isBuiltin,
|
||||
'languageCode': languageCode,
|
||||
'name': name,
|
||||
'nameAlias': nameAlias,
|
||||
'rowVersion': rowVersion,
|
||||
'translationValues': translationValues,
|
||||
};
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,71 @@
|
||||
import 'package:doctor_app_flutter/core/model/SOAP/physical_exam/Category.dart';
|
||||
|
||||
class CreatePhysicalExamination {
|
||||
bool? isChecked; // it will be told
|
||||
bool? selected; // same as above
|
||||
String? pomrid; // paitient
|
||||
int? patientID; // paitint
|
||||
bool? isClinicPhysicalExamination; // it will be told
|
||||
int? physicalExaminationSystemID; // category id
|
||||
String? physicalExaminationDescription; // name of the category
|
||||
int? specialityID; // id of the specialitiy id
|
||||
dynamic selectedOptions; // it will also be told but it could be sent as null
|
||||
bool? isMandatory; // it will also be checked default value is false
|
||||
String? specialityDescription; // name of the speciality
|
||||
int? physicalExaminationCondition; // condition selected
|
||||
String? loginUserId; // doctor id
|
||||
String? remark;
|
||||
|
||||
CreatePhysicalExamination();
|
||||
|
||||
CreatePhysicalExamination.fromJson(Map<String, dynamic> json) {
|
||||
isChecked = json['isChecked'];
|
||||
selected = json['selected'];
|
||||
pomrid = json['pomrid'];
|
||||
patientID = json['patientID'];
|
||||
isClinicPhysicalExamination = json['isClinicPhysicalExamination'];
|
||||
physicalExaminationSystemID = json['physicalExaminationSystemID'];
|
||||
physicalExaminationDescription = json['physicalExaminationDescription'];
|
||||
specialityID = json['specialityID'];
|
||||
selectedOptions = json['selectedOptions'];
|
||||
isMandatory = json['isMandatory'];
|
||||
specialityDescription = json['specialityDescription'];
|
||||
physicalExaminationCondition = json['physicalExaminationCondition'];
|
||||
loginUserId = json['loginUserId'];
|
||||
remark = json['remark'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
return {
|
||||
'isChecked': isChecked,
|
||||
'selected': selected,
|
||||
'pomrid': pomrid,
|
||||
'patientID': patientID,
|
||||
'isClinicPhysicalExamination': isClinicPhysicalExamination,
|
||||
'physicalExaminationSystemID': physicalExaminationSystemID,
|
||||
'physicalExaminationDescription': physicalExaminationDescription,
|
||||
'specialityID': specialityID,
|
||||
'selectedOptions': selectedOptions,
|
||||
'isMandatory': isMandatory,
|
||||
'specialityDescription': specialityDescription,
|
||||
'physicalExaminationCondition': physicalExaminationCondition,
|
||||
'loginUserId': loginUserId,
|
||||
'remark': remark,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
extension ConvertCategoryToCreatePhysicalExamination on Category {
|
||||
CreatePhysicalExamination createPhysicalExaminationFromCategory() =>
|
||||
CreatePhysicalExamination()
|
||||
..physicalExaminationDescription = this.name
|
||||
..physicalExaminationSystemID = this.categoryId
|
||||
..physicalExaminationCondition = this.selectedCondition
|
||||
..remark = this.remarksController.text
|
||||
..selected = false
|
||||
..isChecked = false
|
||||
..specialityID = this.specialityId
|
||||
..patientID = this.paitientId
|
||||
..pomrid = this.pomrId
|
||||
..loginUserId = this.userID?.toString();
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue