class PatientAdmissionScheduleOutputBuilder extends TxtOutputBuilder<PatientAdmissionSchedule> {

        private static final Comparator<BedDesignation> COMPARATOR = comparing(BedDesignation::getAdmissionPart,
                comparingLong(AdmissionPart::getId))
                .thenComparing(BedDesignation::getBed, comparingLong(Bed::getId))
                .thenComparingLong(BedDesignation::getId);

        @Override
        public void writeSolution() throws IOException {<FILL_FUNCTION_BODY>}
    }

            solution.getBedDesignationList().sort(COMPARATOR);
            for (Patient patient : solution.getPatientList()) {
                bufferedWriter.write(Long.toString(patient.getId()));
                for (BedDesignation bedDesignation : solution.getBedDesignationList()) {
                    if (bedDesignation.getPatient().equals(patient)) {
                        for (int i = 0; i < bedDesignation.getAdmissionPart().getNightCount(); i++) {
                            bufferedWriter.write(" " + bedDesignation.getBed().getId());
                        }
                    }
                }
                bufferedWriter.write("\n");
            }
        
<methods>public non-sealed void <init>() ,public abstract TxtOutputBuilder<org.optaplanner.examples.pas.domain.PatientAdmissionSchedule> createTxtOutputBuilder() ,public java.lang.String getOutputFileSuffix() ,public void writeSolution(org.optaplanner.examples.pas.domain.PatientAdmissionSchedule, java.io.File) <variables>protected static final java.lang.String DEFAULT_OUTPUT_FILE_SUFFIX