|
@@ -434,41 +434,6 @@ function reverseArray(arr) {
|
|
|
return newArr;
|
|
|
}
|
|
|
|
|
|
-type PatientInfo = {
|
|
|
- actOrderNo: string;
|
|
|
- parentNo: string | null;
|
|
|
- occTime: string;
|
|
|
- inpatientNo: string;
|
|
|
-};
|
|
|
-
|
|
|
-function handleSort(value: PatientInfo[]) {
|
|
|
- const currentPatientInfo: {
|
|
|
- [key: string]: {
|
|
|
- info: PatientInfo;
|
|
|
- list: PatientInfo[];
|
|
|
- };
|
|
|
- } = {};
|
|
|
- XEUtils.arrayEach(value, (item, index) => {
|
|
|
- item.inpatientNo = item.inpatientNo.trim();
|
|
|
- if (item.actOrderNo == null) {
|
|
|
- currentPatientInfo["zy" + item.inpatientNo] = {
|
|
|
- info: item,
|
|
|
- list: [],
|
|
|
- };
|
|
|
- } else {
|
|
|
- currentPatientInfo["zy" + item.inpatientNo].list.push(item);
|
|
|
- }
|
|
|
- });
|
|
|
- const tmp = [];
|
|
|
-
|
|
|
- for (let key in currentPatientInfo) {
|
|
|
- const item = currentPatientInfo[key];
|
|
|
- const data = yzDataToTree(item.list, { childIcon: "┛", parentIcon: "┓" });
|
|
|
- tmp.push(item.info);
|
|
|
- tmp.push(...data);
|
|
|
- }
|
|
|
- return tmp;
|
|
|
-}
|
|
|
|
|
|
type PatientInfo = {
|
|
|
actOrderNo: string;
|