diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 916c75029d..1c510b6f32 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -5,22 +5,74 @@ name: Java CI with Maven on: [push, pull_request] +env: + MAVEN_ARGS: '-B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn' + jobs: build: - runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - distribution: 'zulu' - java-version: 17 - java-package: jdk - - name: Checkout core - run: git clone --depth=50 --branch=develop https://github.com/informatici/openhospital-core.git openhospital-core - - name: Install core - run: cd openhospital-core && mvn install -DskipTests=true && cd .. - - name: Build GUI with Maven - run: mvn -B package --file pom.xml + - uses: actions/checkout@v4 + + - name: Debug GitHub variables + run: | + echo "GITHUB_EVENT_NAME: ${GITHUB_EVENT_NAME}" + echo "GITHUB_HEAD_REPOSITORY: ${GITHUB_HEAD_REPOSITORY}" + echo "GITHUB_HEAD_REF: ${GITHUB_HEAD_REF}" + echo "GITHUB_REPOSITORY: ${GITHUB_REPOSITORY}" + echo "GITHUB_REF: ${GITHUB_REF}" + echo "GITHUB_ACTOR: ${GITHUB_ACTOR}" + + - name: Determine PR source branch and fork repository + id: vars + run: | + # Set default FORK_REPO and BRANCH_NAME values. + BRANCH_NAME="${GITHUB_HEAD_REF:-${GITHUB_REF##*/}}" + FORK_REPO="${GITHUB_HEAD_REPOSITORY:-${GITHUB_ACTOR}/openhospital-core}" + CHECK_BRANCH_URL="https://github.com/${GITHUB_ACTOR}/openhospital-core/tree/$BRANCH_NAME" + echo "Checking branch existence with: curl -s -o /dev/null -w \"%{http_code}\" $CHECK_BRANCH_URL" + + # Determine FORK_REPO with fallback logic + if [[ -n "${GITHUB_HEAD_REPOSITORY}" ]]; then + echo "Using ${GITHUB_HEAD_REPOSITORY}." + FORK_REPO=${GITHUB_HEAD_REPOSITORY} + elif curl -s -o /dev/null -w "%{http_code}" $CHECK_BRANCH_URL | grep -q "200"; then + echo "Using ${GITHUB_ACTOR}/openhospital-core" + FORK_REPO=${GITHUB_ACTOR}/openhospital-core + else + echo "Using informatici/openhospital-core." + FORK_REPO="informatici/openhospital-core" + fi + + # Export FORK_REPO and BRANCH_NAME to GITHUB_ENV for the next step + echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV + echo "FORK_REPO=$FORK_REPO" >> $GITHUB_ENV + + - name: Log variables + run: | + echo "FORK_REPO: ${{ env.FORK_REPO }}" + echo "BRANCH_NAME: ${{ env.BRANCH_NAME }}" + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: 17 + java-package: jdk + + - name: Checkout core + run: | + git clone --depth=1 --no-single-branch https://github.com/${{ env.FORK_REPO }}.git openhospital-core + pushd openhospital-core + git checkout -B ${{ env.BRANCH_NAME }} origin/${{ env.BRANCH_NAME }} || git checkout develop + popd + + - name: Install core + run: | + pushd openhospital-core + mvn install -DskipTests=true + popd + + - name: Build GUI with Maven + run: mvn -B package --file pom.xml diff --git a/.ide-settings/eclipse/OpenHospital-Java-CodeStyle-Formatter.xml b/.ide-settings/eclipse/OpenHospital-Java-CodeStyle-Formatter.xml index 71186b4c20..bae456b72e 100755 --- a/.ide-settings/eclipse/OpenHospital-Java-CodeStyle-Formatter.xml +++ b/.ide-settings/eclipse/OpenHospital-Java-CodeStyle-Formatter.xml @@ -1,380 +1,401 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.ide-settings/eclipse/OpenHospital.importorder b/.ide-settings/eclipse/OpenHospital.importorder index b86f00e0ab..2d1b06c8a3 100755 --- a/.ide-settings/eclipse/OpenHospital.importorder +++ b/.ide-settings/eclipse/OpenHospital.importorder @@ -1,8 +1,10 @@ #Organize Import Order -#Fri Jul 31 13:21:30 EDT 2020 -5= -4=com -3=org +#Wed Mar 13 13:21:30 EDT 2024 +6= +5=com +4=org +3=jakarta 2=javax 1=java 0=\# + diff --git a/.ide-settings/idea/OpenHospital-code-style-configuration.xml b/.ide-settings/idea/OpenHospital-code-style-configuration.xml index 63a25edc80..87a358cd6c 100644 --- a/.ide-settings/idea/OpenHospital-code-style-configuration.xml +++ b/.ide-settings/idea/OpenHospital-code-style-configuration.xml @@ -1,6 +1,8 @@ - + \ No newline at end of file diff --git a/README.md b/README.md index 212a5eece7..99c01ac609 100644 --- a/README.md +++ b/README.md @@ -25,16 +25,16 @@ or any similar SQL database (e.g. MariaDB). ### Launch within IDE -Be sure to have configured properly the classpath for the project (see [5 Installing Open Hospital 1.14.0 in Eclipse EE](https://github.com/informatici/openhospital-doc/blob/develop/doc_admin/AdminManual.adoc#5-installing-open-hospital-1-14-0-in-eclipse-ee)) +Be sure to have configured properly the classpath for the project (see [5 Installing Open Hospital 1.14.2 in Eclipse EE](https://github.com/informatici/openhospital-doc/blob/develop/doc_admin/AdminManual.adoc#5-installing-open-hospital-1-14-2-in-eclipse-ee)) Before running the application, you should generate the config files with the `g)` option, or manually copying and renaming the files `*.dist` files in `rsc/` folder and edit them accordingly: -| Dist file | Property file | Properties to fill in | -|--------------------------|---------------------|---------------------------------------------------------------| -| database.properties.dist | database.properties | DBSERVER, DBPORT, DBNAME, DBUSER, DBPASS | -| dicom.properties.dist | dicom.properties | OH_PATH_SUBSTITUTE/DICOM_DIR, DICOM_SIZE | -| log4j.properties.dist | log4j.properties | LOG_DEST, DBSERVER, DBPORT, DBNAME, DBUSER, DBPASS, LOG_LEVEL | -| settings.properties.dist | settings.properties | OH_LANGUAGE,(SINGLEUSER=)YES_OR_NO, PHOTO_DIR, OH_DOC_DIR | +| Dist file | Property file | Properties to fill in | +|-------------------------------|--------------------------|---------------------------------------------------------------| +| database.properties.dist | database.properties | DBSERVER, DBPORT, DBNAME, DBUSER, DBPASS | +| dicom.properties.dist | dicom.properties | OH_PATH_SUBSTITUTE/DICOM_DIR, DICOM_SIZE | +| log4j2-spring.properties.dist | log4j2-spring.properties | LOG_DEST, DBSERVER, DBPORT, DBNAME, DBUSER, DBPASS, LOG_LEVEL | +| settings.properties.dist | settings.properties | OH_LANGUAGE,(SINGLEUSER=)YES_OR_NO, PHOTO_DIR, OH_DOC_DIR | *For further information, please refer to the Admin and User manuals in the [Doc project][openhospital-doc].* diff --git a/bundle/language_am_ET.properties b/bundle/language_am_ET.properties index 955af314a1..d597245ec8 100644 --- a/bundle/language_am_ET.properties +++ b/bundle/language_am_ET.properties @@ -8,6 +8,7 @@ angal.admission.admissionanddischarge.title angal.admission.admissiondate.border = የቅበላቀን * angal.admission.admissiondate.txt = የቅበላ ቀን * angal.admission.admissiondatecannotbeempty.msg = የቅበላ ቀን ባዶ ሊሆን አይችልም። +angal.admission.admissionpatientcannotbeempty.msg = Admission patient cannot be empty. angal.admission.admissionstatus.border = የቅበላሁኔታ angal.admission.admissiontype.border = የቅበላ አይነት * angal.admission.admissionwardcannotbeempty.msg = የቅበላ ዋርድ ባዶ ሊሆን አይችልም። @@ -746,11 +747,14 @@ angal.malnutrition.nodate.msg angal.malnutrition.nonameselected = የተመረጠ ስም የለም angal.malnutrition.pleaseinsertavalidcontroldate.msg = እባክዎ ትክክለኛ የቁጥጥር ቀን ያስገቡ። angal.malnutrition.pleaseinsertavalidvisitdate.msg = እባክዎ ትክክለኛ የጉብኝት ቀን ያስገቡ። +angal.medicals.active.txt = Active +angal.medicals.activeonly.txt = Active only angal.medicals.averagemonthlyconsumption.btn = AMC angal.medicals.averagemonthlyconsumption.btn.key = ኤም -angal.medicals.criticallevel = የወሳኝነት ደረጃ +angal.medicals.criticallevel.txt = የወሳኝነት ደረጃ angal.medicals.critlevel.col = የወሳኝነት ደረጃ angal.medicals.deletemedical.fmt.msg = ሕክምና ይሰረዝ፡ {0}? +angal.medicals.disabledonly.txt = Disabled only angal.medicals.editmedical.title = ሜዲካል አርትዕ/አስተካክል angal.medicals.expiring.btn = ጊዜው ያለፈበት angal.medicals.expiring.btn.key = ፒ @@ -769,7 +773,7 @@ angal.medicals.order.btn.key angal.medicals.othermonth = ሌላ ወር... angal.medicals.outofstock.col = መጋዘን ውስጥ የለም angal.medicals.pcsperpck.col = PcsXPck -angal.medicals.pcsperpckExt = በፓኬት ውስጥ ያሉት ብዛቶች +angal.medicals.pcsperpck.txt = በፓኬት ውስጥ ያሉት ብዛቶች angal.medicals.pharmaceuticalbrowser.title = ፋርማሲዩቲካል አሳሽ angal.medicals.pleaseselectareport.msg = እባክዎ ሪፖርት ይምረጡ፡- angal.medicals.pleaseselectperiod.msg = እባክዎን ጊዜ ይምረጡ፡ @@ -785,6 +789,9 @@ angal.medicals.thismonth angal.medicals.today = ዛሬ angal.medicals.type = ዓይነት angal.medicals.withlot = ከብዙ ጋር +angal.medicalstock.allcharges.txt = All charges +angal.medicalstock.alldischarges.txt = All discharges +angal.medicalstock.category.col = ምድብ angal.medicalstock.charge.btn = ክፍያ angal.medicalstock.charge.btn.key = ኤች angal.medicalstock.chooseamedical.msg = ሕክምና ይምረጡ። @@ -793,6 +800,7 @@ angal.medicalstock.chooseavalidduedate.msg angal.medicalstock.chooseavalidmovementdate.msg = ትክክለኛ የእንቅስቃሴ ቀን ይምረጡ። angal.medicalstock.chooseavalidpreparationdate = ትክክለኛ የዝግጅት ቀን ይምረጡ angal.medicalstock.clickdrugs = ዝርዝር መረጃዎችን ለማየት ሁለቴ ጠቅ ያድርጉ +angal.medicalstock.codeordescription.txt = Code or Description angal.medicalstock.cost.col = ወጪ angal.medicalstock.deletemovementsuccess.msg = Last movement successfully deleted. angal.medicalstock.discharge.btn = መፍሰስ @@ -815,7 +823,7 @@ angal.medicalstock.lotpreparationdate angal.medicalstock.medtype.col = የሕክምና ዓይነት angal.medicalstock.movement = እንቅስቃሴ angal.medicalstock.movementdatefromcannotbelaterthanmovementdateto = ከ እንቅስቃሴ ቀን ከ እስከ እንቅስቃሴ ቀን በኋላ ሊሆን አይችልም -angal.medicalstock.movementquantityisgreaterthanthequantityof.msg = የእንቅስቃሴ መጠን ከተመረጠው ዕጣ መጠን ይበልጣል; እንቅስቃሴውን ከፋፍል. +angal.medicalstock.movementquantityisgreaterthanthequantityof.fmt.msg = Movement quantity ({0}) is greater than the quantity of the lot selected ({1}); split the movement or adjust Units/Packets. angal.medicalstock.multiplecharging.adateinthefutureisnotallowed.msg = የወደፊቱ ቀን አይፈቀድም. angal.medicalstock.multiplecharging.chargetype = የክፍያ ዓይነት angal.medicalstock.multiplecharging.chooseamedical = ሕክምና ይምረጡ @@ -856,7 +864,9 @@ angal.medicalstock.multipledischarging.isabouttoend angal.medicalstock.multipledischarging.lotinformations = የ ሎት መረጃ angal.medicalstock.multipledischarging.lotnumberabb = የሎት ቁጥር angal.medicalstock.multipledischarging.lyinginstock = በክምችት ውስጥ ያሉ፡ +angal.medicalstock.multipledischarging.movementexceedstheavailablequantityformedical.fmt.msg = Movement exceeds the available quantity ({0}) for medical {1}. angal.medicalstock.multipledischarging.noelementtosave = ምንም የሚቀመጡ ነገሮች የሉም +angal.medicalstock.multipledischarging.nolotswithavailablequantityfoundformedicalpleasereport.fmt.msg = No lots with available quantity found for medical {0}; please report to system administrator. angal.medicalstock.multipledischarging.outofstock = ከመጋዘን ተጠናቀቀ! angal.medicalstock.multipledischarging.packets = እሽጎች angal.medicalstock.multipledischarging.pleaseinsertavalidvalue = ትክክለኛ ዋጋ/ዳታ አስገባ @@ -885,6 +895,8 @@ angal.medicalstock.preparationdatefromcannotbelaterpreparationdateto angal.medicalstock.prepdate = የዝግጅት ቀን angal.medicalstock.prepdate.col = የዝግጅት ቀን angal.medicalstock.refno.col = ማጣቀሻ.ቁ. +angal.medicalstock.reset.btn = ዳግም አስጀምር +angal.medicalstock.reset.btn.key = ቲ angal.medicalstock.selectionpanel = የምርጫ ፓነል angal.medicalstock.stockmovement.title = የ ክምችት/ዕቃ እንቅስቃሴ angal.medicalstock.stockmovementbrowser.title = የክምችት/ዕቃ እንቅስቃሴ አሳሽ @@ -972,6 +984,10 @@ angal.medicalstockwardedit.selectpatient.btn.key angal.medicalstockwardedit.title = አዲስ / አርትዕ angal.medicalstockwardedit.tooltip.associateapatientwiththismovement = ከዚህ እንቅስቃሴ ጋር ታካሚ ያገናኙ angal.medicalstockwardedit.tooltip.removepatientassociationwiththismovement = ከዚህ እንቅስቃሴ ጋር የተየያዘ ታካሚው ያስወግዱ +angal.medstockmovtype.allowedcategoriesare.fmt.msg = Allowed categories are: {0} +angal.medstockmovtype.category.txt = ምድብ +angal.medstockmovtype.category.operational.txt = Operational +angal.medstockmovtype.category.nonoperational.txt = Non-Operational angal.medstockmovtype.deletemovementtype.fmt.msg = የእንቅስቃሴ አይነት ይሰረዝ፡ {0}? angal.medstockmovtype.editmedicalstockmovementtype.title = የሕክምና ቁሳቁስ እንቅስቃሴ ዓይነትን ያርትዑ angal.medstockmovtype.medicalstockmovementtypebrowser.title = የሕክምና ቁሳቁስ እንቅስቃሴ አይነት አሳሽ @@ -1184,7 +1200,7 @@ angal.newbill.selectamedical.txt angal.newbill.selectanexam.txt = ምርመራ ይምረጡ፡- angal.newbill.selectanoperation.txt = ኦፕሬሽን ይምረጡ፡- angal.newbill.selectapricelist.title = የዋጋ ዝርዝር ይምረጡ -angal.newbill.somepriceshavebeenchangeddoyouwanttoupdatetheitemsprices.fmg.msg = አንዳንድ ዋጋዎች ተለውጠዋል፡ {0}\n\nየእቃዎቹን ዋጋ ማስተካከል ይፈልጋሉ? +angal.newbill.somepriceshavebeenchangeddoyouwanttoupdatetheitemsprices.fmt.msg = አንዳንድ ዋጋዎች ተለውጠዋል፡ {0}\n\nየእቃዎቹን ዋጋ ማስተካከል ይፈልጋሉ? angal.newbill.somepricesnotfound.fmt.msg = አንዳንድ ዋጋዎች አልተገኙም፦ {0} angal.newbill.somepricesnotfoundandsomeotherchangeddoyouwanttoupdatetheitemsprices.fmt.msg = አንዳንድ ዋጋዎች አልተገኙም እና ሌሎች ተለውጠዋል፡-\nአልተገኘም፦ {0}\nተቀይሯል፡ {1} angal.newbill.thedateisbeforethelastpayment.msg = ቀኑ ከመጨረሻው ክፍያ በፊት ነው። @@ -1704,6 +1720,7 @@ angal.userbrowser.step2.pleaserepeatthenewpassword.label angal.userbrowser.theadminusercannotbedeleted.msg = የ"አስተዳዳሪ/admin" ተጠቃሚ ሊሰረዝ አይችልም። angal.userbrowser.thepasswordhasbeenchanged.msg = የይለፍ ቃሉ ተለውጧል። angal.userbrowser.theuseralreadyexists.fmt.msg = ተጠቃሚው "{0}" አስቀድሞ አለ። +angal.userbrowser.theusernamecontainsinvalidcharacters.msg = The user name must contain only a-z, 0-9, dash, period and underscore characters. angal.userbrowser.title = የተጠቃሚ አሳሽ angal.userbrowser.user.col = ተጠቃሚ angal.vaccine.deletevaccine.fmt.msg = ክትባት ይሰረዝ፡ {0}? diff --git a/bundle/language_ar.properties b/bundle/language_ar.properties index 587d06a4ff..7c2a1b6a35 100644 --- a/bundle/language_ar.properties +++ b/bundle/language_ar.properties @@ -8,6 +8,7 @@ angal.admission.admissionanddischarge.title angal.admission.admissiondate.border = تاريخ القبول angal.admission.admissiondate.txt = تاريخ القبول angal.admission.admissiondatecannotbeempty.msg = لا يمكن أن يكون تاريخ القبول فارغًا +angal.admission.admissionpatientcannotbeempty.msg = Admission patient cannot be empty. angal.admission.admissionstatus.border = حالة الإقامة angal.admission.admissiontype.border = نوع الإقامة angal.admission.admissionwardcannotbeempty.msg = لا يمكن أن يكون جناح الإقامة فارغًا @@ -746,11 +747,14 @@ angal.malnutrition.nodate.msg angal.malnutrition.nonameselected = لم يتم اختيار اسم angal.malnutrition.pleaseinsertavalidcontroldate.msg = إدخال تاريخ مراجعة صالح angal.malnutrition.pleaseinsertavalidvisitdate.msg = إدخال تاريخ زيارة صالح +angal.medicals.active.txt = Active +angal.medicals.activeonly.txt = Active only angal.medicals.averagemonthlyconsumption.btn = (AMC) متوسط الاستهلاك الشهري angal.medicals.averagemonthlyconsumption.btn.key = M -angal.medicals.criticallevel = مستوى حرج +angal.medicals.criticallevel.txt = مستوى حرج angal.medicals.critlevel.col = مستوى حرج angal.medicals.deletemedical.fmt.msg = حذف منتج طبي: {0}؟ +angal.medicals.disabledonly.txt = Disabled only angal.medicals.editmedical.title = تعديل منتج طبي angal.medicals.expiring.btn = تنتهي الصلاحية angal.medicals.expiring.btn.key = P @@ -769,7 +773,7 @@ angal.medicals.order.btn.key angal.medicals.othermonth = شهر آخر angal.medicals.outofstock.col = غير متوفر angal.medicals.pcsperpck.col = قطعة لكل عبوة -angal.medicals.pcsperpckExt = قطعة لكل عبوة +angal.medicals.pcsperpck.txt = قطعة لكل عبوة angal.medicals.pharmaceuticalbrowser.title = متصفح الصيدلانية angal.medicals.pleaseselectareport.msg = اختيار تقرير angal.medicals.pleaseselectperiod.msg = اختيار فترة @@ -785,6 +789,9 @@ angal.medicals.thismonth angal.medicals.today = اليوم angal.medicals.type = نوع angal.medicals.withlot = مع دفعات +angal.medicalstock.allcharges.txt = All charges +angal.medicalstock.alldischarges.txt = All discharges +angal.medicalstock.category.col = Category angal.medicalstock.charge.btn = فرض angal.medicalstock.charge.btn.key = H angal.medicalstock.chooseamedical.msg = اختر منتج طبي @@ -793,6 +800,7 @@ angal.medicalstock.chooseavalidduedate.msg angal.medicalstock.chooseavalidmovementdate.msg = اختر تاريخ حركة صالحًا angal.medicalstock.chooseavalidpreparationdate = اختر تاريخ تحضير صالحًا angal.medicalstock.clickdrugs = انقر نقرًا مزدوجًا لإظهار تفاصيل الدُفعة +angal.medicalstock.codeordescription.txt = Code or Description angal.medicalstock.cost.col = كلفة angal.medicalstock.deletemovementsuccess.msg = تم حذف الحركة الأخيرة بنجاح angal.medicalstock.discharge.btn = التخريج @@ -815,7 +823,7 @@ angal.medicalstock.lotpreparationdate angal.medicalstock.medtype.col = نوع الدواء angal.medicalstock.movement = حركة angal.medicalstock.movementdatefromcannotbelaterthanmovementdateto = لا يمكن أن يكون تاريخ النقل من بعد تاريخ الحركة إلى -angal.medicalstock.movementquantityisgreaterthanthequantityof.msg = كمية الحركة أكبر من كمية الدفعة المحدد، قم بتقسيم الحركة +angal.medicalstock.movementquantityisgreaterthanthequantityof.fmt.msg = Movement quantity ({0}) is greater than the quantity of the lot selected ({1}); split the movement or adjust Units/Packets. angal.medicalstock.multiplecharging.adateinthefutureisnotallowed.msg = تاريخ في المستقبل غير مسموح به angal.medicalstock.multiplecharging.chargetype = نوع الفرض angal.medicalstock.multiplecharging.chooseamedical = اختر منتج طبي @@ -856,7 +864,9 @@ angal.medicalstock.multipledischarging.isabouttoend angal.medicalstock.multipledischarging.lotinformations = معلومات الدفعة angal.medicalstock.multipledischarging.lotnumberabb = رقم الدفعة angal.medicalstock.multipledischarging.lyinginstock = موجود في المستودع +angal.medicalstock.multipledischarging.movementexceedstheavailablequantityformedical.fmt.msg = Movement exceeds the available quantity ({0}) for medical {1}. angal.medicalstock.multipledischarging.noelementtosave = لا توجد عناصر لحفظها +angal.medicalstock.multipledischarging.nolotswithavailablequantityfoundformedicalpleasereport.fmt.msg = No lots with available quantity found for medical {0}; please report to system administrator. angal.medicalstock.multipledischarging.outofstock = غير متوفر angal.medicalstock.multipledischarging.packets = حزم angal.medicalstock.multipledischarging.pleaseinsertavalidvalue = أدخل قيمة صالحة @@ -885,6 +895,8 @@ angal.medicalstock.preparationdatefromcannotbelaterpreparationdateto angal.medicalstock.prepdate = تاريخ الإعداد angal.medicalstock.prepdate.col = تاريخ التحضير angal.medicalstock.refno.col = رقم المرجع +angal.medicalstock.reset.btn = إعادة تعيين +angal.medicalstock.reset.btn.key = T angal.medicalstock.selectionpanel = لوحة الاختيار angal.medicalstock.stockmovement.title = حركة المخزون angal.medicalstock.stockmovementbrowser.title = متصفح حركة المخزون @@ -972,6 +984,10 @@ angal.medicalstockwardedit.selectpatient.btn.key angal.medicalstockwardedit.title = جديد / تعديل angal.medicalstockwardedit.tooltip.associateapatientwiththismovement = ربط المريض بهذه الحركة angal.medicalstockwardedit.tooltip.removepatientassociationwiththismovement = حذف ارتباط المريض بهذه الحركة +angal.medstockmovtype.allowedcategoriesare.fmt.msg = Allowed categories are: {0} +angal.medstockmovtype.category.txt = Category +angal.medstockmovtype.category.operational.txt = Operational +angal.medstockmovtype.category.nonoperational.txt = Non-Operational angal.medstockmovtype.deletemovementtype.fmt.msg = حذف نوع الحركة: {0}؟ angal.medstockmovtype.editmedicalstockmovementtype.title = تعديل نوع حركة المخزون الطبي angal.medstockmovtype.medicalstockmovementtypebrowser.title = تصفح نوع حركة المخزون الطبي @@ -1184,7 +1200,7 @@ angal.newbill.selectamedical.txt angal.newbill.selectanexam.txt = حدد الفحص angal.newbill.selectanoperation.txt = حدد عملية angal.newbill.selectapricelist.title = حدد قائمة الأسعار -angal.newbill.somepriceshavebeenchangeddoyouwanttoupdatetheitemsprices.fmg.msg = Some prices have been changed : {0}\n\nDo you want to update the items' prices? +angal.newbill.somepriceshavebeenchangeddoyouwanttoupdatetheitemsprices.fmt.msg = Some prices have been changed : {0}\n\nDo you want to update the items' prices? angal.newbill.somepricesnotfound.fmt.msg = لم يتم العثور على بعض الأسعار: {0} angal.newbill.somepricesnotfoundandsomeotherchangeddoyouwanttoupdatetheitemsprices.fmt.msg = Some prices not found and some other changed:\nNot found: {0}\nChanged: {1}\n\nDo you want to update the existing items' prices? angal.newbill.thedateisbeforethelastpayment.msg = التاريخ قبل الدفعة الأخيرة @@ -1704,6 +1720,7 @@ angal.userbrowser.step2.pleaserepeatthenewpassword.label angal.userbrowser.theadminusercannotbedeleted.msg = لا يمكن حذف المستخدم المسؤول angal.userbrowser.thepasswordhasbeenchanged.msg = تم تغيير كلمة المرور angal.userbrowser.theuseralreadyexists.fmt.msg = المستخدم "{0}" موجود بالفعل +angal.userbrowser.theusernamecontainsinvalidcharacters.msg = The user name must contain only a-z, 0-9, dash, period and underscore characters. angal.userbrowser.title = متصفح المستخدم angal.userbrowser.user.col = مستخدم angal.vaccine.deletevaccine.fmt.msg = حذف اللقاح: {0}؟ diff --git a/bundle/language_de.properties b/bundle/language_de.properties index 173e616bf6..9d0edac1d9 100644 --- a/bundle/language_de.properties +++ b/bundle/language_de.properties @@ -8,6 +8,7 @@ angal.admission.admissionanddischarge.title angal.admission.admissiondate.border = Aufnahmedatum * angal.admission.admissiondate.txt = Aufnahmedatum * angal.admission.admissiondatecannotbeempty.msg = Aufnahmedatum darf nicht leer sein. +angal.admission.admissionpatientcannotbeempty.msg = Admission patient cannot be empty. angal.admission.admissionstatus.border = Aufnahmestatus angal.admission.admissiontype.border = Aufnahmetyp * angal.admission.admissionwardcannotbeempty.msg = Die Aufnahmestation darf nicht leer sein. @@ -746,11 +747,14 @@ angal.malnutrition.nodate.msg angal.malnutrition.nonameselected = Kein Name ausgewählt angal.malnutrition.pleaseinsertavalidcontroldate.msg = Bitte geben Sie ein gültiges Kontrolldatum ein. angal.malnutrition.pleaseinsertavalidvisitdate.msg = Bitte geben Sie ein gültiges Besuchsdatum ein. +angal.medicals.active.txt = Aktiv +angal.medicals.activeonly.txt = Nur aktive angal.medicals.averagemonthlyconsumption.btn = AMC angal.medicals.averagemonthlyconsumption.btn.key = M -angal.medicals.criticallevel = Kritischer Stand +angal.medicals.criticallevel.txt = Kritischer Stand angal.medicals.critlevel.col = Krit. Stufe angal.medicals.deletemedical.fmt.msg = Medikament löschen: {0}? +angal.medicals.disabledonly.txt = Nur deaktiviert angal.medicals.editmedical.title = Medikament bearbeiten angal.medicals.expiring.btn = Ablaufend angal.medicals.expiring.btn.key = P @@ -769,7 +773,7 @@ angal.medicals.order.btn.key angal.medicals.othermonth = Anderer Monat... angal.medicals.outofstock.col = Nicht auf Lager angal.medicals.pcsperpck.col = PcsXPck -angal.medicals.pcsperpckExt = Stück pro Packung +angal.medicals.pcsperpck.txt = Stück pro Packung angal.medicals.pharmaceuticalbrowser.title = Arzneimittelbrowser angal.medicals.pleaseselectareport.msg = Wählen Sie bitte einen Bericht aus: angal.medicals.pleaseselectperiod.msg = Wählen Sie bitte einen Zeitraum: @@ -785,6 +789,9 @@ angal.medicals.thismonth angal.medicals.today = Heute angal.medicals.type = Typ angal.medicals.withlot = Mit Lots +angal.medicalstock.allcharges.txt = Alle Einweisungen +angal.medicalstock.alldischarges.txt = Alle Entlassungen +angal.medicalstock.category.col = Kategorie angal.medicalstock.charge.btn = Berechnen angal.medicalstock.charge.btn.key = H angal.medicalstock.chooseamedical.msg = Wählen sie einen Medikament. @@ -793,6 +800,7 @@ angal.medicalstock.chooseavalidduedate.msg angal.medicalstock.chooseavalidmovementdate.msg = Wählen Sie ein gültiges Verschiebungsdatum. angal.medicalstock.chooseavalidpreparationdate = Wählen Sie ein gültiges Vorbereitungsdatum aus angal.medicalstock.clickdrugs = Doppelklicken Sie, um Lotdetails anzuzeigen +angal.medicalstock.codeordescription.txt = Code oder Beschreibung angal.medicalstock.cost.col = Kosten angal.medicalstock.deletemovementsuccess.msg = Letzte Bewegung erfolgreich gelöscht. angal.medicalstock.discharge.btn = Entlassen @@ -815,7 +823,7 @@ angal.medicalstock.lotpreparationdate angal.medicalstock.medtype.col = Med Typ angal.medicalstock.movement = Bewegung angal.medicalstock.movementdatefromcannotbelaterthanmovementdateto = Das Bewegungsdatum von darf nicht später als das Bewegungsdatum bis sein -angal.medicalstock.movementquantityisgreaterthanthequantityof.msg = Die Bewegungsmenge ist größer als die Menge des ausgewählten Lots; die Bewegung trennen. +angal.medicalstock.movementquantityisgreaterthanthequantityof.fmt.msg = Movement quantity ({0}) is greater than the quantity of the lot selected ({1}); split the movement or adjust Units/Packets. angal.medicalstock.multiplecharging.adateinthefutureisnotallowed.msg = Ein Datum in der Zukunft ist nicht zulässig. angal.medicalstock.multiplecharging.chargetype = Kostenart angal.medicalstock.multiplecharging.chooseamedical = Wählen Sie einen Medikament @@ -856,7 +864,9 @@ angal.medicalstock.multipledischarging.isabouttoend angal.medicalstock.multipledischarging.lotinformations = Lotinformationen angal.medicalstock.multipledischarging.lotnumberabb = Lot Nr. angal.medicalstock.multipledischarging.lyinginstock = Vorrätig: +angal.medicalstock.multipledischarging.movementexceedstheavailablequantityformedical.fmt.msg = Movement exceeds the available quantity ({0}) for medical {1}. angal.medicalstock.multipledischarging.noelementtosave = Keine Elemente zum Speichern vorhanden +angal.medicalstock.multipledischarging.nolotswithavailablequantityfoundformedicalpleasereport.fmt.msg = No lots with available quantity found for medical {0}; please report to system administrator. angal.medicalstock.multipledischarging.outofstock = Nicht vorrättig! angal.medicalstock.multipledischarging.packets = Pakete angal.medicalstock.multipledischarging.pleaseinsertavalidvalue = Geben Sie einen gültigen Wert ein. @@ -885,6 +895,8 @@ angal.medicalstock.preparationdatefromcannotbelaterpreparationdateto angal.medicalstock.prepdate = Herstellungsdatum angal.medicalstock.prepdate.col = Vorb Datum angal.medicalstock.refno.col = Ref. Nr. +angal.medicalstock.reset.btn = Zurücksetzen +angal.medicalstock.reset.btn.key = T angal.medicalstock.selectionpanel = Auwahlmenü angal.medicalstock.stockmovement.title = Lagerbewegung angal.medicalstock.stockmovementbrowser.title = Bestandsbewegungsbrowser @@ -972,6 +984,10 @@ angal.medicalstockwardedit.selectpatient.btn.key angal.medicalstockwardedit.title = Neu / Bearbeiten angal.medicalstockwardedit.tooltip.associateapatientwiththismovement = Verknüpfen Sie einen Patienten mit dieser Bewegung angal.medicalstockwardedit.tooltip.removepatientassociationwiththismovement = Patientenzuordnung zu dieser Bewegung entfernen +angal.medstockmovtype.allowedcategoriesare.fmt.msg = Allowed categories are: {0} +angal.medstockmovtype.category.txt = Kategorie +angal.medstockmovtype.category.operational.txt = Operational +angal.medstockmovtype.category.nonoperational.txt = Non-Operational angal.medstockmovtype.deletemovementtype.fmt.msg = Bewegungsart löschen: {0}? angal.medstockmovtype.editmedicalstockmovementtype.title = Bearbeiten von Bewegungsart des medizinischen Bestands angal.medstockmovtype.medicalstockmovementtypebrowser.title = Browser für Bewegungsarten medizinischer Bestände @@ -1184,7 +1200,7 @@ angal.newbill.selectamedical.txt angal.newbill.selectanexam.txt = Exam wählen: angal.newbill.selectanoperation.txt = Wähle ein Operation: angal.newbill.selectapricelist.title = Wähle eine Preisliste -angal.newbill.somepriceshavebeenchangeddoyouwanttoupdatetheitemsprices.fmg.msg = Einige Preise wurden geändert: {0}\n\nMöchten Sie die Preise der Artikel aktualisieren? +angal.newbill.somepriceshavebeenchangeddoyouwanttoupdatetheitemsprices.fmt.msg = Einige Preise wurden geändert: {0}\n\nMöchten Sie die Preise der Artikel aktualisieren? angal.newbill.somepricesnotfound.fmt.msg = Einige Preise wurden nicht gefunden: {0} angal.newbill.somepricesnotfoundandsomeotherchangeddoyouwanttoupdatetheitemsprices.fmt.msg = Einige Preise wurden nicht gefunden und andere geändert:\nNicht gefunden: {0}\nGeändert: {1}\n\nMöchten Sie die Preise der vorhandenen Artikel aktualisieren? angal.newbill.thedateisbeforethelastpayment.msg = Das Datum liegt vor der letzten Zahlung. @@ -1704,6 +1720,7 @@ angal.userbrowser.step2.pleaserepeatthenewpassword.label angal.userbrowser.theadminusercannotbedeleted.msg = Der „admin“-Benutzer kann nicht gelöscht werden. angal.userbrowser.thepasswordhasbeenchanged.msg = Das Passwort wurde geändert. angal.userbrowser.theuseralreadyexists.fmt.msg = Benutzer "{0}" existiert bereits. +angal.userbrowser.theusernamecontainsinvalidcharacters.msg = The user name must contain only a-z, 0-9, dash, period and underscore characters. angal.userbrowser.title = Nutzerbrowser angal.userbrowser.user.col = Benutzer angal.vaccine.deletevaccine.fmt.msg = Impfstoff löschen: {0}? diff --git a/bundle/language_en.properties b/bundle/language_en.properties index e9cbe17080..77f1ae98ad 100644 --- a/bundle/language_en.properties +++ b/bundle/language_en.properties @@ -8,6 +8,7 @@ angal.admission.admissionanddischarge.title angal.admission.admissiondate.border = Admission Date * angal.admission.admissiondate.txt = Admission Date * angal.admission.admissiondatecannotbeempty.msg = Admission date cannot be empty. +angal.admission.admissionpatientcannotbeempty.msg = Admission patient cannot be empty. angal.admission.admissionstatus.border = Admission Status angal.admission.admissiontype.border = Admission Type * angal.admission.admissionwardcannotbeempty.msg = Admission ward cannot be empty. @@ -785,11 +786,14 @@ angal.malnutrition.nodate.msg angal.malnutrition.nonameselected = No name selected angal.malnutrition.pleaseinsertavalidcontroldate.msg = Please insert a valid control date. angal.malnutrition.pleaseinsertavalidvisitdate.msg = Please insert a valid visit date. +angal.medicals.active.txt = Active +angal.medicals.activeonly.txt = Active only angal.medicals.averagemonthlyconsumption.btn = AMC angal.medicals.averagemonthlyconsumption.btn.key = M -angal.medicals.criticallevel = Critical level +angal.medicals.criticallevel.txt = Critical level angal.medicals.critlevel.col = Crit. Level angal.medicals.deletemedical.fmt.msg = Delete medical: {0}? +angal.medicals.disabledonly.txt = Disabled only angal.medicals.editmedical.title = Edit Medical angal.medicals.expiring.btn = Expiring angal.medicals.expiring.btn.key = P @@ -808,7 +812,7 @@ angal.medicals.order.btn.key angal.medicals.othermonth = Other month... angal.medicals.outofstock.col = Out of Stock angal.medicals.pcsperpck.col = PcsXPck -angal.medicals.pcsperpckExt = Pieces per Packet +angal.medicals.pcsperpck.txt = Pieces per Packet angal.medicals.pharmaceuticalbrowser.title = Pharmaceutical Browser angal.medicals.pleaseselectareport.msg = Please select a report: angal.medicals.pleaseselectperiod.msg = Please select a period: @@ -824,6 +828,9 @@ angal.medicals.thismonth angal.medicals.today = Today angal.medicals.type = Type angal.medicals.withlot = With lots +angal.medicalstock.allcharges.txt = All charges +angal.medicalstock.alldischarges.txt = All discharges +angal.medicalstock.category.col = Category angal.medicalstock.charge.btn = Charge angal.medicalstock.charge.btn.key = H angal.medicalstock.chooseamedical.msg = Choose a medical. @@ -832,6 +839,7 @@ angal.medicalstock.chooseavalidduedate.msg angal.medicalstock.chooseavalidmovementdate.msg = Choose a valid movement date. angal.medicalstock.chooseavalidpreparationdate = Choose a valid preparation date angal.medicalstock.clickdrugs = Double click to show lot details +angal.medicalstock.codeordescription.txt = Code or Description angal.medicalstock.cost.col = Cost angal.medicalstock.deletemovementsuccess.msg = Last movement successfully deleted. angal.medicalstock.discharge.btn = Discharge @@ -854,16 +862,19 @@ angal.medicalstock.lotpreparationdate angal.medicalstock.medtype.col = Med Type angal.medicalstock.movement = Movement angal.medicalstock.movementdatefromcannotbelaterthanmovementdateto = Movement Date From cannot be later than movement Date To -angal.medicalstock.movementquantityisgreaterthanthequantityof.msg = Movement quantity is greater than the quantity of the lot selected; split the movement. +angal.medicalstock.movementquantityisgreaterthanthequantityof.fmt.msg = Movement quantity ({0}) is greater than the quantity of the lot selected ({1}); split the movement or adjust Units/Packets. angal.medicalstock.multiplecharging.adateinthefutureisnotallowed.msg = A date in the future is not allowed. angal.medicalstock.multiplecharging.chargetype = Charge Type angal.medicalstock.multiplecharging.chooseamedical = Choose a Medical angal.medicalstock.multiplecharging.cost = Cost angal.medicalstock.multiplecharging.datecannotbebeforelastmovementdate.msg = Date cannot be before last movement date. +angal.medicalstock.multiplecharging.empty = Empty angal.medicalstock.multiplecharging.existinglot = Existing Lots +angal.medicalstock.multiplecharging.expired = Expired angal.medicalstock.multiplecharging.expiringdate = Expiring angal.medicalstock.multiplecharging.expiringdateinthepastnotallowed = Expiring date in the past not allowed angal.medicalstock.multiplecharging.expirydatebeforepreparationdate = Expiring date before Preparation date not allowed +angal.medicalstock.multiplecharging.hideemptylots = Hide empty lots angal.medicalstock.multiplecharging.lotid = Lot id angal.medicalstock.multiplecharging.lotinformations = Lot Information angal.medicalstock.multiplecharging.lotnumberabb = Lot No. @@ -877,8 +888,10 @@ angal.medicalstock.multiplecharging.preparationdate angal.medicalstock.multiplecharging.qtypacket = Qty/Packet angal.medicalstock.multiplecharging.referencenumberabb = Reference No. angal.medicalstock.multiplecharging.selectedlot = Selected Lot +angal.medicalstock.multiplecharging.selectedlotwithoutcostpleasespecify = Selected Lot {0} has no cost information, please specify... angal.medicalstock.multiplecharging.supplier = Supplier angal.medicalstock.multiplecharging.theinsertedreferencenumberalreadyexists.msg = The inserted reference number already exists. +angal.medicalstock.multiplecharging.theinsertedlotcodealreaedyexists.msg = The inserted lot code already exists. angal.medicalstock.multiplecharging.totalcost = Total cost angal.medicalstock.multiplecharging.unitcost = Unit cost angal.medicalstock.multiplecharging.unitpack = Unit/Pack @@ -895,7 +908,9 @@ angal.medicalstock.multipledischarging.isabouttoend angal.medicalstock.multipledischarging.lotinformations = Lot Information angal.medicalstock.multipledischarging.lotnumberabb = Lot No. angal.medicalstock.multipledischarging.lyinginstock = Lying in stock: +angal.medicalstock.multipledischarging.movementexceedstheavailablequantityformedical.fmt.msg = Movement exceeds the available quantity ({0}) for medical {1}. angal.medicalstock.multipledischarging.noelementtosave = No elements to save +angal.medicalstock.multipledischarging.nolotswithavailablequantityfoundformedicalpleasereport.fmt.msg = No lots with available quantity found for medical {0}; please report to system administrator. angal.medicalstock.multipledischarging.outofstock = Out of stock! angal.medicalstock.multipledischarging.packets = Packets angal.medicalstock.multipledischarging.pleaseinsertavalidvalue = Insert a valid value @@ -924,6 +939,8 @@ angal.medicalstock.preparationdatefromcannotbelaterpreparationdateto angal.medicalstock.prepdate = Preparation date angal.medicalstock.prepdate.col = Prep Date angal.medicalstock.refno.col = Ref. No. +angal.medicalstock.reset.btn = Reset +angal.medicalstock.reset.btn.key = T angal.medicalstock.selectionpanel = Selection Panel angal.medicalstock.stockmovement.title = Stock Movement angal.medicalstock.stockmovementbrowser.title = Stock Movement Browser @@ -1011,6 +1028,10 @@ angal.medicalstockwardedit.selectpatient.btn.key angal.medicalstockwardedit.title = New / Edit angal.medicalstockwardedit.tooltip.associateapatientwiththismovement = Associate a Patient with this movement angal.medicalstockwardedit.tooltip.removepatientassociationwiththismovement = Remove Patient association with this movement +angal.medstockmovtype.allowedcategoriesare.fmt.msg = Allowed categories are: {0} +angal.medstockmovtype.category.txt = Category +angal.medstockmovtype.category.operational.txt = Operational +angal.medstockmovtype.category.nonoperational.txt = Non-Operational angal.medstockmovtype.deletemovementtype.fmt.msg = Delete movement type: {0}? angal.medstockmovtype.editmedicalstockmovementtype.title = Edit Medical Stock Movement Type angal.medstockmovtype.medicalstockmovementtypebrowser.title = Medical Stock Movement Type Browser @@ -1225,7 +1246,7 @@ angal.newbill.selectamedical.txt angal.newbill.selectanexam.txt = Select an exam: angal.newbill.selectanoperation.txt = Select an operation: angal.newbill.selectapricelist.title = Select a PriceList -angal.newbill.somepriceshavebeenchangeddoyouwanttoupdatetheitemsprices.fmg.msg = Some prices have been changed : {0}\n\nDo you want to update the items' prices? +angal.newbill.somepriceshavebeenchangeddoyouwanttoupdatetheitemsprices.fmt.msg = Some prices have been changed : {0}\n\nDo you want to update the items' prices? angal.newbill.somepricesnotfound.fmt.msg = Some prices not found: {0} angal.newbill.somepricesnotfoundandsomeotherchangeddoyouwanttoupdatetheitemsprices.fmt.msg = Some prices not found and some other changed:\nNot found: {0}\nChanged: {1}\n\nDo you want to update the existing items' prices? angal.newbill.thedateisbeforethelastpayment.msg = The date is before the last payment. @@ -1745,6 +1766,7 @@ angal.userbrowser.step2.pleaserepeatthenewpassword.label angal.userbrowser.theadminusercannotbedeleted.msg = The "admin" user cannot be deleted. angal.userbrowser.thepasswordhasbeenchanged.msg = The password has been changed. angal.userbrowser.theuseralreadyexists.fmt.msg = The user "{0}" already exists. +angal.userbrowser.theusernamecontainsinvalidcharacters.msg = The user name must contain only a-z, 0-9, dash, period and underscore characters. angal.userbrowser.title = User Browser angal.userbrowser.user.col = User angal.vaccine.deletevaccine.fmt.msg = Delete vaccine: {0}? diff --git a/bundle/language_es.properties b/bundle/language_es.properties index 58807013f8..6f7f9a84f7 100644 --- a/bundle/language_es.properties +++ b/bundle/language_es.properties @@ -8,6 +8,7 @@ angal.admission.admissionanddischarge.title angal.admission.admissiondate.border = Fecha Hospitalización * angal.admission.admissiondate.txt = Fecha Hospitalización * angal.admission.admissiondatecannotbeempty.msg = La fecha de admisión no puede estar vacía. +angal.admission.admissionpatientcannotbeempty.msg = Admission patient cannot be empty. angal.admission.admissionstatus.border = Estado Hospitalización angal.admission.admissiontype.border = Tipologías Hospitalización * angal.admission.admissionwardcannotbeempty.msg = El pabellón de admisiones no puede estar vacío. @@ -746,11 +747,14 @@ angal.malnutrition.nodate.msg angal.malnutrition.nonameselected = Ningún nombre seleccionado angal.malnutrition.pleaseinsertavalidcontroldate.msg = Por favor digitar una fecha de control válida angal.malnutrition.pleaseinsertavalidvisitdate.msg = Por favor digitar una fecha visita válida +angal.medicals.active.txt = Active +angal.medicals.activeonly.txt = Active only angal.medicals.averagemonthlyconsumption.btn = AMC angal.medicals.averagemonthlyconsumption.btn.key = A -angal.medicals.criticallevel = Nivel critico +angal.medicals.criticallevel.txt = Nivel crítico angal.medicals.critlevel.col = Crit. Nivel angal.medicals.deletemedical.fmt.msg = Eliminar médico: {0}? +angal.medicals.disabledonly.txt = Disabled only angal.medicals.editmedical.title = Modificar de Fármaco angal.medicals.expiring.btn = Vencimiento angal.medicals.expiring.btn.key = I @@ -769,7 +773,7 @@ angal.medicals.order.btn.key angal.medicals.othermonth = Otro mes... angal.medicals.outofstock.col = Agotado angal.medicals.pcsperpck.col = UndXPqt -angal.medicals.pcsperpckExt = Unidades por Paquete +angal.medicals.pcsperpck.txt = Unidades por Paquete angal.medicals.pharmaceuticalbrowser.title = Lista Fármacos angal.medicals.pleaseselectareport.msg = Seleccionar un informe angal.medicals.pleaseselectperiod.msg = Por favor seleccione un peróodo @@ -785,6 +789,9 @@ angal.medicals.thismonth angal.medicals.today = Hoy angal.medicals.type = Tipología angal.medicals.withlot = Con lotes +angal.medicalstock.allcharges.txt = All charges +angal.medicalstock.alldischarges.txt = All discharges +angal.medicalstock.category.col = Categoría angal.medicalstock.charge.btn = Carga angal.medicalstock.charge.btn.key = G angal.medicalstock.chooseamedical.msg = Escoger un fármaco @@ -793,6 +800,7 @@ angal.medicalstock.chooseavalidduedate.msg angal.medicalstock.chooseavalidmovementdate.msg = Escoger una fecha movimiento válida angal.medicalstock.chooseavalidpreparationdate = Escoger una fecha preparación válida angal.medicalstock.clickdrugs = Haga doble clic para mostrar los detalles del lote +angal.medicalstock.codeordescription.txt = Code or Description angal.medicalstock.cost.col = Costo angal.medicalstock.deletemovementsuccess.msg = Last movement successfully deleted. angal.medicalstock.discharge.btn = Descarga @@ -815,7 +823,7 @@ angal.medicalstock.lotpreparationdate angal.medicalstock.medtype.col = Med Tipo angal.medicalstock.movement = Movimiento angal.medicalstock.movementdatefromcannotbelaterthanmovementdateto = La Fecha Movimiento DE no puede ser después de la Fecha Movimiento A -angal.medicalstock.movementquantityisgreaterthanthequantityof.msg = La cantidad en movimiento es mas grande que cantidad del lote seleccionado: dividir el movimiento +angal.medicalstock.movementquantityisgreaterthanthequantityof.fmt.msg = Movement quantity ({0}) is greater than the quantity of the lot selected ({1}); split the movement or adjust Units/Packets. angal.medicalstock.multiplecharging.adateinthefutureisnotallowed.msg = No se permite una fecha en el futuro. angal.medicalstock.multiplecharging.chargetype = Tipo de Carga angal.medicalstock.multiplecharging.chooseamedical = Elija un Medicinal @@ -856,7 +864,9 @@ angal.medicalstock.multipledischarging.isabouttoend angal.medicalstock.multipledischarging.lotinformations = Informaciones del lote angal.medicalstock.multipledischarging.lotnumberabb = Lote Núm. angal.medicalstock.multipledischarging.lyinginstock = Hay depòsito en el almacén: +angal.medicalstock.multipledischarging.movementexceedstheavailablequantityformedical.fmt.msg = Movement exceeds the available quantity ({0}) for medical {1}. angal.medicalstock.multipledischarging.noelementtosave = No hay datos para salvar +angal.medicalstock.multipledischarging.nolotswithavailablequantityfoundformedicalpleasereport.fmt.msg = No lots with available quantity found for medical {0}; please report to system administrator. angal.medicalstock.multipledischarging.outofstock = agotado! angal.medicalstock.multipledischarging.packets = Paquetes angal.medicalstock.multipledischarging.pleaseinsertavalidvalue = Digitar un valor válido @@ -885,6 +895,8 @@ angal.medicalstock.preparationdatefromcannotbelaterpreparationdateto angal.medicalstock.prepdate = Fecha preparación angal.medicalstock.prepdate.col = Fecha Preparación angal.medicalstock.refno.col = Núm. Ref. +angal.medicalstock.reset.btn = Reinicializar +angal.medicalstock.reset.btn.key = T angal.medicalstock.selectionpanel = Grupo seleccionar angal.medicalstock.stockmovement.title = Movimientos Almacén angal.medicalstock.stockmovementbrowser.title = Lista Movimientos Almacén @@ -972,6 +984,10 @@ angal.medicalstockwardedit.selectpatient.btn.key angal.medicalstockwardedit.title = Nuevo / Modificar angal.medicalstockwardedit.tooltip.associateapatientwiththismovement = Asociar un paciente a este movimiento angal.medicalstockwardedit.tooltip.removepatientassociationwiththismovement = Remover el paciente asociado a este movimiento +angal.medstockmovtype.allowedcategoriesare.fmt.msg = Allowed categories are: {0} +angal.medstockmovtype.category.txt = Categoría +angal.medstockmovtype.category.operational.txt = Operational +angal.medstockmovtype.category.nonoperational.txt = Non-Operational angal.medstockmovtype.deletemovementtype.fmt.msg = ¿Eliminar tipo de movimiento: {0}? angal.medstockmovtype.editmedicalstockmovementtype.title = Modificar Expresión Tipología Movimiento Almacén Fármacos angal.medstockmovtype.medicalstockmovementtypebrowser.title = Lista Tipologías Movimientos Fármacos en Almacén @@ -1184,7 +1200,7 @@ angal.newbill.selectamedical.txt angal.newbill.selectanexam.txt = Seleccionar un examen. angal.newbill.selectanoperation.txt = Seleccionar una operación. angal.newbill.selectapricelist.title = Seleccionar una Lista -angal.newbill.somepriceshavebeenchangeddoyouwanttoupdatetheitemsprices.fmg.msg = Algunos precios han cambiado : {0}Quiere usted actualizar los nuevos precios? +angal.newbill.somepriceshavebeenchangeddoyouwanttoupdatetheitemsprices.fmt.msg = Algunos precios han cambiado : {0}Quiere usted actualizar los nuevos precios? angal.newbill.somepricesnotfound.fmt.msg = No he encontrado algunos precios: {0} angal.newbill.somepricesnotfoundandsomeotherchangeddoyouwanttoupdatetheitemsprices.fmt.msg = Algunos precios no encontrados y otros cambiados : No encontrado: {0} Modificado: {1} Quiere usted actualizar los nuevos precios? angal.newbill.thedateisbeforethelastpayment.msg = La fecha es anterior al último pago. @@ -1704,6 +1720,7 @@ angal.userbrowser.step2.pleaserepeatthenewpassword.label angal.userbrowser.theadminusercannotbedeleted.msg = El usuario "admin" no se puede eliminar. angal.userbrowser.thepasswordhasbeenchanged.msg = La contraseña ha sido cambiada. angal.userbrowser.theuseralreadyexists.fmt.msg = El usuario "{0}" ya existe. +angal.userbrowser.theusernamecontainsinvalidcharacters.msg = The user name must contain only a-z, 0-9, dash, period and underscore characters. angal.userbrowser.title = Lista Usuarios angal.userbrowser.user.col = Usuario angal.vaccine.deletevaccine.fmt.msg = ¿Eliminar vacuna: {0}? diff --git a/bundle/language_fr.properties b/bundle/language_fr.properties index 21363b5a10..b096d8daeb 100644 --- a/bundle/language_fr.properties +++ b/bundle/language_fr.properties @@ -8,11 +8,13 @@ angal.admission.admissionanddischarge.title angal.admission.admissiondate.border = Date d'hospitalisation * angal.admission.admissiondate.txt = Date d'hospitalisation * angal.admission.admissiondatecannotbeempty.msg = La date d'admission ne peut pas être vide. +angal.admission.admissionpatientcannotbeempty.msg = Admission patient cannot be empty. angal.admission.admissionstatus.border = État Hospitalisation angal.admission.admissiontype.border = Typologie d'hospitalisation * angal.admission.admissionwardcannotbeempty.msg = Le départment ne peut pas être vide. angal.admission.admitted.txt = Hospitalisé angal.admission.age.border = Âge +angal.admission.anamnesis = Anamnèse angal.admission.beddays.border = Jours de Lit angal.admission.bill.btn = Facture angal.admission.bill.btn.key = F @@ -39,7 +41,9 @@ angal.admission.deliverydate.border angal.admission.deliveryresultype.border = Typologie Résultat Accouchement angal.admission.deliverytype.border = Typologie Accouchement angal.admission.diagnosisin.col = Diagnostic Entrée +angal.admission.diagnosisincannotbeempty.msg = Le diagnostic -IN- ne peut pas être vide. angal.admission.diagnosisinstar.border = Diagnostic -Entrée- * +angal.admission.diagnosisinisnotallowed.msg = Le diagnostic -IN- n'est pas autorisé. angal.admission.diagnosisout.border = Diagnostic -Sortie- angal.admission.diagnosisout.col = Diagnostic Sortie angal.admission.dischargedate.border = Date Démission @@ -73,7 +77,7 @@ angal.admission.malnutritioncontrol.btn.key angal.admission.maritalstatus.label = État Civil angal.admission.merge = Fusionner angal.admission.merge.btn = Fusionner -angal.admission.merge.btn.key = I +angal.admission.merge.btn.key = C angal.admission.motherisalive = Mère vivante angal.admission.motherisdead = Mère décédée angal.admission.newadmission.title = Nouvelle Hospitalisation @@ -106,12 +110,13 @@ angal.admission.patientfolder.admchart.btn.key angal.admission.patientfolder.admission.txt = Hospitalisation angal.admission.patientfolder.btn = Dossier Clinique angal.admission.patientfolder.btn.key = Q -angal.admission.patientfolder.dicom.btn = DICOM -angal.admission.patientfolder.dicom.btn.key = D +angal.admission.patientfolder.dicom.btn = Images +angal.admission.patientfolder.dicom.btn.key = É angal.admission.patientfolder.dischart.btn = Graphique de Décharge angal.admission.patientfolder.dischart.btn.key = E angal.admission.patientfolder.drugs.title = Médicaments angal.admission.patientfolder.drugs.txt = Médicaments +angal.admission.patientfolder.examination.txt = EXAMEN angal.admission.patientfolder.exams.title = Examens angal.admission.patientfolder.laboratory.txt = Laboratoires angal.admission.patientfolder.nodatatoshow.msg = Aucune donnée a afficher. @@ -134,7 +139,6 @@ angal.admission.pleaseinsertavalidadmissiondate.msg angal.admission.pleaseinsertavalidcontroln1date.msg = Veuillez insérer une date de contrôle n.1 valide. angal.admission.pleaseinsertavalidcontroln2date.msg = Veuillez insérer une date de contrôle n.2 valide. angal.admission.pleaseinsertavaliddeliverydate.msg = Veuillez insérer une date d'accouchement valide. -angal.admission.pleaseinsertavalidvisitdate.msg = Veuillez insérer une date de visite valide. angal.admission.pleaseinsertavalidweightvalue.msg = Veuillez insérer un valeur de poids valide. angal.admission.pleaseselectatleastfirstdiagnosisout.msg = Veuillez sélectionner au moins le premier diagnostique de -SORTIE-. angal.admission.pleaseselectavalidadmissiontype.msg = Veuillez sélectionner une typologie d'hospitalisation valide. @@ -151,6 +155,7 @@ angal.admission.searchkey.border angal.admission.selectedpatientshavedifferentsex.msg = Les patients sélectionnés ont un diffèrent sexe. angal.admission.sex.border = Sexe angal.admission.sharealertwithnobody.txt = -- Partager l'alerte avec: personne -- +angal.admission.specifieddiseaseoutisnoenabledforipd.fmt.msg = La maladie spécifiée ({0}) n'est pas activée pour le service d'hospitalisation. angal.admission.taxcode.label = NID angal.admission.telephone.label = Téléphone angal.admission.theoperationdatenewerthan.fmt.msg = Date intervention non valide la date de l'intervention doit être avant {0}. @@ -160,7 +165,7 @@ angal.admission.therapy.btn angal.admission.therapy.btn.key = T angal.admission.thereismorethanonependingbillforthispatientcontinue.msg = Il y a plus que une facture en attente pour ce patient, continuer? angal.admission.theselectedadmissionhasnoconcernwithmalnutrition.msg = L'hospitalisation sélectionnée n'a pas de relation avec la malnutrition. -angal.admission.thispatienthasapendingbill.msg = Ce patient a une facture en attente. +angal.admission.theselectedadmissionisnotfound.msg = L'admission sélectionnée est introuvable. angal.admission.treatmenttype.border = Typologies traitement angal.admission.unknown = inconnu angal.admission.visitdate.border = Date de Visites @@ -171,6 +176,7 @@ angal.admission.withthisoperationthepatientwillbedeletedandhisherhistorytransfer angal.admission.youareeditinganoldadmission.msg = Vous modifiez une ancienne hospitalisation. angal.admisssion.discharedpatientfor.fmt.msg = Patient Démissionné: {0} pour {1}. angal.admtype.admissiontypebrowser.title = Liste Typologie Hospitalisation +angal.admtype.admissiontypenotfound.fmt.msg = Le type d'admission « {0} » n'a pas été trouvé. angal.admtype.delete.fmt.msg = Supprimer typologie hospitalisation: "{0}"? angal.admtype.editadmissiontype.title = Modification Typologie Hospitalisation angal.admtype.newadmissiontype.title = Nouvelle Typologie Hospitalisation @@ -186,6 +192,111 @@ angal.agetype.newborn angal.agetype.newborn.txt = Nouveau né angal.agetype.overlappedrangespleasecheckthevalues.msg = Chevauchement des périodes, contrôlez les valeurs. angal.agetype.somerangesarenotdefinedpleasecheckthevalues.msg = Certaines gammes pas définies, veuillez contrôler les valeurs. +angal.anamnesis.alcool.no.txt = Non +angal.anamnesis.alcool.txt = Alcool +angal.anamnesis.alcool.yes.txt = Oui +angal.anamnesis.alvo.normal.txt = Normal +angal.anamnesis.alvo.other.txt = Autre +angal.anamnesis.alvo.txt = Alvo +angal.anamnesis.cancel.txt = Annuler +angal.anamnesis.closed.cardiovascolaris.txt = Cardiovasculaire +angal.anamnesis.closed.diseases.txt = Maladies +angal.anamnesis.closed.drugsaddiction.txt = Toxicomanie +angal.anamnesis.closed.endocrinometabol.txt = Endocrinien / Métabolique +angal.anamnesis.closed.excludenothingtodeclare.tooltip = Exclure « Rien à déclarer ». +angal.anamnesis.closed.gyno.txt = Gynécologie / Obstétrique +angal.anamnesis.closed.hypertension.txt = Hypertension artérielle +angal.anamnesis.closed.infective.txt = Infectieux +angal.anamnesis.closed.neoplastic.txt = Néoplasique +angal.anamnesis.closed.nothingtodeclare.txt = Rien à déclarer +angal.anamnesis.closed.orto.txt = Ortho-rhumatologie +angal.anamnesis.closed.other.txt = Autre +angal.anamnesis.closed.pastproblems.border = Problèmes antérieurs (Clos) +angal.anamnesis.closed.remarks.border = Remarques (Clos) +angal.anamnesis.closed.resetpastproblems.tooltip = Réinitialiser les problèmes antérieurs +angal.anamnesis.closed.respiratory.txt = Respiratoire +angal.anamnesis.closed.tooltip.excludenothingtodeclare.txt = Exclure « Rien à déclarer ». +angal.anamnesis.closed.tooltip.resetpastproblems.txt = Réinitialiser les problèmes antérieurs +angal.anamnesis.diet.normal.txt = Normal +angal.anamnesis.diet.other.txt = Autre +angal.anamnesis.diet.txt = Régime alimentaire +angal.anamnesis.diuresis.normal.txt = Normal +angal.anamnesis.diuresis.other.txt = Autre +angal.anamnesis.diuresis.txt = Diurèse +angal.anamnesis.drugs.no.txt = Non +angal.anamnesis.drugs.txt = Médicaments +angal.anamnesis.drugs.yes.txt = Oui +angal.anamnesis.examination.txt = Examen +angal.anamnesis.extra.allergy.border = Allergies +angal.anamnesis.extra.medicine.border = Médicaments habituels +angal.anamnesis.extra.remarks.border = Remarques (supplémentaires) +angal.anamnesis.extra.surgery.border = Chirurgies +angal.anamnesis.extra.therapy.border = Thérapies +angal.anamnesis.family.cardiovascolaris.txt = Cardiovasculaire +angal.anamnesis.family.diseases.txt = Maladies +angal.anamnesis.family.drugsaddiction.txt = Toxicomanie +angal.anamnesis.family.endocrinometabol.txt = Endocrinien / Métabolique +angal.anamnesis.family.excludenothingtodeclare.tooltip = Exclure « Rien à déclarer ». +angal.anamnesis.family.familyhistory.border = Historique familiale +angal.anamnesis.family.gyno.txt = Gynécologie / Obstétrique +angal.anamnesis.family.hypertension.txt = Hypertension artérielle +angal.anamnesis.family.infective.txt = Infectieux +angal.anamnesis.family.neoplastic.txt = Néoplasique +angal.anamnesis.family.nothingtodeclare.txt = Rien à déclarer +angal.anamnesis.family.orto.txt = Ortho-rhumatologie +angal.anamnesis.family.other.txt = Autre +angal.anamnesis.family.remarks.border = Observations (famille) +angal.anamnesis.family.resetfamilyhistory.tooltip = Réinitialiser l'historique familiale +angal.anamnesis.family.respiratory.txt = Respiratoire +angal.anamnesis.family.tooltip.excludenothingtodeclare.txt = Exclure « Rien à déclarer ». +angal.anamnesis.family.tooltip.resetfamilyhistory.txt = Réinitialiser l'historique familiale +angal.anamnesis.firstname.label = Prénom +angal.anamnesis.hrt.no.txt = Non +angal.anamnesis.hrt.txt = THS +angal.anamnesis.hrt.yes.txt = Oui +angal.anamnesis.insertpatientexamination.tooltip = Insérer l'examen du patient +angal.anamnesis.menopause.no.txt = Non +angal.anamnesis.menopause.txt = Ménopause +angal.anamnesis.menopause.years.txt = Années +angal.anamnesis.menopause.yes.txt = Oui +angal.anamnesis.open.anamnesis.btn = Anamnèse +angal.anamnesis.open.cardiovascolaris.txt = Cardiovasculaire +angal.anamnesis.open.diseases.txt = Maladies +angal.anamnesis.open.drugsaddiction.txt = Toxicomanie +angal.anamnesis.open.endocrinometabol.txt = Endocrinien / Métabolique +angal.anamnesis.open.gyno.txt = Gynécologie / Obstétrique +angal.anamnesis.open.hypertension.txt = Hypertension artérielle +angal.anamnesis.open.infective.txt = Infectieux +angal.anamnesis.open.neoplastic.txt = Néoplasique +angal.anamnesis.open.nothingtodeclare.txt = Rien à déclarer +angal.anamnesis.open.orto.txt = Ortho-rhumatologie +angal.anamnesis.open.other.txt = Autre +angal.anamnesis.open.recentproblems.border = Problèmes récents (Ouvert) +angal.anamnesis.open.remarks.border = Remarques (Ouvertes) +angal.anamnesis.open.respiratory.txt = Respiratoire +angal.anamnesis.open.tooltip.excludenothingtodeclare.txt = Exclure « Rien à déclarer ». +angal.anamnesis.open.tooltip.resetrecentproblems.txt = Réinitialiser les problèmes récents +angal.anamnesis.patid.label = Code : +angal.anamnesis.patient.txt = Patient +angal.anamnesis.period.normal.txt = Normal +angal.anamnesis.period.other.txt = Autre +angal.anamnesis.period.txt = Période +angal.anamnesis.physiologicalhistory.border = Historique physiologique +angal.anamnesis.pregnancies.abort.txt = Avortée +angal.anamnesis.pregnancies.delivery.txt = Délivrée +angal.anamnesis.pregnancies.no.txt = Non +angal.anamnesis.pregnancies.nr.txt = Numéro +angal.anamnesis.pregnancies.txt = Grossesses +angal.anamnesis.pregnancies.yes.txt = Oui +angal.anamnesis.save.txt = Enregistrer +angal.anamnesis.savethepatienthistory.tooltip = Sauvegarder l'historique du patient +angal.anamnesis.secondname.label = Nom de famille : +angal.anamnesis.smoke.no.txt = Non +angal.anamnesis.smoke.txt = Fumer +angal.anamnesis.smoke.yes.txt = Oui +angal.anamnesis.taxcode.txt = Numéro d'identification fiscale : +angal.anamnesis.title.txt = Anamnèse +angal.anamnesis.tooltip.savethepatienthistory.txt = Sauvegarder l'historique du patient angal.billbrowser.balance.col = Bilan angal.billbrowser.bills.title = Factures angal.billbrowser.closed.title = Fermé @@ -196,26 +307,31 @@ angal.billbrowser.editbill angal.billbrowser.editbill.btn = Modifiez Facture angal.billbrowser.editbill.btn.key = F angal.billbrowser.fullreportallbills.txt = Rapport complet (Toutes les factures) +angal.billbrowser.inout.col = ENTRÉE/SORTIE angal.billbrowser.lastpayment.col = Dernier Payement angal.billbrowser.month.txt = Mois angal.billbrowser.newbill.btn = Nouvelle Facture angal.billbrowser.newbill.btn.key = N angal.billbrowser.notpaidcolon.txt = Pas Payé: +angal.billbrowser.paidperiodcolon.txt = Période de paiement : +angal.billbrowser.paidtodaycolon.txt = Payé aujourd'hui : angal.billbrowser.patientID.col = ID.Pat angal.billbrowser.patientbillmanagment.title = Gestion des Factures du Patient angal.billbrowser.patientstatement.txt = Relevé du Patient angal.billbrowser.pending.title = En attente angal.billbrowser.period.txt = Période angal.billbrowser.periodcolon.txt = Période: -angal.billbrowser.pickmonth.txt = Choisir Mois... angal.billbrowser.pleaseselectabill.msg = Veuillez sélectionner une facture angal.billbrowser.pleaseselectareport.msg = Veuillez sélectionner un rapport angal.billbrowser.pleaseselectonlyonebill.msg = Veuillez sélectionner une seule facture angal.billbrowser.receipt.btn = Reçu angal.billbrowser.receipt.btn.key = U +angal.billbrowser.removeapatient.tooltip = Supprimer un patient. angal.billbrowser.report = Rapport angal.billbrowser.report.btn = Rapport angal.billbrowser.report.btn.key = R +angal.billbrowser.selectapatient.tooltip = Sélectionnez un patient. +angal.billbrowser.selectmonth.txt = Sélectionnez un mois angal.billbrowser.shortreportonlybaddebt.txt = Rapport Bref (seulement factures BadDebts) angal.billbrowser.thebilldeleted.msg = La Facture est Supprimée angal.billbrowser.thebillisstillopen.msg = Cette facture est encore ouverte. @@ -227,7 +343,6 @@ angal.billbrowser.todayclosure.txt angal.billbrowser.todaycolon.txt = Aujourd'hui angal.billbrowser.user.txt = Utilisateur angal.billbrowser.youcannoteditaclosedbill.msg = Vous ne pouvez pas modifier une facture fermée (Administrateur peut) -angal.billitempicker.find.txt = Chercher angal.common.address.txt = Adresse angal.common.age.label = Âge: angal.common.age.txt = Âge @@ -235,6 +350,7 @@ angal.common.agefrom.label angal.common.ageto.label = Jusqu'à l'âge: angal.common.all.btn = Toute angal.common.all.txt = Tous +angal.common.alldiseasetypes.txt = Tous types de maladies angal.common.alltypes.txt = Tous les Types angal.common.amount.txt = Montant angal.common.arterialpressureabbr.txt = PA @@ -258,6 +374,7 @@ angal.common.delete.btn angal.common.delete.btn.key = S angal.common.description.txt = Description angal.common.discharge.txt = Décharger +angal.common.documenthasnopages.msg = Le document n'a pas de pages. angal.common.doyouwanttoproceed.msg = Voulez-vous poursuivre? angal.common.edit = Modification angal.common.edit.btn = Modification @@ -275,7 +392,6 @@ angal.common.filter.btn.key angal.common.from.txt = de angal.common.group.txt = Groupe angal.common.height.txt = Hanteur -angal.common.hours = Heures angal.common.id.txt = ID angal.common.info.title = Information angal.common.laboratory.txt = Laboratoire @@ -283,7 +399,6 @@ angal.common.launchreport.btn angal.common.launchreport.btn.key = R angal.common.male.btn = Mâle angal.common.male.txt = Masculin -angal.common.minutes = Minutes angal.common.minutesabbr = Min angal.common.months.txt = Mois angal.common.name.txt = Nom @@ -291,18 +406,22 @@ angal.common.new.btn angal.common.new.btn.key = N angal.common.newpatient.btn = Nouveau Patient angal.common.newpatient.btn.key = N +angal.common.nodatatoshow.msg = Aucune donnée a afficher. angal.common.notapplicable.txt = NPA angal.common.notdefined.txt = N/D angal.common.note.title = Remarque angal.common.note.txt = Remarque angal.common.ok.btn = OK angal.common.ok.btn.key = O +angal.common.opd.txt = DDP angal.common.patient.txt = Patient angal.common.patientID = ID.Pat angal.common.pleaseinsertacode.msg = Veuillez insérer un code. angal.common.pleaseinsertavaliddescription.msg = Veuillez insérer une description valide. +angal.common.pleaseinsertavalidnumber.msg = Veuillez insérer un numéro valide. angal.common.pleaseselectapatient.msg = Veuillez sélectionner un patient. angal.common.pleaseselectarow.msg = Veuillez sélectionner sélectionner une ligne. +angal.common.pleaseselectaward.msg = Veuillez sélectionner un département angal.common.print.btn = Imprimer angal.common.print.btn.key = I angal.common.qty.txt = Qté @@ -353,28 +472,31 @@ angal.common.uom.mmHg angal.common.uom.percentage = % angal.common.update.btn = Mettre à Jour angal.common.update.btn.key = J +angal.common.user.col = Utilisateur +angal.common.userid = Utilisateur angal.common.userid.label = Usager: angal.common.ward.txt = Departement angal.common.weight.txt = Poids angal.common.years.txt = Années angal.dicom.afileinthefolderistoobigpleasesetdicommaxsizeindicomproperties.fmt.msg = Un fichier du répertoire est trop grand. Veuillez modifier 'dicom.max.size' dans dicom.properties ({0}). -angal.dicom.delete.btn = Supprimer DICOM +angal.dicom.delete.btn = Éliminer image angal.dicom.delete.btn.key = S angal.dicom.delete.no = Non angal.dicom.delete.request = Voulez-vous vraiment supprimer le fichier? angal.dicom.delete.title = Confirmer Suppression angal.dicom.delete.yes = Oui +angal.dicom.dicomformatnotsupported.fmt.msg = Le format d'image n'est pas pris en charge : {0} angal.dicom.err = Erreur angal.dicom.image.frames = Images -angal.dicom.image.patient.dicom = DICOM Patient +angal.dicom.image.patient.dicom = Images Patient angal.dicom.image.patient.oh = Patient angal.dicom.image.serie.n = Numéro série angal.dicom.image.studyid = Étude id angal.dicom.image.zoom = Zoom -angal.dicom.load.btn = Charger DICOM +angal.dicom.load.btn = Charger Image angal.dicom.load.btn.key = G angal.dicom.loading = Chargement en cours... -angal.dicom.open.txt = Ouvrir DICOM +angal.dicom.open.txt = Ouvrir Image angal.dicom.thefileisinanunknownformat.fmt.msg = Le fichier est d'un format inconnu: {0}. angal.dicom.thefileisnotindicomformat.fmt.msg = Le fichier n'est pas du format DICOM: {0}. angal.dicom.thefileistoobigpleasesetdicommaxsizeproperty.fmt.msg = Le fichier est trop gros. Veuillez définir 'dicom.max.size' dans dicom.properties ({0}) @@ -385,15 +507,15 @@ angal.dicom.thumbnail.series angal.dicom.thumbnail.sernum = Numéro de Série angal.dicom.thumbnail.study = Étude angal.dicom.unknownsizeformatpleasesetdicommaxsizeproperty.fmt.msg = Taille du fichier inconnue. Veuillez modifier 'dicom.max.size' dans dicom.properties ({0}). -angal.dicommanager.errorwiththedicomimplmentationclass.fmt.msg = Erreur avec la DICOM implmentation class: {0}. +angal.dicommanager.errorwiththedicomimplmentationclass.fmt.msg = Erreur avec la implementation de class: {0}. angal.dicommanager.genericerror.fmt.msg = Erreur générique: {0} -angal.dicomtype.delete.fmt.msg = Supprimer typologie DICOM: "{0}"? -angal.dicomtype.dicomtypebrowser.title = Liste Typologie DICOM -angal.dicomtype.editdicomtype.title = Modification Typologie DICOM -angal.dicomtype.newdicomtype.title = Nouvelle Typologie DICOM +angal.dicomtype.delete.fmt.msg = Supprimer typologie des images: "{0}"? +angal.dicomtype.dicomtypebrowser.title = Liste Typologies des Images +angal.dicomtype.editdicomtype.title = Modifiez la typologie des images +angal.dicomtype.newdicomtype.title = Nouveau Typologie des Images angal.dicomview.frames.title = Images angal.dicomview.zoom.title = Zoom -angal.dicomviewer.title = Visionneuse DICOM +angal.dicomviewer.title = Visionneuse d'images angal.disctype.codem = Code angal.disctype.deleterow.fmt.msg = Supprimer typologie démission: "{0}"? angal.disctype.dischargetypebrowser.title = Liste Typologie Démissions @@ -523,15 +645,23 @@ angal.groupsbrowser.theadmingroupcannotbedeleted.msg angal.groupsbrowser.thegroupalreadyexists.fmt.msg = Le groupe "{0}" existe déjà. angal.groupsbrowser.thisgrouphasusersandcannotbedeleted.msg = Le groupe contient des utilisateurs et ne peux pas être supprimé. angal.groupsbrowser.title = Liste Groupes -angal.help.pdfviewernotfound = PDF Viewer introuvable.\nLe Guide de l'utilisateur se trouve dans le dossier Documents. -angal.help.pdfviewernotfoundoruserguidenotfound = PDF Viewer introuvable ou Guide de l'utilisateur ne figure pas dans le dossier Documents -angal.help.userguidenotfound = Guide de l'utilisateur non trouvé dans le dossier Documents +angal.help.pdfviewernotfound.msg = PDF Viewer introuvable.\nLe Guide de l'utilisateur se trouve dans le dossier Documents. +angal.help.pdfviewernotfoundoruserguidenotfound.msg = La visionneuse PDF est introuvable ou le guide de l'utilisateur est introuvable dans le dossier Documents.\nVoulez-vous consulter la version sur le site web d'Open Hospital ? +angal.help.userguidenotfound.msg = Le guide de l'utilisateur ne se trouve pas dans le dossier Documents.\nSouhaitez-vous consulter une version en ligne ? +angal.hopsital.thehospitalnamecannotbeblank.msg = Le nom de l'hôpital ne peut pas être vide. angal.hospital = Open Hospital angal.hospital.currencycod = Code Devise angal.hospital.emailaddress = Adresse e-mail angal.hospital.faxnumber = No. Fax angal.hospital.hospitalinformation.title = Renseignement Hôpital angal.hospital.savethechanges.msg = Enregistrer modification +angal.hospital.thestartofvisitinghoursislaterthantheendhour.msg = Le début des heures de visite est postérieur à l'heure de fin. +angal.hospital.thevisitdurationcannotbeblank.msg = La durée de la visite ne peut pas être vide. +angal.hospital.thevisitdurationmustbepositiveandlessthanthelengthofthevisitinghours.msg = La durée de la visite doit être positive et inférieure à la durée des heures de visite. +angal.hospital.thevisitinghourvaluesmustbeintherange0to24.msg = Les heures de visite doivent être comprises entre 0 et 24. +angal.hospital.visitduration.txt = Durée de la visite +angal.hospital.visitendhour.txt = Heure de fin de visite +angal.hospital.visitstarthour.txt = Heure de début de la visite angal.lab.allnegative.txt = Tout négatif angal.lab.blood.txt = Sang angal.lab.cfs.txt = CFS @@ -593,10 +723,15 @@ angal.labnew.title angal.labnew.tooltip.associateapatientwiththisexam = Associez un Patient avec cet examen angal.labnew.tooltip.changethepatientassociatedwiththisexams = Changer le Patient associé à cet examen angal.labnew.tooltip.removepatientassociationwiththisexam = Supprimez le Patient associé avec cet examen +angal.login.accounthasnotbeenusedindayscontacttheadministrator.fmt.msg = Le compte n'a pas été utilisé depuis {0} jours.\nContactez l'administrateur. +angal.login.accountislocked.msg = Le compte est bloqué. +angal.login.accountisnowlockedforminutes.fmt.msg = Le compte est maintenant bloqué pour {0} minutes. +angal.login.accountisstilllockedformoreminutes.fmt.msg = Le compte est toujours bloqué pendant {0} minutes supplémentaires. angal.login.password.label = Mot de passe: angal.login.passwordisincorrectpleaseretry.msg = Le mot de passe est incorrect, réprouvez. angal.login.title = Accès -angal.mainmenu.fmt.title = Usager: {0} +angal.log.foldererror.fmt.msg = Un problème s'est produit lors de l'ouverture du dossier de logs : {0} +angal.mainmenu.username.fmt = Usager: {0} angal.malnutrition.controldatemustbeaftervisitdate.msg = La date de contrôle doit être successive à la date de consultation. angal.malnutrition.dateconf.col = Date Approbation angal.malnutrition.dateofthenextcontrol = Date du prochain contrôle @@ -612,11 +747,14 @@ angal.malnutrition.nodate.msg angal.malnutrition.nonameselected = Aucun nom sélectionné angal.malnutrition.pleaseinsertavalidcontroldate.msg = Veuillez insérer une date de contrôle valide. angal.malnutrition.pleaseinsertavalidvisitdate.msg = Veuillez insérer une date de visite valide. +angal.medicals.active.txt = Actif +angal.medicals.activeonly.txt = Actif uniquement angal.medicals.averagemonthlyconsumption.btn = CMM angal.medicals.averagemonthlyconsumption.btn.key = CM -angal.medicals.criticallevel = Niveau critique +angal.medicals.criticallevel.txt = Niveau critique angal.medicals.critlevel.col = Niveau critique angal.medicals.deletemedical.fmt.msg = Supprimer produit médical: {0}? +angal.medicals.disabledonly.txt = Désactivé uniquement angal.medicals.editmedical.title = Modifier Produit Médical angal.medicals.expiring.btn = Péremption angal.medicals.expiring.btn.key = T @@ -635,7 +773,7 @@ angal.medicals.order.btn.key angal.medicals.othermonth = Autre mois... angal.medicals.outofstock.col = Rupture de stock! angal.medicals.pcsperpck.col = PcsXPqt -angal.medicals.pcsperpckExt = Pieces par Paquet +angal.medicals.pcsperpck.txt = Pieces par Paquet angal.medicals.pharmaceuticalbrowser.title = Liste Medicaments angal.medicals.pleaseselectareport.msg = Veuillez sélectionner un rapport angal.medicals.pleaseselectperiod.msg = Veuillez sélectionner une période @@ -651,16 +789,23 @@ angal.medicals.thismonth angal.medicals.today = aujourd'hui angal.medicals.type = Typologie angal.medicals.withlot = Avec lots +angal.medicalstock.allcharges.txt = Tous les frais +angal.medicalstock.alldischarges.txt = Toutes les sorties +angal.medicalstock.category.col = Catégorie angal.medicalstock.charge.btn = Charge angal.medicalstock.charge.btn.key = C angal.medicalstock.chooseamedical.msg = Choisir un Produit Médical. +angal.medicalstock.choosealot.msg = Choisir un lot angal.medicalstock.chooseavalidduedate.msg = Choisir une date d'échéance valide. angal.medicalstock.chooseavalidmovementdate.msg = Choisir une date mouvement valide. angal.medicalstock.chooseavalidpreparationdate = Choisir une date préparation valide. angal.medicalstock.clickdrugs = Double clic pour les détails du lot +angal.medicalstock.codeordescription.txt = Code ou description angal.medicalstock.cost.col = Cout +angal.medicalstock.deletemovementsuccess.msg = Dernière action supprimée avec succès. angal.medicalstock.discharge.btn = Décharger -angal.medicalstock.discharge.btn.key = É +angal.medicalstock.discharge.btn.key = E +angal.medicalstock.notpossibletodeletethismovementthemedicalhasbeenusedafterbeenreceivedinward.fmt.msg = Impossible de supprimer cette action : le service médical {0} a déjà été utilisé après avoir été reçu dans le service {1}. angal.medicalstock.duedate = Date échéance angal.medicalstock.duedate.col = Date échéance angal.medicalstock.duedatefromcannotbelaterthanduedateto = La date De ne peut pas être successive á la date d'échéance Á @@ -678,7 +823,7 @@ angal.medicalstock.lotpreparationdate angal.medicalstock.medtype.col = Type Med angal.medicalstock.movement = Mouvement angal.medicalstock.movementdatefromcannotbelaterthanmovementdateto = La date mouvement De ne peut être successive à la date mouvement À -angal.medicalstock.movementquantityisgreaterthanthequantityof.msg = La quantité en mouvement est plus grande que la quantité du lot sélectionné: divisez le mouvement. +angal.medicalstock.movementquantityisgreaterthanthequantityof.fmt.msg = Movement quantity ({0}) is greater than the quantity of the lot selected ({1}); split the movement or adjust Units/Packets. angal.medicalstock.multiplecharging.adateinthefutureisnotallowed.msg = Date future non permise. angal.medicalstock.multiplecharging.chargetype = Typologie de Charge angal.medicalstock.multiplecharging.chooseamedical = Choisir un Produit Médical @@ -710,7 +855,7 @@ angal.medicalstock.multiplecharging.units angal.medicalstock.multiplecharging.useanexistinglot = Utiliser un lot existant? angal.medicalstock.multiplecharging.zerocostsarenotallowed.msg = Zéro coûts non permis. angal.medicalstock.multipledischarging.alert = ALERTE: -angal.medicalstock.multipledischarging.alreadyinthisform = Already in this form! +angal.medicalstock.multipledischarging.alreadyinthisform = Déjà dans ce formulaire angal.medicalstock.multipledischarging.chooseamedical = Choisir un Produit Médical angal.medicalstock.multipledischarging.destination = Destination angal.medicalstock.multipledischarging.dischargetype = Typologie Démissions @@ -719,7 +864,9 @@ angal.medicalstock.multipledischarging.isabouttoend angal.medicalstock.multipledischarging.lotinformations = Information Lot angal.medicalstock.multipledischarging.lotnumberabb = Lot No. angal.medicalstock.multipledischarging.lyinginstock = Dans le magasin: +angal.medicalstock.multipledischarging.movementexceedstheavailablequantityformedical.fmt.msg = Movement exceeds the available quantity ({0}) for medical {1}. angal.medicalstock.multipledischarging.noelementtosave = Pas d'éléments à enregistrer +angal.medicalstock.multipledischarging.nolotswithavailablequantityfoundformedicalpleasereport.fmt.msg = No lots with available quantity found for medical {0}; please report to system administrator. angal.medicalstock.multipledischarging.outofstock = Pas de stock! angal.medicalstock.multipledischarging.packets = Paquets angal.medicalstock.multipledischarging.pleaseinsertavalidvalue = Insérez une valeur valide @@ -736,18 +883,24 @@ angal.medicalstock.multipledischarging.youaregoingundercriticalevel angal.medicalstock.nodate = Aucune date angal.medicalstock.nodescription.txt = aucune description angal.medicalstock.nolot.txt = Aucun Lot +angal.medicalstock.onlythelastmovementcanbedeleted.msg = Seule la dernière action peut être supprimée. angal.medicalstock.origin.col = Origine angal.medicalstock.pharmaceutical = Médicament angal.medicalstock.pharmaceutical.col = Médicament angal.medicalstock.pleasechooseatype.msg = Choisir une typologie. -angal.medicalstock.pleaseselectalot = Veuillez sélectionner un lot +angal.medicalstock.pleaseselectamovement.msg = Veuillez sélectionner une action. +angal.medicalstock.pleaseselectonlyonemovement.msg = Veuillez sélectionner qu'une seule action. +angal.medicalstock.pleaseselectoucomemovement.msg = Please select an outcome movement. angal.medicalstock.preparationdatefromcannotbelaterpreparationdateto = La date Préparation Da ne peut pas être successive á la date Préparation á angal.medicalstock.prepdate = Date préparation angal.medicalstock.prepdate.col = Date Prep angal.medicalstock.refno.col = Ref. No. +angal.medicalstock.reset.btn = Réinitialiser +angal.medicalstock.reset.btn.key = É angal.medicalstock.selectionpanel = Sélectionner Panneau angal.medicalstock.stockmovement.title = Mouvement Magasin angal.medicalstock.stockmovementbrowser.title = Liste Mouvements Magasin +angal.medicalstock.doyoureallywanttodeletethismovement.msg = Voulez vous vraiment supprimer ce mouvement? angal.medicalstock.thelotidistoolongmax50chars.msg = ID du lot trop long (max 50 caractères). angal.medicalstock.thepreparationdatecannotbyaftertheduedate.msg = Le date de préparation ne peut être successive à la date d'échéance. angal.medicalstock.thequantitymustnotbezero.msg = La quantité ne doit pas être 0. @@ -793,6 +946,7 @@ angal.medicalstockward.rectify.medical angal.medicalstockward.rectify.pieces = pièces angal.medicalstockward.rectify.pleaseinsertavalidvalue = Insérez une valeur valide angal.medicalstockward.rectify.pleaseselectadrug = Veuillez sélectionner un médicament +angal.medicalstockward.rectify.pleaseselectalot = Veuillez sélectionner un lot angal.medicalstockward.rectify.pleasespecifythereason = Veuillez préciser la raison angal.medicalstockward.rectify.preparationdate = Date préparation angal.medicalstockward.rectify.reason = Raison @@ -815,9 +969,6 @@ angal.medicalstockwardedit.internaluse angal.medicalstockwardedit.medical.btn = Produit Médical angal.medicalstockwardedit.medical.btn.key = T angal.medicalstockwardedit.patient = Patient -angal.medicalstockwardedit.pickpatient = Trouver Patient -angal.medicalstockwardedit.pickpatient.btn = Trouver Patient -angal.medicalstockwardedit.pickpatient.btn.key = P angal.medicalstockwardedit.pieces = pièces angal.medicalstockwardedit.pleaseinsertadescriptionfortheinternaluse.msg = Veuillez insérer une description pour usage interne. angal.medicalstockwardedit.pleaseselectadrug.msg = Veuillez sélectionner un médicament. @@ -827,9 +978,16 @@ angal.medicalstockwardedit.removeitem.btn angal.medicalstockwardedit.removeitem.btn.key = É angal.medicalstockwardedit.selectadrug = Sélectionner un médicament angal.medicalstockwardedit.selectapatient = Sélectionner un patient +angal.medicalstockwardedit.selectpatient = Sélectionnez un Patient +angal.medicalstockwardedit.selectpatient.btn = Sélectionnez un Patient +angal.medicalstockwardedit.selectpatient.btn.key = T angal.medicalstockwardedit.title = Nouveau / Modification angal.medicalstockwardedit.tooltip.associateapatientwiththismovement = Associez un Patient avec ce mouvement angal.medicalstockwardedit.tooltip.removepatientassociationwiththismovement = supprimez l'association du Patient avec ce mouvement +angal.medstockmovtype.allowedcategoriesare.fmt.msg = Les catégories autorisées sont les suivantes : {0} +angal.medstockmovtype.category.txt = Catégorie +angal.medstockmovtype.category.operational.txt = Opérationnel +angal.medstockmovtype.category.nonoperational.txt = Non opérationnel angal.medstockmovtype.deletemovementtype.fmt.msg = Supprimer typologie mouvement: "{0}"? angal.medstockmovtype.editmedicalstockmovementtype.title = Modification Typologie Mouvement Magasin Produits Médicaux angal.medstockmovtype.medicalstockmovementtypebrowser.title = Liste Typologie Mouvements Magasin Produits Médicaux @@ -856,6 +1014,7 @@ angal.menu.btn.agetype angal.menu.btn.billsmanager = Gestion des factures angal.menu.btn.btnadmbill = Facture angal.menu.btn.btnbillreceipt = Reçue +angal.menu.btn.btnmedicalswarddelete = Supprimer angal.menu.btn.btnmedicalswardexcel = Excel angal.menu.btn.btnmedicalswardrectify = Rectifier angal.menu.btn.btnmedicalswardreport = Rapport @@ -864,12 +1023,13 @@ angal.menu.btn.btnpharmstockdischarge angal.menu.btn.chat = Communication angal.menu.btn.deliverytype = Typologie accouchement angal.menu.btn.delresulttype = Typologie résultat accouchement -angal.menu.btn.dicom = DICOM -angal.menu.btn.dicomtype = Typologie DICOM +angal.menu.btn.dicom = Images Patient +angal.menu.btn.dicomtype = Typologie des images angal.menu.btn.disctype = Typologie Démissions angal.menu.btn.disease = Maladies angal.menu.btn.diseaselist = Liste Maladies angal.menu.btn.diseasetype = Typologie Maladies +angal.menu.btn.doc = Documentation angal.menu.btn.examlist1 = Liste Examens angal.menu.btn.exams = Examens angal.menu.btn.examtype = Typologie Examen @@ -879,6 +1039,7 @@ angal.menu.btn.help angal.menu.btn.hospital = Hôpital angal.menu.btn.labbrowsing = Parcourir Laboratoire angal.menu.btn.laboratory = Laboratoire +angal.menu.btn.logfile = Journaux de bord angal.menu.btn.medicals = Médicaments angal.menu.btn.medicalstock = Magasin des Médicaments angal.menu.btn.medicalstype = Typologie Produit Médicaux @@ -888,6 +1049,7 @@ angal.menu.btn.newbill angal.menu.btn.opd = DDP angal.menu.btn.opdchart = Dossier DDP angal.menu.btn.operation = Interventions +angal.menu.btn.operationlist = Liste des opérations angal.menu.btn.operationtype = Typologie Intervention angal.menu.btn.otherprices = Autres Prix angal.menu.btn.patientvaccine = Vaccins du Patient @@ -899,6 +1061,7 @@ angal.menu.btn.printing angal.menu.btn.smsmanager = Gestionnaire de SMS angal.menu.btn.statistics = Statistiques angal.menu.btn.supplier = Fournisseur +angal.menu.btn.telemetry = Télémétrie angal.menu.btn.types = Typologies angal.menu.btn.users = Utilisateurs & Groupes angal.menu.btn.usersusers = Usagers @@ -922,6 +1085,7 @@ angal.menu.disctype angal.menu.disease = Maladies angal.menu.diseaselist = Liste Maladies angal.menu.diseasetype = Typologie Maladies +angal.menu.doc = Documentation angal.menu.examlist1 = Liste Examens angal.menu.exams = Examens angal.menu.examtype = Typologie Examen @@ -931,6 +1095,9 @@ angal.menu.help angal.menu.hospital = Hôpital angal.menu.labbrowsing = Liste Laboratoires angal.menu.laboratory = Laboratoires +angal.menu.logfile = Journaux de bord +angal.menu.logout.btn = Se déconnecter +angal.menu.logout.btn.key = S angal.menu.medicals = Médicaments angal.menu.medicalstock = Stock Médicaments angal.menu.medicalstype = Produits Médicaux @@ -940,6 +1107,7 @@ angal.menu.newbill angal.menu.opd = DDP angal.menu.opdchart = DDP Rapport angal.menu.operation = Interventions +angal.menu.operationlist = Liste des opérations angal.menu.operationtype = Typologie Intervention angal.menu.otherprices = Autres Prix angal.menu.patientvaccine = Vaccins du Patient @@ -951,6 +1119,7 @@ angal.menu.printing angal.menu.smsmanager = Gestionnaire des SMS angal.menu.statistics = Statistiques angal.menu.supplier = Fournisseur +angal.menu.telemetry = Télémétrie angal.menu.types = Typologies angal.menu.users = Usagers angal.menu.usersusers = Usagers @@ -1001,8 +1170,9 @@ angal.newbill.item.title angal.newbill.list.txt = Liste angal.newbill.medical.btn = Produit Médical angal.newbill.medical.title = Produit Médical +angal.newbill.multipleopenedbillsnotallowedpleasesolve.msg = L'ouverture de plusieurs factures n'est pas autorisée, veuillez résoudre le problème. angal.newbill.newdescription.txt = Nouvelle description -angal.newbill.nopricelistselectedwilbeused.fmt.msg = Pas de liste des prix sélectionnée. {0} sera utilisé. +angal.newbill.nopricelistselectedwillbeused.fmt.msg = Pas de liste des prix sélectionnée. {0} sera utilisé. angal.newbill.operation.btn = Opération angal.newbill.operation.btn.key = O angal.newbill.operation.title = Opération @@ -1030,22 +1200,33 @@ angal.newbill.selectamedical.txt angal.newbill.selectanexam.txt = Sélectionner un examen: angal.newbill.selectanoperation.txt = Sélectionner une Opération: angal.newbill.selectapricelist.title = Veuillez sélectionner une Liste des Prix +angal.newbill.somepriceshavebeenchangeddoyouwanttoupdatetheitemsprices.fmt.msg = Certains prix ont été modifiés : {0}\n\nVoulez-vous mettre à jour les prix des articles ? +angal.newbill.somepricesnotfound.fmt.msg = Certains prix n'ont pas été trouvés : {0} +angal.newbill.somepricesnotfoundandsomeotherchangeddoyouwanttoupdatetheitemsprices.fmt.msg = Certains prix n'ont pas été trouvés et d'autres ont été modifiés :\nIntrouvable : {0}\nModifié : {1}\n\nVoulez-vous mettre à jour les prix des articles existants ? angal.newbill.thedateisbeforethelastpayment.msg = La date est antérieure au dernier payement +angal.newbill.thepatienthaschangedwardsarrow.fmt.msg = Le patient a changé de service : {0} -> {1} angal.newbill.thepricelistassociatedwiththisbillnolongerexists.msg = La liste de prix associés avec cette facture n'existe plus +angal.newbill.thepricelistcurrencycodehaschangedarrow.fmt.msg = La devise du tarif a changé : {0} -> {1} +angal.newbill.thisbillwaslinkedtoapreviousadmissiondoyouwanttolinkittothecurrentadmissioninstead.msg = Cette facture était liée à une admission précédente. Voulez-vous la rattacher à l'admission actuelle ? angal.newbill.thispatienthasapendingbill.msg = Ce patient a une facture en attente. angal.newbill.thispatienthasapendingbilldoyouwanttocreateanother.msg = Ce Patient a une facture en attente. Voulez-vous en créer une autre? angal.newbill.thispatienthasmorethanonependingbilldoyouwanttocreateanother.msg = Ce patient a plus d'une facture en attente. Voulez-vous en créer une autre? angal.newbill.thispatienthasmorethanonependingbilldoyouwanttoopenthelastpendingbill.msg = Ce patient a plus d'une facture en attente. Voulez-vous ouvrir la dernière facture ouverte? +angal.newbill.thispatientisadmittednowdoyouwanttolinkthisbilltothecurrentadmission.msg = Ce patient est actuellement admis. Voulez-vous lier cette facture à l'admission en cours ? +angal.newbill.thispatientisnolongeradmitteddoyouwanttounlinkthisbillfromthepreviousadmission.msg = Ce patient n'est plus admis. Voulez-vous dissocier cette facture de l'admission précédente ? angal.newbill.topay.txt = À PAYER angal.newbill.youcannotdeletealreadysaveditems.msg = Vous ne pouvez pas supprimer les éléments déjà enregistrés angal.newbill.youcannotdeletepastpayments.msg = Vous ne pouvez pas supprimer des payements du passé angal.opd.agefrommustbelowerthanageto.msg = 'Depuis l'âge' doit être inférieur à 'Jusqu'à l'âge'. angal.opd.alldiseases.txt = Toutes les Maladies -angal.opd.attendancedate.txt = Date Admission +angal.opd.allwards.txt = Tous les services +angal.opd.anamnesis = Anamnèse +angal.opd.anamnesis.btn.key = M +angal.opd.attendancedate.txt = date assistence angal.opd.cannotsetadateinthepastfornextvisit.msg = Vous ne pouvez pas entrer une date du passé pour la prochaine visite. angal.opd.datefrommustbebefordateto.msg = La "Date De" doit être avant la "Date à". -angal.opd.deletefollowingopd.fmt.msg = Supprimer les DDP suivants?\n\nDate d'enregistrement={0}\nMaladie={1}\nÂge={2}, Sexe={3}\nDate Consultation={4} -angal.opd.deletefollowingopdextended.fmt.msg = Supprimer l'opd suivant ?\n\nPatient={0}\nDate d'enregistrement={1}\nMaladie={2}\nÂge={3}, Sexe={4}\nDate de visite={5} +angal.opd.deletefollowingopd.fmt.msg = Supprimer les DDP suivants?\n\nDate d'enregistrement={0}\nMaladie={1}\nÂge={2}\nSexe={3}\nDate Consultation={4} +angal.opd.deletefollowingopdextended.fmt.msg = Supprimer les DDP suivants?\n\nPatient: {0}\nDate d'enregistrement: {1}\nMaladie: {2}\nÂge: {3}\nSexe: {4}\nDate Consultation: {5} angal.opd.diagnosis.txt = Diagnostic angal.opd.diagnosisnfulllist2.txt = Diagnostic n.2 (liste compléte) angal.opd.diagnosisnfulllist3.txt = Diagnostic n.3 (liste compléte) @@ -1065,8 +1246,9 @@ angal.opd.fullname.col angal.opd.insertavalidage.msg = Insérez une âge valide. angal.opd.lastopdnote.txt = Remarques angal.opd.lastopdvisitm.txt = DDP DÈRNIERE VISITE +angal.opd.mypatient.btn = Mes patients angal.opd.new.btn = Nouveau -angal.opd.newattendance.txt = Nouvelle Admission +angal.opd.newattendance.txt = Nouvelle assistence angal.opd.newopdregistration.title = Nouveau DDP Registration angal.opd.nextofkin.txt = Plus proche Parent angal.opd.nextvisitdate.txt = Date du prochain rendez-vous @@ -1080,11 +1262,15 @@ angal.opd.opdnumberalreadyexist.msg angal.opd.opdnumbermustbeanumber.msg = DDP No. doit être un numéro. angal.opd.opdoutpatientdepartment.title = DDP Département Démission patient angal.opd.operation = Intervention +angal.opd.otherfilters.border = Autres filtres angal.opd.patientcode.fmt.msg = Patient (code: {0}) angal.opd.patientid.col = ID.Pat angal.opd.patientstatus.col = Statu -angal.opd.pleaseinsertattendancedate.msg = Veuillez insérer une date d'admission. -angal.opd.pleaseinsertavalidattendancedate.msg = Veuillez insérer une date d'admission valide. +angal.opd.patienttype.label = Type de patient : +angal.opd.pleasechooseavalidtimeforthenextvisit.msg = Veuillez choisir une heure valide pour la prochaine visite. +angal.opd.pleasechooseawardforthenextvisit.msg = Veuillez choisir un service pour la prochaine visite. +angal.opd.pleaseinsertattendancedate.msg = Insérez une date assistence +angal.opd.pleaseinsertavalidattendancedate.msg = Insérez une date assistence valide angal.opd.pleaseinsertthepatientsage.msg = Veuillez insérer insérer l'âge du patient. angal.opd.pleaseselectadisease.msg = Veuillez sélectionner une maladie. angal.opd.pleaseselectpatientssex.msg = Veuillez sélectionner le sexe du patient. @@ -1092,9 +1278,17 @@ angal.opd.reattendance.btn angal.opd.reattendance.txt = Re-Assistence angal.opd.referral.txt = Référé angal.opd.referralto.txt = Référé à +angal.opd.reset.btn = Réinitialiser +angal.opd.reset.btn.key = E +angal.opd.searchbycodespressenter.border = Recherche par code (appuyer sur ENTRÉE) +angal.opd.searchdisease.label = Recherche de maladie : angal.opd.secondname.txt = Nom angal.opd.selectapatient.txt = Sélectionner un Patient +angal.opd.selectaward.txt = Sélectionner un Département +angal.opd.specifieddiseaseisnoenabledforopdservice.fmt.msg = La maladie spécifiée ({0}) n'est pas activée pour le service ambulatoire. +angal.opd.specifiedwardisnotenabledforopdservice.msg = Le service spécifié n'est pas activé pour le service ambulatoire. angal.opd.specifyingduplicatediseasesisnotallowed.msg = Spécification de maladies dupliquées non autorisées. +angal.opd.ward.txt = Re-accouchement angal.operation.deleteoperation.fmt.msg = Supprimer intervention: {0}? angal.operation.editoperation.title = Modification Intervention angal.operation.major = Majeur @@ -1111,6 +1305,7 @@ angal.operation.selecttype angal.operation.type = Typologie angal.operationrow.clear.btn = Effacer angal.operationrow.clear.btn.key = G +angal.operationrow.not.found.msg = La ligne d'opération n'a pas été trouvée. angal.operationrowedit.operation = Opération: angal.operationrowedit.remark = Remarques: angal.operationrowedit.saveerror = Erreur lors de l'enregistrement @@ -1136,6 +1331,7 @@ angal.opetype.newoperationtype.title angal.opetype.operationtypebrowser.title = Liste Type Interventions angal.patient.agestar = Âge * angal.patient.alive.btn = en vie +angal.patient.anamnesis = Anamnèse angal.patient.birthdate = Date de naissance angal.patient.bloodtype = Groupe Sanguin angal.patient.bloodtype.unknown = Inconnu @@ -1144,6 +1340,8 @@ angal.patient.dead.btn angal.patient.deletepatient.fmt.msg = Supprimer patient: {0}? angal.patient.doyouwanttodeletethepatientsphoto.msg = Voulez-vous supprimer la photo du patient? angal.patient.editpatient.title = Modification Patient +angal.patient.examination.nonzero.msg = La taille ou le poids ne doit pas être nul. +angal.patient.examination.minmaxvalues.msg = Certaines valeurs introduites sont égales à leur valeur minimale ou maximale. Voulez-vous vraiment les confirmer ? angal.patient.fathername = Nom du Père angal.patient.firstname = Prénom * angal.patient.hasinsurance = Est Assuré @@ -1170,9 +1368,15 @@ angal.patient.newpatient.title angal.patient.nextkin = Plus proche Parent angal.patient.no.btn = Non angal.patient.note = Remarques +angal.patient.consensus.consensus.txt = A consulté et approuvé le formulaire de consentement au traitement +angal.patient.consensus.consensus.mandatory.msg = La mention « a consulté et approuvé le formulaire de consentement au traitement » est obligatoire. +angal.patient.consensus.service.txt = Consent à l'utilisation des données par d'autres services. +angal.patient.consensus.border = Le patient angal.patient.parenttogether = Parents vivant ensemble angal.patient.patientbrowser.title = Liste Patients angal.patient.patientphoto = Photo du Patient +angal.patient.patientphoto.error.filenotfound.msg = Le fichier photo du patient n'a pas été trouvé. +angal.patient.patientphoto.error.title = Erreur de photo du patient angal.patient.patientselection.title = Sélection Patient angal.patient.photodeleted = Supprimé angal.patient.photonotdeleted = Photo non supprimée @@ -1250,7 +1454,7 @@ angal.priceslist.adescription angal.priceslist.changelist = Changez Liste angal.priceslist.copy.btn = Copie angal.priceslist.copy.btn.key = P -angal.priceslist.copyof = Copie de +angal.priceslist.copyof.fmt = Copie de {0} angal.priceslist.currency.col = Devise angal.priceslist.currencystar = Devise* angal.priceslist.deletethislistandallitsprices.fmt.msg = Supprimer cette liste et tous ses prix: {0}? @@ -1315,17 +1519,18 @@ angal.sms.deletetheselectedsms.msg angal.sms.doyouwanttosplitinmoremessages = Voulez-vous le diviser en plusieurs messages angal.sms.newsms.title = Nouveau SMS angal.sms.number = Numéro +angal.sms.pleaseenteravaliddateandtime.msg = Veuillez saisir une date et une heure valides. angal.sms.pleaseinsertatextmessage.msg = Veuillez insérer un texte de message. angal.sms.pleaseinsertavalidtelephonenumber.msg = Veuillez insérer un numéro de téléphone valide. angal.sms.scheduleddate = Date prévue angal.sms.scheduleddate.col = Heure prévue -angal.sms.scheduledtime = Heure prévue angal.sms.sent.col = Envoyé angal.sms.smsmanager.title = Gestionnaire de SMS angal.sms.themessageislongerthencharacters.fmt.msg = Le message est plus long que {0} caractères. angal.sql.anunexpectederroroccurredpleasecheckthelogs.msg = Une erreur inattendue s'est produite, veuillez vérifier les journaux. angal.sql.constraintviolation.msg = Violation de contrainte. angal.sql.databaseserverstoppedornetworkfailure.msg = Serveur du data-base arrêté ou problème de réseau. +angal.sql.onefieldisnotcorrectlyset.msg = Un champ n'est pas correctement défini. angal.sql.operationnotpermittedprotectedelement = Opération interdite. Élément Protégé. angal.sql.pleaseconsiderenablingtheenhancedsearchsettingseeadminmanualformoreinfo.msg = Veuillez envisager d'activer le paramètre ENHANCEDSEARCH.\n\nVoir le manuel d'administration pour plus d'informations. angal.sql.problemsoccurredwithserverconnection.msg = Il y a des problèmes avec la connexion au serveur. @@ -1334,6 +1539,7 @@ angal.sql.thedatahasbeenupdatedbysomeoneelse.msg angal.sql.theselecteditemisstillusedsomewhere.msg = l'élément sélectionné est encore utilisé quelque part. angal.stat.allIncomes = OH011A - Chiffre d'affaires, Revenus & Créances (Tous) angal.stat.allIncomesmonth = OH011C - Revenues, Entrées & Recevables (Mois) +angal.stat.allIncomesmonthward = OH011D - Recettes, revenus et créances (service / mois) angal.stat.allIncomespending = OH011B- Chiffre d'affaires, Revenus & Créances (en attente) angal.stat.april = Avril angal.stat.august = Août @@ -1345,7 +1551,6 @@ angal.stat.diseasereport.title angal.stat.examslist = Liste Examens angal.stat.examsreport.title = Rapport Examens angal.stat.february = Février -angal.stat.fromdate = Du Jour angal.stat.incomesallbypricecodes = OH004 - Tous les reçus par code angal.stat.inpatientdiagnosisin = HMIS 108 - Patients entrant (diagnostic entrée) angal.stat.inpatientdiagnosisout = HMIS 108 - Patients hospitalisé (diagnostic sortie) @@ -1367,6 +1572,8 @@ angal.stat.october angal.stat.opdattendance = HMIS 105 - Présences DDP angal.stat.opdbydiagnosis = HMIS 105 - DDP pour diagnostic angal.stat.opdreferrals = HMIS 105 - DDP références +angal.stat.operationlist = Liste des opérations +angal.stat.operationreport.title = Rapport d'opération angal.stat.outpatientcount = OH005 - Compte des Patient Ambulatoire angal.stat.outpatientdiagnoses = OH006 - Nombre diagnostiques ambulatoire angal.stat.outpatientreport = OH010 - Rapport Ambulatoire @@ -1381,12 +1588,13 @@ angal.stat.report angal.stat.reporterror.msg = Une erreur s'est produite pendant la génération du rapport. angal.stat.reportlauncher.title = Afficher Rapport angal.stat.rundiseaseslistbytype.btn = Rapport Liste Maladies par Type -angal.stat.rundiseaseslistbytype.btn.key = M +angal.stat.rundiseaseslistbytype.btn.key = É angal.stat.runexamslistreportbytype.btn = Rapport Liste Examens par Type -angal.stat.runexamslistreportbytype.btn.key = E +angal.stat.runexamslistreportbytype.btn.key = X +angal.stat.runoperationslistbytype.btn = Rapport de la liste des opérations par type +angal.stat.runoperationslistbytype.btn.key = D angal.stat.september = Septembre angal.stat.sharereportwithnobody.txt = -- Partager le rapport avec: personne -- -angal.stat.todate = À la date angal.stat.weeklyepidemsurveil = HMIS 33b - Surveillance Hebdomadaire épidémiologique angal.stat.weeklyepidemsurveilover5 = HMIS 33b - Moniteur Hebdomadaire épidémiologique >=5 ans angal.stat.weeklyepidemsurveilunder5 = HMIS 33b - Surveillance Hebdomadaire épidémiologique <5 ans @@ -1404,6 +1612,18 @@ angal.supplier.requiredfields angal.supplier.suppliersbrowser.title = Liste Fournisseurs angal.supplier.taxcode = NID angal.supplier.taxcode.col = NID +angal.telemetry.about.txt = Collecter des données d'utilisation anonymes et les envoyer à open-hospital.org +angal.telemetry.body = Veuillez sélectionner le type d'informations que vous souhaitez partager (vous pouvez désactiver le partage à tout moment) +angal.telemetry.button.label.askmelater = Me demander plus tard +angal.telemetry.button.label.disableandneveraskagain = Désactiver et ne plus jamais demander +angal.telemetry.button.label.disable = Désactiver +angal.telemetry.button.label.confirmandsend = Confirmer et envoyer +angal.telemetry.checkbox.label = J'accepte que ces informations soient envoyées automatiquement tous les jours +angal.telemetry.confirmation.dialog.message = Êtes-vous sûr de vouloir envoyer ces informations ? +angal.telemetry.info = Open Hospital est le premier d'une série de logiciels développés par Informatici Senza Frontiere pour soutenir la gestion de l'information et les activités des hôpitaux et des centres de santé de la manière la plus simple possible, en fournissant des outils pour les opérations administratives de l'hôpital (comme l'enregistrement des patients, la gestion des analyses de laboratoire et des stocks de produits pharmaceutiques) et pour produire des statistiques et des rapports détaillés. +angal.telemetry.title = Aidez-nous à améliorer Open Hospital +angal.telemetry.enabled = Activer +angal.telemetry.fmt.confirm.pleaseselecttoproceed = Veuillez sélectionner « {0} » pour continuer. angal.therapy.actions = Actions angal.therapy.addtherapy.btn = Ajoutez une Thérapie angal.therapy.addtherapy.btn.key = A @@ -1475,11 +1695,17 @@ angal.userbrowser.deleteuser.fmt.msg angal.userbrowser.description.label = Description: angal.userbrowser.edituser.title = Modification Usager angal.userbrowser.group.label = Groupe: +angal.userbrowser.locked.col = Verrouillé +angal.userbrowser.locked.label = Verrouillé : angal.userbrowser.name.label = Nom: angal.userbrowser.password.label = Mot de passe: +angal.userbrowser.passwordistoolongmaximumof72characters.msg = Le mot de passe est trop long ; 72 caractères au maximum. angal.userbrowser.passwordmustbeatleast6characters.msg = Le mot de passe doit être au moins 6 caractères; veuillez réessayer. +angal.userbrowser.passwordmustbeatleastncharacters.fmt.msg = Le mot de passe doit comporter au moins {0} caractères ; veuillez réessayer. +angal.userbrowser.passwordmustnotbeblank.msg = Le mot de passe ne doit pas être vide. angal.userbrowser.passwordsdonotmatchpleasecorrect.msg = Les mots de passe ne correspondent pas; veuillez corriger. angal.userbrowser.passwordsdonotmatchpleaseretry.msg = Les mots de passe ne correspondent pas; veuillez réessayer. +angal.userbrowser.passwordsmustcontainatleastonealphabeticnumericandspecialcharacter.msg = Le mot de passe doit contenir au moins un caractère alphabétique, numérique et spécial. angal.userbrowser.pleaseprovideapassword.msg = Veuillez insérer un mot de passe. angal.userbrowser.pleaseprovideavalidusername.msg = Insérer un nom utilisateur valide. angal.userbrowser.pleaseprovidetheretypepassword.msg = Veuillez 'retaper' le mot de passe. @@ -1488,11 +1714,13 @@ angal.userbrowser.resetpassword.btn.key angal.userbrowser.resetpassword.title = Réinitialiser Mot de Passe angal.userbrowser.retype.password.label = Retaper le mot de passe: angal.userbrowser.selectgroup.label = Sélectionner groupe: -angal.userbrowser.step1.pleaseinsertanew.password.label = Veuillez insérer un nouveau mot de passe (min 6 caractères). +angal.userbrowser.step1.pleaseinsertanew.password.msg = Veuillez insérer un nouveau mot de passe. +angal.userbrowser.step1.pleaseinsertanew.password.fmt.msg = Veuillez insérer un nouveau mot de passe (minimum de {0} caractères). angal.userbrowser.step2.pleaserepeatthenewpassword.label = Veuillez répéter le nouveau mot de passe. angal.userbrowser.theadminusercannotbedeleted.msg = L’utilisateur "admin" ne peux pas être supprimé. angal.userbrowser.thepasswordhasbeenchanged.msg = Les mots de passe a été changé. angal.userbrowser.theuseralreadyexists.fmt.msg = L'utilisateur "{0}" existe déjà. +angal.userbrowser.theusernamecontainsinvalidcharacters.msg = The user name must contain only a-z, 0-9, dash, period and underscore characters. angal.userbrowser.title = Liste Usagers angal.userbrowser.user.col = Utilisateur angal.vaccine.deletevaccine.fmt.msg = Supprimer vaccin: {0}? @@ -1519,9 +1747,15 @@ angal.visit.findpatient.btn angal.visit.findpatient.btn.key = C angal.visit.gotodate.btn = Aller à la Date angal.visit.gotodate.btn.key = D +angal.visit.invalidvisitduration.msg = La durée de la visite doit être positive +angal.visit.manyoverlappingpatientvisitsindifferentwards.msg = La visite chevauche les visites de ces patients : {0} angal.visit.nextarrow.btn = Prochain-> angal.visit.nextarrow.btn.key = N +angal.visit.overlappingmanyvisitsinward.msg = La visite chevauche ces visites existantes dans le même service : {0} +angal.visit.overlappingpatientvisitsindifferentwards.msg = La visite chevauche la visite de ce patient dans un service différent : {0} +angal.visit.overlappingvisitinward.msg = La visite chevauche cette visite existante dans le même service : {0} angal.visit.pleasechooseadate.msg = Veuillez choisir une date. +angal.visit.pleasechooseavaliddateandtime.msg = Veuillez choisir une date et une heure valides. angal.visit.pleasechooseapatient.msg = Veuillez choisir un patient. angal.visit.pleasechooseaward.msg = Veuillez choisir un département. angal.visit.pleaseselectapatient.title = Veuillez Sélectionner un Patient @@ -1531,24 +1765,30 @@ angal.visit.printthisdaysvisits2.btn angal.visit.printthisdaysvisits2.btn.key = 2 angal.visit.removevisit.btn = Supprimez Visite angal.visit.removevisit.msg = Supprimez la visite? -angal.visit.selectaward = Sélectionner un Département +angal.visit.selectaward.txt = angal.visit.service = Service +angal.visit.thepatientssexandwarddonotagree.msg = Le sexe du patient et le service ne concordent pas. angal.visit.today.btn = Aujourd'hui angal.visit.today.btn.key = H angal.visit.visits = Visites +angal.visit.ward.border = Re-accouchement angal.visit.worksheet.title = Feuille de Travail angal.ward.beds.col = Lits angal.ward.bedsedit = Nombre de lits * angal.ward.cannotdeletematernityward.msg = Il est impossible de supprimer le département maternité, +angal.ward.cannotdeleteopdward.msg = Impossible de supprimer le service ambulatoire angal.ward.deleteward.fmt.msg = Supprimer département: {0}? angal.ward.doctors.col = Médecins angal.ward.doctorsedit = Nombre de Médecins * +angal.ward.duration.col = Durée angal.ward.editward.title = Modifier Département angal.ward.emailedit = E-mail angal.ward.femaleward = Département Femmes +angal.ward.hasopd.col = Dispose d'un département ambulatoire angal.ward.haspharmacy.col = A-t-il une Pharmacie -angal.ward.insertavalidbedsnumber = Insérer un numéro de lits valide -angal.ward.insertavaliddoctorsnumber = Insérez un nombre de médecins valide +angal.ward.insertavalidbedsnumber = Insérer un nombre valide de lits. +angal.ward.insertavaliddoctorsnumber = Insérez un nombre des docteurs valide +angal.ward.insertavaliddurationvalue.msg = Insérer une valeur valide pour la durée de la visite. angal.ward.insertavalidnursesnumber = Insérez un nombre d'infirmières valide angal.ward.maleward = Département Hommes angal.ward.maternity.txt = Maternité @@ -1556,6 +1796,7 @@ angal.ward.nameedit angal.ward.newward.title = Nouveau Département angal.ward.nurses.col = Infirmières angal.ward.nursesedit = Nombre d'Infirmières * +angal.ward.opd.txt = DDP angal.ward.pleasecheckinadmissionpatients.msg = Contrôle admission / patients. angal.ward.requiredfields = * champs obligatoires angal.ward.theemailmustbevalid.msg = L’e-mail doit être valide. @@ -1563,7 +1804,9 @@ angal.ward.thenumberofbedsmustbepositive.msg angal.ward.thenumberofdoctorsmustbepositive.msg = Le nombre des docteurs doit être positif. angal.ward.thenumberofnursesmustbepositive.msg = Le numéro des infirmières doit être positif. angal.ward.theselectedwardhaspatients.fmt.msg = Le département sélectionné a {0} patients. +angal.ward.visitdurationedit = Durée de la visite * angal.ward.wardbrowser.title = Liste Départements +angal.ward.wardwithopd = Services ambulatoires angal.ward.wardwithpharmacy = Département avec pharmacie angal.wardpharmacy.lotduedate.col = Date échéance Lot angal.wardpharmacy.lotnumber.col = Lot No. @@ -1586,4 +1829,4 @@ angal.xmpp.userinfo.fmt.txt angal.xmpp.usersinfo.border = Informations Usagers angal.xmpp.wantstosharewithyouthisreport.fmt.msg = \n*** {0} veut partager avec vous ce rapport: {1}\n angal.xmpp.wouldliketosend.fmt.msg = {0} voudrais envoyer: \n{1} -angal.xmpp.youhaverejectedthefiletransfer.txt = vous avez refusé le transfert de fichier +angal.xmpp.youhaverejectedthefiletransfer.txt = Vous avez refusé le transfert de fichier. diff --git a/bundle/language_it.properties b/bundle/language_it.properties index c484b857c2..29c3906b00 100644 --- a/bundle/language_it.properties +++ b/bundle/language_it.properties @@ -8,6 +8,7 @@ angal.admission.admissionanddischarge.title angal.admission.admissiondate.border = Data Ricovero * angal.admission.admissiondate.txt = Data Ricovero * angal.admission.admissiondatecannotbeempty.msg = La data di ricovero non può essere vuota +angal.admission.admissionpatientcannotbeempty.msg = Il campo Paziente non può essere vuoto angal.admission.admissionstatus.border = Stato Ricovero angal.admission.admissiontype.border = Tipologia Ricovero * angal.admission.admissionwardcannotbeempty.msg = Il reparto non può essere vuoto @@ -179,7 +180,7 @@ angal.admtype.admissiontypenotfound.fmt.msg angal.admtype.delete.fmt.msg = Eliminare il tipo di ammissione: "{0}"? angal.admtype.editadmissiontype.title = Modifica Tipo di Ammissione angal.admtype.newadmissiontype.title = Nuovo Tipo di Ammissione -angal.agepattern.txt = {0}y {1}m {2}d +angal.agepattern.txt = {0}a {1}m {2}g angal.agetype.adolescents = Adolescente angal.agetype.adult = Adulto angal.agetype.agetypebrowser.title = Browser del Tipo di Età @@ -531,7 +532,7 @@ angal.disease.opd angal.disease.selecttype = Seleziona tipologia angal.disease.thediseasisealreadypresent.msg = La malattia è già presente. angal.disease.type = Tipologia -angal.distype.deletediseasetype.fmt.msg = Delete disease type: "{0}"? +angal.distype.deletediseasetype.fmt.msg = Eliminare il tipo di patologia: "{0}"? angal.distype.diseasetypebrowser.title = Lista Tipologie Patologie angal.distype.editdiseasetype.title = Modifica Voce Tipologia Patologia angal.distype.newdiseasetype.title = Nuova Voce di Tipologia Patologia @@ -746,11 +747,14 @@ angal.malnutrition.nodate.msg angal.malnutrition.nonameselected = Nessun nome selezionato. angal.malnutrition.pleaseinsertavalidcontroldate.msg = Si prega di inserire una data di controllo valida. angal.malnutrition.pleaseinsertavalidvisitdate.msg = Si prega di inserire una data di visita valida. +angal.medicals.active.txt = Attivo +angal.medicals.activeonly.txt = Solo attivi angal.medicals.averagemonthlyconsumption.btn = CMM angal.medicals.averagemonthlyconsumption.btn.key = M -angal.medicals.criticallevel = Livello critico +angal.medicals.criticallevel.txt = Livello critico angal.medicals.critlevel.col = Livello Crit. angal.medicals.deletemedical.fmt.msg = Elimina medico: {0}? +angal.medicals.disabledonly.txt = Solo disabilitati angal.medicals.editmedical.title = Modifica Voce di Farmaco angal.medicals.expiring.btn = Scadenza angal.medicals.expiring.btn.key = A @@ -769,7 +773,7 @@ angal.medicals.order.btn.key angal.medicals.othermonth = Altro mese... angal.medicals.outofstock.col = Fuori Magazzino angal.medicals.pcsperpck.col = PcsXPck -angal.medicals.pcsperpckExt = Pezzi per Scatola +angal.medicals.pcsperpck.txt = Pezzi per Scatola angal.medicals.pharmaceuticalbrowser.title = Lista Farmaci angal.medicals.pleaseselectareport.msg = Selezionare un report: angal.medicals.pleaseselectperiod.msg = Selezionare un periodo: @@ -785,19 +789,23 @@ angal.medicals.thismonth angal.medicals.today = Oggi angal.medicals.type = Tipologia angal.medicals.withlot = Con lotti +angal.medicalstock.allcharges.txt = Tutti i carichi +angal.medicalstock.alldischarges.txt = Tutti gli scarichi +angal.medicalstock.category.col = Tipologia angal.medicalstock.charge.btn = Carico angal.medicalstock.charge.btn.key = C angal.medicalstock.chooseamedical.msg = Scegli un farmaco. angal.medicalstock.choosealot.msg = Specificare un lotto. angal.medicalstock.chooseavalidduedate.msg = Scegliere una data scadenza valida. -angal.medicalstock.chooseavalidmovementdate.msg = Choose a valid movement date. +angal.medicalstock.chooseavalidmovementdate.msg = Scegli una data movimento valida. angal.medicalstock.chooseavalidpreparationdate = Scegliere una data preparazione valida. angal.medicalstock.clickdrugs = Doppio click per mostrare i dettagli del lotto +angal.medicalstock.codeordescription.txt = Codice o descrizione angal.medicalstock.cost.col = Costo -angal.medicalstock.deletemovementsuccess.msg = Last movement successfully deleted. +angal.medicalstock.deletemovementsuccess.msg = Ultimo movimento eliminato con successo. angal.medicalstock.discharge.btn = Scarico angal.medicalstock.discharge.btn.key = C -angal.medicalstock.notpossibletodeletethismovementthemedicalhasbeenusedafterbeenreceivedinward.fmt.msg = Not possible to delete this movement: the medical {0} has already been used after been received in ward {1}. +angal.medicalstock.notpossibletodeletethismovementthemedicalhasbeenusedafterbeenreceivedinward.fmt.msg = Non è possibile eliminare questo movimento: il prodotto {0} è stato già usato dopo essere stato ricevuto nel reparto {1}. angal.medicalstock.duedate = Data scadenza angal.medicalstock.duedate.col = Data scadenza angal.medicalstock.duedatefromcannotbelaterthanduedateto = La Data Scadenza DA non può essere successiva alla Data Scadenza A. @@ -815,7 +823,7 @@ angal.medicalstock.lotpreparationdate angal.medicalstock.medtype.col = Tipologia Farmaco angal.medicalstock.movement = Movimento angal.medicalstock.movementdatefromcannotbelaterthanmovementdateto = La Data Movimento DA non può essere successiva alla Data Movinemto A. -angal.medicalstock.movementquantityisgreaterthanthequantityof.msg = La quantità in movimento è più grande della quantità del lotto selezionato: dividi il movimento. +angal.medicalstock.movementquantityisgreaterthanthequantityof.fmt.msg = La quantità nel movimento ({0}) è più grande della quantità nel lotto selezionato ({1}); dividere il movimento o cambiare Unità/Scatole angal.medicalstock.multiplecharging.adateinthefutureisnotallowed.msg = Non è consentita una data futura. angal.medicalstock.multiplecharging.chargetype = Tipo Carico angal.medicalstock.multiplecharging.chooseamedical = Selezionare un farmaco @@ -842,7 +850,7 @@ angal.medicalstock.multiplecharging.supplier angal.medicalstock.multiplecharging.theinsertedreferencenumberalreadyexists.msg = Il numero di riferimento inserito esiste già. angal.medicalstock.multiplecharging.totalcost = Costo Totale angal.medicalstock.multiplecharging.unitcost = Costo Unità -angal.medicalstock.multiplecharging.unitpack = Unità/Pacco +angal.medicalstock.multiplecharging.unitpack = Unità/Scatola angal.medicalstock.multiplecharging.units = Unità angal.medicalstock.multiplecharging.useanexistinglot = Usare un lotto esistente? angal.medicalstock.multiplecharging.zerocostsarenotallowed.msg = Non sono ammessi costi zero. @@ -856,7 +864,9 @@ angal.medicalstock.multipledischarging.isabouttoend angal.medicalstock.multipledischarging.lotinformations = Informazioni Lotto angal.medicalstock.multipledischarging.lotnumberabb = Nr. Lotto angal.medicalstock.multipledischarging.lyinginstock = Giacenza +angal.medicalstock.multipledischarging.movementexceedstheavailablequantityformedical.fmt.msg = Il movimento eccede la quantità disponibile ({0}) per il prodotto {1}. angal.medicalstock.multipledischarging.noelementtosave = Nessun elemento da salvare +angal.medicalstock.multipledischarging.nolotswithavailablequantityfoundformedicalpleasereport.fmt.msg = Non sono stati trovati lotti con quantità disponibili per il prodotto {0}; si prega di informare l'amministratore di sistema. angal.medicalstock.multipledischarging.outofstock = Esaurito angal.medicalstock.multipledischarging.packets = Pacchi angal.medicalstock.multipledischarging.pleaseinsertavalidvalue = Inserire un valore valido. @@ -867,24 +877,26 @@ angal.medicalstock.multipledischarging.referencenumber angal.medicalstock.multipledischarging.selectalot = Selezionare un lotto angal.medicalstock.multipledischarging.sharealertwithnobody = -- Condividi evento con: Nessuno -- angal.medicalstock.multipledischarging.thequantityisnotavailable = La quantità non è disponibile -angal.medicalstock.multipledischarging.unitpack = Unità/Pacco +angal.medicalstock.multipledischarging.unitpack = Unità/Scatola angal.medicalstock.multipledischarging.units = Unità angal.medicalstock.multipledischarging.youaregoingundercriticalevel = Stai andando sotto la quantità di LIVELLO CRITICO.. Continuare? angal.medicalstock.nodate = Nessuna Data angal.medicalstock.nodescription.txt = nessuna descrizione angal.medicalstock.nolot.txt = Nessun Lotto -angal.medicalstock.onlythelastmovementcanbedeleted.msg = Only the last movement can be deleted. +angal.medicalstock.onlythelastmovementcanbedeleted.msg = Solo l'ultimo movimento può essere eliminato. angal.medicalstock.origin.col = Origine angal.medicalstock.pharmaceutical = Farmaco angal.medicalstock.pharmaceutical.col = Farmaco angal.medicalstock.pleasechooseatype.msg = Si prega di scegliere un tipo. -angal.medicalstock.pleaseselectamovement.msg = Please select a movement. -angal.medicalstock.pleaseselectonlyonemovement.msg = Please select only one movement. -angal.medicalstock.pleaseselectoucomemovement.msg = Please select an outcome movement. +angal.medicalstock.pleaseselectamovement.msg = Selezionare un movimento. +angal.medicalstock.pleaseselectonlyonemovement.msg = Selezionare un solo movimento. +angal.medicalstock.pleaseselectoucomemovement.msg = Selezionare un movimento di uscita. angal.medicalstock.preparationdatefromcannotbelaterpreparationdateto = La Data Preparazione Da non può essere successiva alla Data Preparazione A angal.medicalstock.prepdate = Data preparazione angal.medicalstock.prepdate.col = Data preparazione angal.medicalstock.refno.col = Nr.Bolla +angal.medicalstock.reset.btn = Azzera +angal.medicalstock.reset.btn.key = A angal.medicalstock.selectionpanel = Pannello seleziona angal.medicalstock.stockmovement.title = Movimento Delle Scorte angal.medicalstock.stockmovementbrowser.title = Lista Movimenti Magazzino @@ -972,6 +984,10 @@ angal.medicalstockwardedit.selectpatient.btn.key angal.medicalstockwardedit.title = Nuovo / Modifica angal.medicalstockwardedit.tooltip.associateapatientwiththismovement = Associa un paziente a questo movimento angal.medicalstockwardedit.tooltip.removepatientassociationwiththismovement = Rimuove il paziente associato a questo movimento +angal.medstockmovtype.allowedcategoriesare.fmt.msg = Le categorie ammesse sono: {0} +angal.medstockmovtype.category.txt = Tipologia +angal.medstockmovtype.category.operational.txt = Operativo +angal.medstockmovtype.category.nonoperational.txt = Non-Operativo angal.medstockmovtype.deletemovementtype.fmt.msg = Elimina tipo di movimento: {0}? angal.medstockmovtype.editmedicalstockmovementtype.title = Modifica il Tipo di Movimento delle Scorte Mediche angal.medstockmovtype.medicalstockmovementtypebrowser.title = Browser del Tipo di Movimento delle Scorte Mediche @@ -1184,7 +1200,7 @@ angal.newbill.selectamedical.txt angal.newbill.selectanexam.txt = Seleziona un esame: angal.newbill.selectanoperation.txt = Seleziona un'operazione: angal.newbill.selectapricelist.title = Seleziona un Listino -angal.newbill.somepriceshavebeenchangeddoyouwanttoupdatetheitemsprices.fmg.msg = Alcuni prezzi sono cambiati: {0}\n\nVuoi aggiornare i prezzi degli articoli? +angal.newbill.somepriceshavebeenchangeddoyouwanttoupdatetheitemsprices.fmt.msg = Alcuni prezzi sono cambiati: {0}\n\nVuoi aggiornare i prezzi degli articoli? angal.newbill.somepricesnotfound.fmt.msg = Alcuni prezzi non trovati: {0} angal.newbill.somepricesnotfoundandsomeotherchangeddoyouwanttoupdatetheitemsprices.fmt.msg = Alcuni prezzi non trovati e altri modificati:\nNon trovato: {0}\nModificato: {1}\n\nVuoi aggiornare i prezzi degli articoli esistenti? angal.newbill.thedateisbeforethelastpayment.msg = La data è precedente all'ultimo pagamento. @@ -1260,7 +1276,7 @@ angal.opd.pleaseselectadisease.msg angal.opd.pleaseselectpatientssex.msg = Si prega di selezionare il sesso del paziente. angal.opd.reattendance.btn = Visita di Controllo angal.opd.reattendance.txt = Visita di Controllo -angal.opd.referral.txt = Referral +angal.opd.referral.txt = Trasferito angal.opd.referralto.txt = Presso altro Ospedale angal.opd.reset.btn = Azzera angal.opd.reset.btn.key = C @@ -1324,8 +1340,8 @@ angal.patient.dead.btn angal.patient.deletepatient.fmt.msg = Elimina paziente: {0}? angal.patient.doyouwanttodeletethepatientsphoto.msg = Vuoi davvero eliminare la foto del paziente? angal.patient.editpatient.title = Modifica Paziente -angal.patient.examination.nonzero.msg = Height or weight must not be zero. -angal.patient.examination.minmaxvalues.msg = Some entered values are equal to their minimum or maximum values. Do you really want to confirm them? +angal.patient.examination.nonzero.msg = Altezza e peso non possono essere zero. +angal.patient.examination.minmaxvalues.msg = Alcuni valori inseriti sono uguali ai loro valori minimi o massimi. Vuoi davvero confermarli? angal.patient.fathername = Nome del padre angal.patient.firstname = Nome * angal.patient.hasinsurance = Assicurazione @@ -1367,7 +1383,7 @@ angal.patient.photonotdeleted angal.patient.pleaseselectasex.msg = Seleziona un sesso. angal.patient.pleaseselectpatientssex.msg = Si prega di selezionare il sesso del paziente. angal.patient.profession = Professione -angal.patient.profession.business.txt = Business +angal.patient.profession.business.txt = Affari angal.patient.profession.construction.txt = Edilizia angal.patient.profession.engineering.txt = Ingegneria angal.patient.profession.farming.txt = Agricoltura @@ -1384,15 +1400,15 @@ angal.patient.secondname angal.patient.sexstar = Sesso * angal.patient.taxcode = Codice Fiscale angal.patient.thepatientisalreadypresent.msg = Il paziente è già presente; continuo? -angal.patient.tobm = TOB +angal.patient.tobm = ABO angal.patient.unknown.btn = Sonosciuto angal.patient.yes.btn = Si -angal.patient.ymd.fmt.msg = {0}y {1}m {2}d +angal.patient.ymd.fmt.msg = {0}a {1}m {2}g angal.patientbill.editpatientbill.fmt.title = Modifica Fattura Paziente: {0} angal.patientbill.newpatientbill.title = Nuova Fattura Paziente angal.patientphoto.file.btn = File angal.patientphoto.file.btn.key = F -angal.patientphoto.imagefiles.txt = Image files +angal.patientphoto.imagefiles.txt = Files immagini angal.patientphoto.newphoto.btn = Nuova Foto angal.patientphoto.newphoto.btn.key = N angal.patvac.agefrommustbelowerthanageto = 'Da anni' deve essere minore di 'Ad anni' @@ -1426,7 +1442,7 @@ angal.patvac.vaccinetype.col angal.photoboothcomponent.capture.btn = Catturare angal.photoboothcomponent.capture.btn.key = C angal.photoboothcomponent.resolution.txt = Risoluzione -angal.photoboothcomponent.webcam.txt = Webcam +angal.photoboothcomponent.webcam.txt = Camera angal.photoframe.originalpicitureresoultion.fmt.txt = Risoluzione immagine originale: {0} angal.photoframe.photopreview.title = Anteprima Foto angal.preagtreattype.deletetreatmenttype.fmt.msg = Elimina tipo di trattamento: {0}? @@ -1704,6 +1720,7 @@ angal.userbrowser.step2.pleaserepeatthenewpassword.label angal.userbrowser.theadminusercannotbedeleted.msg = L'utente "admin" non può essere eliminato. angal.userbrowser.thepasswordhasbeenchanged.msg = La password è stata modificata. angal.userbrowser.theuseralreadyexists.fmt.msg = L'utente "{0}" esiste già. +angal.userbrowser.theusernamecontainsinvalidcharacters.msg = Lo username deve contenere solo lettere minuscole, numeri, trattini, punti e/o sottolinature. angal.userbrowser.title = Browser Utente angal.userbrowser.user.col = Utenti angal.vaccine.deletevaccine.fmt.msg = Elimina vaccino: {0}? diff --git a/bundle/language_sq.properties b/bundle/language_sq.properties index fc99eef4d3..9e9c765051 100644 --- a/bundle/language_sq.properties +++ b/bundle/language_sq.properties @@ -8,6 +8,7 @@ angal.admission.admissionanddischarge.title angal.admission.admissiondate.border = Data e pranimit * angal.admission.admissiondate.txt = Data e pranimit * angal.admission.admissiondatecannotbeempty.msg = Data e pranimit nuk mund të jetë bosh +angal.admission.admissionpatientcannotbeempty.msg = Admission patient cannot be empty. angal.admission.admissionstatus.border = Statusi i pranimit angal.admission.admissiontype.border = Lloji i pranimit * angal.admission.admissionwardcannotbeempty.msg = Reparti i pranimit nuk mund të jetë bosh @@ -746,11 +747,14 @@ angal.malnutrition.nodate.msg angal.malnutrition.nonameselected = Nuk u zgjodh asnjë emër angal.malnutrition.pleaseinsertavalidcontroldate.msg = Vendosni një datë të vlefshme kontrolli. angal.malnutrition.pleaseinsertavalidvisitdate.msg = Ju lutemi vendosni një datë të vlefshme vizite. +angal.medicals.active.txt = Aktive +angal.medicals.activeonly.txt = Vetëm aktive angal.medicals.averagemonthlyconsumption.btn = AMC angal.medicals.averagemonthlyconsumption.btn.key = M -angal.medicals.criticallevel = Niveli kritik +angal.medicals.criticallevel.txt = Niveli kritik angal.medicals.critlevel.col = Niveli kritik angal.medicals.deletemedical.fmt.msg = Fshij medikamentin: {0}? +angal.medicals.disabledonly.txt = Jo-aktive angal.medicals.editmedical.title = Redakto Medikamentin angal.medicals.expiring.btn = Që skadojnë angal.medicals.expiring.btn.key = P @@ -769,7 +773,7 @@ angal.medicals.order.btn.key angal.medicals.othermonth = Muajin tjetër... angal.medicals.outofstock.col = Jashtë gjendjes angal.medicals.pcsperpck.col = PcsXPck -angal.medicals.pcsperpckExt = Copë për paketë +angal.medicals.pcsperpck.txt = Copë për paketë angal.medicals.pharmaceuticalbrowser.title = Shfletuesi Farmaceutik angal.medicals.pleaseselectareport.msg = Ju lutemi zgjidhni një raport: angal.medicals.pleaseselectperiod.msg = Ju lutemi zgjidhni një periudhë: @@ -785,6 +789,9 @@ angal.medicals.thismonth angal.medicals.today = Sot angal.medicals.type = Lloji angal.medicals.withlot = Me etapa +angal.medicalstock.allcharges.txt = Të gjitha tarifat +angal.medicalstock.alldischarges.txt = Të gjitha shkarkimet +angal.medicalstock.category.col = Kategoria angal.medicalstock.charge.btn = Pagesa angal.medicalstock.charge.btn.key = H angal.medicalstock.chooseamedical.msg = Zgjidhni një medikament. @@ -793,6 +800,7 @@ angal.medicalstock.chooseavalidduedate.msg angal.medicalstock.chooseavalidmovementdate.msg = Zgjidhni një datë të vlefshme lëvizjeje. angal.medicalstock.chooseavalidpreparationdate = Zgjidhni një datë të vlefshme përgatitjeje angal.medicalstock.clickdrugs = Klikoni dy herë për të treguar detajet +angal.medicalstock.codeordescription.txt = Kodi i përshkrimit angal.medicalstock.cost.col = Kostoja angal.medicalstock.deletemovementsuccess.msg = Lëvizja e fundit u fshi me sukses. angal.medicalstock.discharge.btn = Lëshim @@ -815,7 +823,7 @@ angal.medicalstock.lotpreparationdate angal.medicalstock.medtype.col = Lloji medikamentit angal.medicalstock.movement = Lëvizje angal.medicalstock.movementdatefromcannotbelaterthanmovementdateto = Data e Lëvizjes nga nuk mund të jetë më vonë se data e lëvizjes Deri në -angal.medicalstock.movementquantityisgreaterthanthequantityof.msg = Sasia e lëvizjes është më e madhe se sasia e lotit të përzgjedhur; ndani lëvizjen. +angal.medicalstock.movementquantityisgreaterthanthequantityof.fmt.msg = Movement quantity ({0}) is greater than the quantity of the lot selected ({1}); split the movement or adjust Units/Packets. angal.medicalstock.multiplecharging.adateinthefutureisnotallowed.msg = Një datë në të ardhmen nuk lejohet. angal.medicalstock.multiplecharging.chargetype = Lloji i Tarifës angal.medicalstock.multiplecharging.chooseamedical = Zgjidhni një Medikament @@ -856,7 +864,9 @@ angal.medicalstock.multipledischarging.isabouttoend angal.medicalstock.multipledischarging.lotinformations = Informacioni i Lot-it angal.medicalstock.multipledischarging.lotnumberabb = Etapa Nr. angal.medicalstock.multipledischarging.lyinginstock = Gjënden në magazinë: +angal.medicalstock.multipledischarging.movementexceedstheavailablequantityformedical.fmt.msg = Movement exceeds the available quantity ({0}) for medical {1}. angal.medicalstock.multipledischarging.noelementtosave = Asnjë element për ruajtje +angal.medicalstock.multipledischarging.nolotswithavailablequantityfoundformedicalpleasereport.fmt.msg = No lots with available quantity found for medical {0}; please report to system administrator. angal.medicalstock.multipledischarging.outofstock = Nuk ka gjëndje angal.medicalstock.multipledischarging.packets = Paketa angal.medicalstock.multipledischarging.pleaseinsertavalidvalue = Vendosni një datë të vlefshme @@ -885,6 +895,8 @@ angal.medicalstock.preparationdatefromcannotbelaterpreparationdateto angal.medicalstock.prepdate = Data e përgatitjes angal.medicalstock.prepdate.col = Data e përgatitjes angal.medicalstock.refno.col = Nr. Ref. +angal.medicalstock.reset.btn = Rivendos +angal.medicalstock.reset.btn.key = T angal.medicalstock.selectionpanel = Paneli i zgjedhjes angal.medicalstock.stockmovement.title = Lëvizje stoku angal.medicalstock.stockmovementbrowser.title = Shfletuesi i lëvizjes së stokut @@ -972,6 +984,10 @@ angal.medicalstockwardedit.selectpatient.btn.key angal.medicalstockwardedit.title = E re / Redakto angal.medicalstockwardedit.tooltip.associateapatientwiththismovement = Caktoni një pacient me këtë lëvizje angal.medicalstockwardedit.tooltip.removepatientassociationwiththismovement = Hiqni lidhjen e pacientit me këtë lëvizje +angal.medstockmovtype.allowedcategoriesare.fmt.msg = Allowed categories are: {0} +angal.medstockmovtype.category.txt = Kategoria +angal.medstockmovtype.category.operational.txt = Operational +angal.medstockmovtype.category.nonoperational.txt = Non-Operational angal.medstockmovtype.deletemovementtype.fmt.msg = Fshij llojin e lëvizjes: {0}? angal.medstockmovtype.editmedicalstockmovementtype.title = Redakto llojin e lëvizjes së stokut medikal angal.medstockmovtype.medicalstockmovementtypebrowser.title = Shfletuesi i llojeve të lëvizjes së stokut medikal @@ -1184,7 +1200,7 @@ angal.newbill.selectamedical.txt angal.newbill.selectanexam.txt = Zgjidhni një ekzaminim: angal.newbill.selectanoperation.txt = Zgjidh një operacion: angal.newbill.selectapricelist.title = Zgjidh një ListëÇmimesh -angal.newbill.somepriceshavebeenchangeddoyouwanttoupdatetheitemsprices.fmg.msg = Disa çmime janë ndryshuar: {0}\n\nDëshiron të përditësosh çmimet e artikujve? +angal.newbill.somepriceshavebeenchangeddoyouwanttoupdatetheitemsprices.fmt.msg = Disa çmime janë ndryshuar: {0}\n\nDëshiron të përditësosh çmimet e artikujve? angal.newbill.somepricesnotfound.fmt.msg = Disa çmime nuk u gjetën: {0} angal.newbill.somepricesnotfoundandsomeotherchangeddoyouwanttoupdatetheitemsprices.fmt.msg = Disa çmime nuk u gjetën dhe disa të tjera ndryshuan:\nNuk u gjet: {0}\nNdryshuar: {1}\n\nDëshiron të përditësosh çmimet e artikujve ekzistues? angal.newbill.thedateisbeforethelastpayment.msg = Data është para pagesës së fundit. @@ -1704,6 +1720,7 @@ angal.userbrowser.step2.pleaserepeatthenewpassword.label angal.userbrowser.theadminusercannotbedeleted.msg = Përdoruesi "admin" nuk mund të fshihet. angal.userbrowser.thepasswordhasbeenchanged.msg = Fjalëkalimi është ndërruar. angal.userbrowser.theuseralreadyexists.fmt.msg = Përdoruesi "{0}" ekziston tashmë. +angal.userbrowser.theusernamecontainsinvalidcharacters.msg = The user name must contain only a-z, 0-9, dash, period and underscore characters. angal.userbrowser.title = Shfletuesi i Përdoruesve angal.userbrowser.user.col = Përdoruesi angal.vaccine.deletevaccine.fmt.msg = Fshij vaksinën: {0}? diff --git a/bundle/language_zh_CN.properties b/bundle/language_zh_CN.properties index 63b8cbcd33..ff072be992 100644 --- a/bundle/language_zh_CN.properties +++ b/bundle/language_zh_CN.properties @@ -8,6 +8,7 @@ angal.admission.admissionanddischarge.title angal.admission.admissiondate.border = 入院日期 * angal.admission.admissiondate.txt = 入院日期 * angal.admission.admissiondatecannotbeempty.msg = 入院日期不可为空. +angal.admission.admissionpatientcannotbeempty.msg = Admission patient cannot be empty. angal.admission.admissionstatus.border = 入院情况 angal.admission.admissiontype.border = 入院类型 * angal.admission.admissionwardcannotbeempty.msg = 病房不可为空. @@ -746,11 +747,14 @@ angal.malnutrition.nodate.msg angal.malnutrition.nonameselected = 未选中姓名 angal.malnutrition.pleaseinsertavalidcontroldate.msg = 请输入有效控制日期. angal.malnutrition.pleaseinsertavalidvisitdate.msg = 请输入有效就诊日期. +angal.medicals.active.txt = Active +angal.medicals.activeonly.txt = Active only angal.medicals.averagemonthlyconsumption.btn = AMC angal.medicals.averagemonthlyconsumption.btn.key = M -angal.medicals.criticallevel = 临界水平 +angal.medicals.criticallevel.txt = 临界水平 angal.medicals.critlevel.col = 临界水平 angal.medicals.deletemedical.fmt.msg = 删除医聊: {0}? +angal.medicals.disabledonly.txt = Disabled only angal.medicals.editmedical.title = 修改医疗 angal.medicals.expiring.btn = 即将到期 angal.medicals.expiring.btn.key = P @@ -769,7 +773,7 @@ angal.medicals.order.btn.key angal.medicals.othermonth = 其它月份... angal.medicals.outofstock.col = 缺货 angal.medicals.pcsperpck.col = PcsXPck -angal.medicals.pcsperpckExt = 每包件数 +angal.medicals.pcsperpck.txt = 每包件数 angal.medicals.pharmaceuticalbrowser.title = 药房浏览 angal.medicals.pleaseselectareport.msg = 请选择报告: angal.medicals.pleaseselectperiod.msg = 请选择时期: @@ -785,6 +789,9 @@ angal.medicals.thismonth angal.medicals.today = 今日 angal.medicals.type = 类型 angal.medicals.withlot = 批次 +angal.medicalstock.allcharges.txt = All charges +angal.medicalstock.alldischarges.txt = All discharges +angal.medicalstock.category.col = 类别 angal.medicalstock.charge.btn = 收费 angal.medicalstock.charge.btn.key = H angal.medicalstock.chooseamedical.msg = 选择医疗. @@ -793,6 +800,7 @@ angal.medicalstock.chooseavalidduedate.msg angal.medicalstock.chooseavalidmovementdate.msg = 选择有效移动日期. angal.medicalstock.chooseavalidpreparationdate = 选择有效准备日期 angal.medicalstock.clickdrugs = 双击显示批次详情 +angal.medicalstock.codeordescription.txt = Code or Description angal.medicalstock.cost.col = 成本 angal.medicalstock.deletemovementsuccess.msg = Last movement successfully deleted. angal.medicalstock.discharge.btn = 出院 @@ -815,7 +823,7 @@ angal.medicalstock.lotpreparationdate angal.medicalstock.medtype.col = 药品类型 angal.medicalstock.movement = 移动 angal.medicalstock.movementdatefromcannotbelaterthanmovementdateto = 移动日期“从”不能晚于“到” -angal.medicalstock.movementquantityisgreaterthanthequantityof.msg = 移动数量大于已选中批次所包含数量; 拆分移动. +angal.medicalstock.movementquantityisgreaterthanthequantityof.fmt.msg = Movement quantity ({0}) is greater than the quantity of the lot selected ({1}); split the movement or adjust Units/Packets. angal.medicalstock.multiplecharging.adateinthefutureisnotallowed.msg = 禁止未来日期. angal.medicalstock.multiplecharging.chargetype = 收费类型 angal.medicalstock.multiplecharging.chooseamedical = 选择医疗 @@ -856,7 +864,9 @@ angal.medicalstock.multipledischarging.isabouttoend angal.medicalstock.multipledischarging.lotinformations = 批次信息 angal.medicalstock.multipledischarging.lotnumberabb = 批次编号 angal.medicalstock.multipledischarging.lyinginstock = Lying in stock: +angal.medicalstock.multipledischarging.movementexceedstheavailablequantityformedical.fmt.msg = Movement exceeds the available quantity ({0}) for medical {1}. angal.medicalstock.multipledischarging.noelementtosave = 没有需保存成分 +angal.medicalstock.multipledischarging.nolotswithavailablequantityfoundformedicalpleasereport.fmt.msg = No lots with available quantity found for medical {0}; please report to system administrator. angal.medicalstock.multipledischarging.outofstock = 缺货! angal.medicalstock.multipledischarging.packets = 包 angal.medicalstock.multipledischarging.pleaseinsertavalidvalue = 输入有效值 @@ -885,6 +895,8 @@ angal.medicalstock.preparationdatefromcannotbelaterpreparationdateto angal.medicalstock.prepdate = 准备日期 angal.medicalstock.prepdate.col = 准备日期 angal.medicalstock.refno.col = 参考编号 +angal.medicalstock.reset.btn = 重置 +angal.medicalstock.reset.btn.key = T angal.medicalstock.selectionpanel = 选择面板 angal.medicalstock.stockmovement.title = 库存移动 angal.medicalstock.stockmovementbrowser.title = 库存移动浏览 @@ -972,6 +984,10 @@ angal.medicalstockwardedit.selectpatient.btn.key angal.medicalstockwardedit.title = 新开 / 修改 angal.medicalstockwardedit.tooltip.associateapatientwiththismovement = 将一个病人与此移动关联 angal.medicalstockwardedit.tooltip.removepatientassociationwiththismovement = 移除与此移动关联的病人 +angal.medstockmovtype.allowedcategoriesare.fmt.msg = Allowed categories are: {0} +angal.medstockmovtype.category.txt = 类别 +angal.medstockmovtype.category.operational.txt = Operational +angal.medstockmovtype.category.nonoperational.txt = Non-Operational angal.medstockmovtype.deletemovementtype.fmt.msg = 删除移动类型: {0}? angal.medstockmovtype.editmedicalstockmovementtype.title = 修改医药库存移动类型 angal.medstockmovtype.medicalstockmovementtypebrowser.title = 医药库存移动类型浏览 @@ -1184,7 +1200,7 @@ angal.newbill.selectamedical.txt angal.newbill.selectanexam.txt = 选择一项检查: angal.newbill.selectanoperation.txt = 选择一项手术: angal.newbill.selectapricelist.title = 选择一份价目表 -angal.newbill.somepriceshavebeenchangeddoyouwanttoupdatetheitemsprices.fmg.msg = 有些价格已变动:{0}是否更新这些价格? +angal.newbill.somepriceshavebeenchangeddoyouwanttoupdatetheitemsprices.fmt.msg = 有些价格已变动:{0}是否更新这些价格? angal.newbill.somepricesnotfound.fmt.msg = 未发现有些价格:{0} angal.newbill.somepricesnotfoundandsomeotherchangeddoyouwanttoupdatetheitemsprices.fmt.msg = 未发现有些价格,有些已变动:未发现:{0} 变动:{1} 是否更新? angal.newbill.thedateisbeforethelastpayment.msg = 日期早于上一次支付日期. @@ -1704,6 +1720,7 @@ angal.userbrowser.step2.pleaserepeatthenewpassword.label angal.userbrowser.theadminusercannotbedeleted.msg = 不能删除管理员. angal.userbrowser.thepasswordhasbeenchanged.msg = 密码已重置. angal.userbrowser.theuseralreadyexists.fmt.msg = 用户"{0}" 已存在. +angal.userbrowser.theusernamecontainsinvalidcharacters.msg = The user name must contain only a-z, 0-9, dash, period and underscore characters. angal.userbrowser.title = 用户浏览 angal.userbrowser.user.col = 用户 angal.vaccine.deletevaccine.fmt.msg = 删除疫苗: {0}? diff --git a/oh.bat b/oh.bat index 8fb44dad2b..481f2042c1 100644 --- a/oh.bat +++ b/oh.bat @@ -241,18 +241,18 @@ echo f | xcopy %OH_PATH%\%OH_DIR%\rsc\settings.properties.dist %OH_PATH%\%OH_DIR %REPLACE_PATH%\replace.exe PHOTO_DIR %PHOTO_DIR% -- %OH_PATH%\%OH_DIR%\rsc\settings.properties >> "%OH_PATH%\%LOG_DIR%\%LOG_FILE%" 2>&1 %REPLACE_PATH%\replace.exe YES_OR_NO %OH_SINGLE_USER% -- %OH_PATH%\%OH_DIR%\rsc\settings.properties >> "%OH_PATH%\%LOG_DIR%\%LOG_FILE%" 2>&1 -REM ### Setup log4j.properties +REM ### Setup log4j2-spring.properties REM # replace backslash with slash set OH_LOG_DIR=%LOG_DIR:\=/% set OH_LOG_DEST=../%OH_LOG_DIR%/%OH_LOG_FILE% -echo f | xcopy %OH_PATH%\%OH_DIR%\rsc\log4j.properties.dist %OH_PATH%\%OH_DIR%\rsc\log4j.properties /y >> "%OH_PATH%\%LOG_DIR%\%LOG_FILE%" 2>&1 -%REPLACE_PATH%\replace.exe DBSERVER %DATABASE_SERVER% -- %OH_PATH%\%OH_DIR%\rsc\log4j.properties >> "%OH_PATH%\%LOG_DIR%\%LOG_FILE%" 2>&1 -%REPLACE_PATH%\replace.exe DBPORT %DATABASE_PORT% -- %OH_PATH%\%OH_DIR%\rsc\log4j.properties >> "%OH_PATH%\%LOG_DIR%\%LOG_FILE%" 2>&1 -%REPLACE_PATH%\replace.exe DBUSER %DATABASE_USER% -- %OH_PATH%\%OH_DIR%\rsc\log4j.properties >> "%OH_PATH%\%LOG_DIR%\%LOG_FILE%" 2>&1 -%REPLACE_PATH%\replace.exe DBPASS %DATABASE_PASSWORD% -- %OH_PATH%\%OH_DIR%\rsc\log4j.properties >> "%OH_PATH%\%LOG_DIR%\%LOG_FILE%" 2>&1 -%REPLACE_PATH%\replace.exe DBNAME %DATABASE_NAME% -- %OH_PATH%\%OH_DIR%\rsc\log4j.properties >> "%OH_PATH%\%LOG_DIR%\%LOG_FILE%" 2>&1 -%REPLACE_PATH%\replace.exe LOG_LEVEL %LOG_LEVEL% -- %OH_PATH%\%OH_DIR%\rsc\log4j.properties >> "%OH_PATH%\%LOG_DIR%\%LOG_FILE%" 2>&1 -%REPLACE_PATH%\replace.exe LOG_DEST %OH_LOG_DEST% -- %OH_PATH%\%OH_DIR%\rsc\log4j.properties >> "%OH_PATH%\%LOG_DIR%\%LOG_FILE%" 2>&1 +echo f | xcopy %OH_PATH%\%OH_DIR%\rsc\log4j2-spring.properties.dist %OH_PATH%\%OH_DIR%\rsc\log4j2-spring.properties /y >> "%OH_PATH%\%LOG_DIR%\%LOG_FILE%" 2>&1 +%REPLACE_PATH%\replace.exe DBSERVER %DATABASE_SERVER% -- %OH_PATH%\%OH_DIR%\rsc\log4j2-spring.properties >> "%OH_PATH%\%LOG_DIR%\%LOG_FILE%" 2>&1 +%REPLACE_PATH%\replace.exe DBPORT %DATABASE_PORT% -- %OH_PATH%\%OH_DIR%\rsc\log4j2-spring.properties >> "%OH_PATH%\%LOG_DIR%\%LOG_FILE%" 2>&1 +%REPLACE_PATH%\replace.exe DBUSER %DATABASE_USER% -- %OH_PATH%\%OH_DIR%\rsc\log4j2-spring.properties >> "%OH_PATH%\%LOG_DIR%\%LOG_FILE%" 2>&1 +%REPLACE_PATH%\replace.exe DBPASS %DATABASE_PASSWORD% -- %OH_PATH%\%OH_DIR%\rsc\log4j2-spring.properties >> "%OH_PATH%\%LOG_DIR%\%LOG_FILE%" 2>&1 +%REPLACE_PATH%\replace.exe DBNAME %DATABASE_NAME% -- %OH_PATH%\%OH_DIR%\rsc\log4j2-spring.properties >> "%OH_PATH%\%LOG_DIR%\%LOG_FILE%" 2>&1 +%REPLACE_PATH%\replace.exe LOG_LEVEL %LOG_LEVEL% -- %OH_PATH%\%OH_DIR%\rsc\log4j2-spring.properties >> "%OH_PATH%\%LOG_DIR%\%LOG_FILE%" 2>&1 +%REPLACE_PATH%\replace.exe LOG_DEST %OH_LOG_DEST% -- %OH_PATH%\%OH_DIR%\rsc\log4j2-spring.properties >> "%OH_PATH%\%LOG_DIR%\%LOG_FILE%" 2>&1 REM ### Setup other OH property files echo f | xcopy %OH_PATH%\%OH_DIR%\rsc\examination.properties.dist %OH_PATH%\%OH_DIR%\rsc\examination.properties /y >> "%OH_PATH%\%LOG_DIR%\%LOG_FILE%" 2>&1 @@ -346,7 +346,7 @@ REM ###### Start Open Hospital ##### echo Starting Open Hospital GUI... cd /d %OH_PATH%\%OH_DIR% -%JAVA_BIN% -client -Xms64m -Xmx1024m -Dsun.java2d.dpiaware=false -Djava.library.path=%NATIVE_LIB_PATH% -cp %CLASSPATH% org.isf.menu.gui.Menu +%JAVA_BIN% -client -Xms64m -Xmx1024m -Dsun.java2d.dpiaware=false -Djava.library.path=%NATIVE_LIB_PATH% -cp %CLASSPATH% org.isf.Application REM # Shutdown MySQL echo Shutting down MySQL... diff --git a/oh.ps1 b/oh.ps1 index 3578c2d296..ca4812a1a7 100644 --- a/oh.ps1 +++ b/oh.ps1 @@ -175,7 +175,7 @@ $script:OH_SETTINGS="settings.properties" $script:DATABASE_SETTINGS="database.properties" $script:EXAMINATION_SETTINGS="examination.properties" $script:IMAGING_SETTINGS="dicom.properties" -$script:LOG4J_SETTINGS="log4j.properties" +$script:LOG4J_SETTINGS="log4j2-spring.properties" $script:PRINTER_SETTINGS="txtPrinter.properties" $script:SMS_SETTINGS="sms.properties" $script:TELEMETRY_SETTINGS="telemetry.properties" @@ -984,8 +984,11 @@ function write_api_config_file { # generate OH API token and save to settings file $JWT_TOKEN_SECRET=( -join ($(for($i=0; $i -lt 64; $i++) { ((65..90)+(97..122)+(".")+("!")+("?")+("&") | Get-Random | % {[char]$_}) })) ) Write-Host "Writing OH API configuration file -> $API_SETTINGS..." - (Get-Content "$OH_PATH/$OH_DIR/rsc/$API_SETTINGS.dist").replace("JWT_TOKEN_SECRET","$JWT_TOKEN_SECRET") | Set-Content "$OH_PATH/$OH_DIR/rsc/$API_SETTINGS" - (Get-Content "$OH_PATH/$OH_DIR/rsc/$API_SETTINGS").replace("OH_API_PID","$OH_API_PID") | Set-Content "$OH_PATH/$OH_DIR/rsc/$API_SETTINGS" + (Get-Content "$OH_PATH/$OH_DIR/rsc/$API_SETTINGS.dist") ` + -replace "JWT_TOKEN_SECRET", "$JWT_TOKEN_SECRET" ` + -replace "OH_API_PID", "$OH_API_PID" ` + -replace "API_HOST:API_PORT", "localhost:8080" ` + | Set-Content "$OH_PATH/$OH_DIR/rsc/$API_SETTINGS" } } @@ -1039,7 +1042,7 @@ function write_config_files { (Get-Content "$OH_PATH/$OH_DIR/rsc/$DATABASE_SETTINGS").replace("DBNAME","$DATABASE_NAME") | Set-Content "$OH_PATH/$OH_DIR/rsc/$DATABASE_SETTINGS" # direct creation of $DATABASE_SETTINGS - deprecated - #Set-Content -Path $OH_PATH/$OH_DIR/rsc/$DATABASE_SETTINGS -Value "jdbc.url=jdbc:mysql://"$DATABASE_SERVER":$DATABASE_PORT/$DATABASE_NAME" + #Set-Content -Path $OH_PATH/$OH_DIR/rsc/$DATABASE_SETTINGS -Value "jdbc.url=jdbc:mariadb://"$DATABASE_SERVER":$DATABASE_PORT/$DATABASE_NAME" #Add-Content -Path $OH_PATH/$OH_DIR/rsc/$DATABASE_SETTINGS -Value "jdbc.username=$DATABASE_USER" #Add-Content -Path $OH_PATH/$OH_DIR/rsc/$DATABASE_SETTINGS -Value "jdbc.password=$DATABASE_PASSWORD" } @@ -1133,10 +1136,10 @@ function start_gui { # OH GUI launch cd "$OH_PATH\$OH_DIR" # workaround for hard coded paths - #$JAVA_ARGS="-client -Dlog4j.configuration=`"`'$OH_PATH\$OH_DIR\rsc\$LOG4J_SETTINGS`'`" -Dsun.java2d.dpiaware=false -Djava.library.path=`"`'$NATIVE_LIB_PATH`'`" -cp `"`'$OH_CLASSPATH`'`" org.isf.menu.gui.Menu" + #$JAVA_ARGS="-client -Dlog4j.configuration=`"`'$OH_PATH\$OH_DIR\rsc\$LOG4J_SETTINGS`'`" -Dsun.java2d.dpiaware=false -Djava.library.path=`"`'$NATIVE_LIB_PATH`'`" -cp `"`'$OH_CLASSPATH`'`" org.isf.Application" # log4j configuration is now read directly -$JAVA_ARGS="-client -Xms64m -Xmx1024m -Dsun.java2d.dpiaware=false -Djava.library.path=`"$NATIVE_LIB_PATH`" -cp `"`'$OH_CLASSPATH`'`" org.isf.menu.gui.Menu" +$JAVA_ARGS="-client -Xms64m -Xmx1024m -Dsun.java2d.dpiaware=false -Djava.library.path=`"$NATIVE_LIB_PATH`" -cp `"`'$OH_CLASSPATH`'`" org.isf.Application" Start-Process -FilePath "$JAVA_BIN" -ArgumentList $JAVA_ARGS -Wait -NoNewWindow -RedirectStandardOutput "$LOG_DIR/$LOG_FILE" -RedirectStandardError "$LOG_DIR/$LOG_FILE_ERR" diff --git a/oh.sh b/oh.sh index 0d3544b1c7..16cceb9fa7 100644 --- a/oh.sh +++ b/oh.sh @@ -116,7 +116,7 @@ OH_SETTINGS="settings.properties" DATABASE_SETTINGS="database.properties" EXAMINATION_SETTINGS="examination.properties" IMAGING_SETTINGS="dicom.properties" -LOG4J_SETTINGS="log4j.properties" +LOG4J_SETTINGS="log4j2-spring.properties" PRINTER_SETTINGS="txtPrinter.properties" SMS_SETTINGS="sms.properties" TELEMETRY_SETTINGS="telemetry.properties" @@ -876,7 +876,10 @@ function write_api_config_file { # JWT_TOKEN_SECRET=`openssl rand -base64 64 | xargs` JWT_TOKEN_SECRET=`LC_ALL=C tr -dc A-Za-z0-9 $API_SETTINGS..." - sed -e "s/JWT_TOKEN_SECRET/"$JWT_TOKEN_SECRET"/g" -e "s&OH_API_PID&"$OH_API_PID"&g" ./$OH_DIR/rsc/$API_SETTINGS.dist > ./$OH_DIR/rsc/$API_SETTINGS + sed -e "s/JWT_TOKEN_SECRET/"$JWT_TOKEN_SECRET"/g" \ + -e "s&OH_API_PID&"$OH_API_PID"&g" \ + -e "s/API_HOST:API_PORT/localhost:8080/g" \ + ./$OH_DIR/rsc/$API_SETTINGS.dist > ./$OH_DIR/rsc/$API_SETTINGS fi } @@ -998,7 +1001,7 @@ function start_gui { # OH GUI launch cd "$OH_PATH/$OH_DIR" # workaround for hard coded paths - $JAVA_BIN -client -Xms64m -Xmx1024m -Dsun.java2d.dpiaware=false -Djava.library.path=${NATIVE_LIB_PATH} -classpath $OH_CLASSPATH org.isf.menu.gui.Menu >> ../$LOG_DIR/$LOG_FILE 2>&1 + $JAVA_BIN -client -Xms64m -Xmx1024m -Dsun.java2d.dpiaware=false -Djava.library.path=${NATIVE_LIB_PATH} -classpath $OH_CLASSPATH org.isf.Application >> ../$LOG_DIR/$LOG_FILE 2>&1 if [ $? -ne 0 ]; then echo "An error occurred while starting Open Hospital. Exiting." diff --git a/ohmac.sh b/ohmac.sh index 949c359d19..05e2cf529d 100755 --- a/ohmac.sh +++ b/ohmac.sh @@ -46,7 +46,7 @@ OH_API_JAR="openhospital-api-0.1.0.jar" OH_SETTINGS="settings.properties" DATABASE_SETTINGS="database.properties" IMAGING_SETTINGS="dicom.properties" -LOG4J_SETTINGS="log4j.properties" +LOG4J_SETTINGS="log4j2-spring.properties" API_SETTINGS="application.properties" HELP_FILE="OH-readme.txt" @@ -268,7 +268,11 @@ function write_api_config_file { JWT_TOKEN_SECRET=`LC_ALL=C tr -dc A-Za-z0-9 $API_SETTINGS..." - sed -i '' -e "s/JWT_TOKEN_SECRET/"$JWT_TOKEN_SECRET"/g" -e "s&OH_API_PID&"$OH_API_PID"&g" $SET_FILE.dist + sed -i '' \ + -e "s/JWT_TOKEN_SECRET/$JWT_TOKEN_SECRET/g" \ + -e "s/API_HOST:API_PORT/localhost:8080/g" \ + -e "s&OH_API_PID&$OH_API_PID&g" \ + $SET_FILE.dist cp -f $SET_FILE.dist $SET_FILE fi } @@ -547,7 +551,7 @@ function start_gui { echo "Starting Open Hospital GUI..." # OH GUI launch - $JAVA_BIN -client -Xms64m -Xmx1024m -Dsun.java2d.dpiaware=false -Djava.library.path=${NATIVE_LIB_PATH} -classpath $OH_CLASSPATH org.isf.menu.gui.Menu >> $OH_DIR/$LOG_DIR/$LOG_FILE 2>&1 + $JAVA_BIN -client -Xms64m -Xmx1024m -Dsun.java2d.dpiaware=false -Djava.library.path=${NATIVE_LIB_PATH} -classpath $OH_CLASSPATH org.isf.Application >> $OH_DIR/$LOG_DIR/$LOG_FILE 2>&1 if [ $? -ne 0 ]; then echo "An error occurred while starting Open Hospital. Exiting." diff --git a/pom.xml b/pom.xml index 95ec9477e4..2c73b6ab6d 100644 --- a/pom.xml +++ b/pom.xml @@ -13,22 +13,20 @@ org.isf OH-gui jar - 1.14.0-SNAPSHOT + 1.14.2-SNAPSHOT - 1.14.0-SNAPSHOT + 1.14.2-SNAPSHOT 17 UTF-8 - 5.3.32 - 2.7.18 - 4.3 + 4.6 maven-compiler-plugin - 3.12.1 + 3.13.0 ${java.version} @@ -36,7 +34,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.2.5 + 3.5.1 org.apache.maven.plugins @@ -194,7 +192,7 @@ org.apache.maven.plugins maven-dependency-plugin - 3.6.1 + 3.8.1 copy-dependencies @@ -214,13 +212,13 @@ org.apache.maven.plugins maven-jar-plugin - 3.3.0 + 3.4.2 true lib/ - org.isf.menu.gui.Menu + org.isf.Application . @@ -298,33 +296,13 @@ org.slf4j slf4j-api - 2.0.12 - - - org.slf4j - slf4j-reload4j - 2.0.12 - - - org.igniterealtime.smack - smack - 3.2.1 - - - org.igniterealtime.smack - smackx - 3.2.1 + 2.0.16 org.imgscalr imgscalr-lib 4.2 - - org.springframework - spring-context - ${spring.framework.version} - com.jgoodies jgoodies-common @@ -355,21 +333,22 @@ LGoodDatePicker 11.2.1 - - org.springframework.boot - spring-boot - ${spring.boot.version} - org.junit.jupiter junit-jupiter-engine - 5.10.2 + 5.11.3 test org.assertj assertj-core - 3.25.3 + 3.26.3 + test + + + org.mockito + mockito-junit-jupiter + 5.14.2 test diff --git a/rpt_base/PharmaceuticalAMC_ver2.jasper b/rpt_base/PharmaceuticalAMC_ver2.jasper new file mode 100644 index 0000000000..35c75a69de Binary files /dev/null and b/rpt_base/PharmaceuticalAMC_ver2.jasper differ diff --git a/rpt_base/PharmaceuticalAMC_ver2.jrxml b/rpt_base/PharmaceuticalAMC_ver2.jrxml new file mode 100644 index 0000000000..5e1063d98e --- /dev/null +++ b/rpt_base/PharmaceuticalAMC_ver2.jrxml @@ -0,0 +1,794 @@ + + + + + + + + + + + + + + + + + + + + + + + + = $P{START_DATE} AND MS_DATE_NEXT_MOV IS NOT NULL AND MS_DATE_NEXT_MOV <= $P{END_DATE}, + DATEDIFF(MS_DATE_NEXT_MOV, MS_DATE_BALANCE), + IF(MS_DATE_BALANCE >= $P{START_DATE} AND MS_DATE_NEXT_MOV IS NOT NULL AND MS_DATE_NEXT_MOV > $P{END_DATE}, + DATEDIFF($P{END_DATE}, MS_DATE_BALANCE), + IF(MS_DATE_BALANCE < $P{START_DATE} AND MS_DATE_NEXT_MOV IS NOT NULL AND MS_DATE_NEXT_MOV <= $P{END_DATE}, + DATEDIFF(MS_DATE_NEXT_MOV, $P{START_DATE}), + IF(MS_DATE_NEXT_MOV IS NULL, + DATEDIFF($P{END_DATE}, MS_DATE_BALANCE), + 0))))), + 0) AS DOS + FROM OH_MEDICALDSRSTOCK + WHERE MS_BALANCE = 0 + AND MS_MDSR_ID = MDSR_ID + AND MS_DATE_BALANCE BETWEEN $P{START_DATE} AND $P{END_DATE}) AS DOS_12_MONTHS, + (SELECT COALESCE( + SUM(IF(MS_DATE_BALANCE >= $P{START_DATE} AND MS_DATE_NEXT_MOV IS NOT NULL AND MS_DATE_NEXT_MOV <= $P{END_DATE}, + DATEDIFF(MS_DATE_NEXT_MOV, MS_DATE_BALANCE) * MS_BALANCE, + IF(MS_DATE_BALANCE >= $P{START_DATE} AND MS_DATE_NEXT_MOV IS NOT NULL AND MS_DATE_NEXT_MOV > $P{END_DATE}, + DATEDIFF($P{END_DATE}, MS_DATE_BALANCE) * MS_BALANCE, + IF(MS_DATE_BALANCE < $P{START_DATE} AND MS_DATE_NEXT_MOV IS NOT NULL AND MS_DATE_NEXT_MOV <= $P{END_DATE}, + DATEDIFF(MS_DATE_NEXT_MOV, $P{START_DATE}) * MS_BALANCE, + IF(MS_DATE_NEXT_MOV IS NULL, + DATEDIFF($P{END_DATE}, MS_DATE_BALANCE) * MS_BALANCE, + 0))))), + 0) AS BALANCE_X_DAYS + FROM OH_MEDICALDSRSTOCK + WHERE MS_MDSR_ID = MDSR_ID + AND (MS_DATE_BALANCE BETWEEN $P{START_DATE} AND $P{END_DATE} + OR MS_DATE_NEXT_MOV BETWEEN $P{START_DATE} AND $P{END_DATE})) AS BALANCE_X_DAYS + FROM OH_MEDICALDSR + LEFT JOIN OH_MEDICALDSRSTOCKMOV ON MDSR_ID = MMV_MDSR_ID + LEFT JOIN OH_MEDICALDSRSTOCKMOVTYPE ON MMVT_ID_A = MMV_MMVT_ID_A + WHERE MMVT_TYPE LIKE '-%' AND MMVT_CATEGORY = 'operational' + AND MDSR_DELETED = 'N' + GROUP BY MDSR_ID, DATE_FORMAT(MMV_DATE,'%Y/%m') + ORDER BY MDSR_ID, DATE(MMV_DATE) DESC) AS MONTHLY +GROUP BY MDSR_CODE]]> + + + + + + + + + + + + + + + + + + + + <band height="95" splitType="Stretch"> + <textField isBlankWhenNull="false"> + <reportElement key="textField-18" x="370" y="0" width="412" height="22" uuid="63af8059-3dde-42a9-bafa-2d775144ff55"/> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineColor="#000000"/> + <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Right"> + <font fontName="DejaVu Sans" size="12" isBold="true"/> + </textElement> + <textFieldExpression><![CDATA[$P{Hospital}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="false"> + <reportElement key="textField-19" x="370" y="22" width="412" height="17" uuid="9a3bce9d-e81e-44fc-9e95-36697f068a82"/> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineColor="#000000"/> + <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Right"/> + <textFieldExpression><![CDATA[$P{Address} + " - " + $P{City}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="false"> + <reportElement key="textField-20" x="370" y="39" width="412" height="17" uuid="ec19e110-fd6f-4496-9be7-a2db19f688f3"/> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineColor="#000000"/> + <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Right"/> + <textFieldExpression><![CDATA[$P{Email}]]></textFieldExpression> + </textField> + <textField isBlankWhenNull="false"> + <reportElement key="textField-21" x="370" y="56" width="412" height="17" uuid="b486e474-285c-4ead-89d6-13725002b4b3"/> + <box> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineColor="#000000"/> + <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Right"/> + <textFieldExpression><![CDATA[$P{Telephone}]]></textFieldExpression> + </textField> + <line> + <reportElement key="line-3" mode="Opaque" x="0" y="94" width="782" height="1" forecolor="#000000" backcolor="#FFFFFF" uuid="cde25c9c-3b2d-40ed-bdf2-03dc5e482904"/> + </line> + <textField> + <reportElement key="staticText-19" x="0" y="40" width="170" height="20" uuid="c26c66d3-7f76-43bc-b8ff-61aacae06a3d"/> + <box leftPadding="10"> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineColor="#000000"/> + <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Left" verticalAlignment="Middle"> + <font fontName="DejaVu Sans" size="10" isBold="true"/> + </textElement> + <textFieldExpression><![CDATA[$R{SOHatDate}+":"]]></textFieldExpression> + </textField> + <textField textAdjust="StretchHeight" pattern="dd/MM/yyyy" isBlankWhenNull="false"> + <reportElement key="textField-39" x="170" y="40" width="80" height="20" uuid="3a4ccfcf-f3ad-4ed8-aeb7-1fcd5d89ee80"/> + <box leftPadding="5"> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineColor="#000000"/> + <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="10"/> + </textElement> + <textFieldExpression><![CDATA[$P{TODAY_DATE}.toLocalDate()]]></textFieldExpression> + </textField> + <textField> + <reportElement key="staticText-20" x="0" y="60" width="170" height="20" uuid="2297c1ca-99bd-47ae-be00-4736d8c8d922"/> + <box leftPadding="10"> + <topPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.25" lineColor="#000000"/> + <rightPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Left" verticalAlignment="Middle"> + <font fontName="DejaVu Sans" size="10" isBold="true"/> + </textElement> + <textFieldExpression><![CDATA[$R{ReferencePeriod}]]></textFieldExpression> + </textField> + <textField textAdjust="StretchHeight" pattern="dd/MM/yyyy" isBlankWhenNull="false"> + <reportElement key="textField-40" x="170" y="60" width="80" height="20" uuid="c744b3c3-db6a-413e-a7a0-2eb2271aad17"/> + <box leftPadding="5"> + <topPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.25" lineColor="#000000"/> + <rightPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="10"/> + </textElement> + <textFieldExpression><![CDATA[$P{START_DATE}.toLocalDate()]]></textFieldExpression> + </textField> + <textField textAdjust="StretchHeight" pattern="dd/MM/yyyy" isBlankWhenNull="false"> + <reportElement key="textField-41" x="250" y="60" width="80" height="20" uuid="035d3411-1236-41cc-a8a1-19525171582f"/> + <box leftPadding="5"> + <topPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.25" lineColor="#000000"/> + <rightPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Center" verticalAlignment="Middle"> + <font size="10"/> + </textElement> + <textFieldExpression><![CDATA[$P{END_DATE}.toLocalDate()]]></textFieldExpression> + </textField> + <textField> + <reportElement key="staticText-19" x="0" y="0" width="370" height="30" uuid="cf55d60b-59e7-4fbc-a70b-e655921f6511"/> + <box leftPadding="5"> + <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + <bottomPen lineWidth="0.0" lineColor="#000000"/> + <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> + </box> + <textElement textAlignment="Left" verticalAlignment="Middle"> + <font fontName="DejaVu Sans" size="14" isBold="true"/> + </textElement> + <textFieldExpression><![CDATA[$R{Title}]]></textFieldExpression> + </textField> + </band> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/rpt_base/PharmaceuticalAMC_ver2.properties b/rpt_base/PharmaceuticalAMC_ver2.properties new file mode 100644 index 0000000000..29110bdfe5 --- /dev/null +++ b/rpt_base/PharmaceuticalAMC_ver2.properties @@ -0,0 +1,27 @@ +#Generated by Eclipse Messages Editor (Eclipse Babel) + +Title = Average Monthly Consumption report + +SOHatDate = Stock on Hand (SOH) date + +ReferencePeriod = Reference Period + +Code = Code + +Description = Description + +Critical = Critical + +SOH = SOH + +FootNotes1 = Stock on Hand (SOH): Displayed in red if the SOH is below the critical level. + +FootNotes2 = Consumptions: Calculated using only the "operational" category of discharges movements. + +FootNotes3 = Stock Levels and Days Out of Stock (DOS): Calculated using all "operational" and "non-operational" movements. + +Date = Date + +Page = Page + +of = of \ No newline at end of file diff --git a/rpt_base/ProductLedger.jasper b/rpt_base/ProductLedger.jasper index 207ec571fc..82f95339c5 100644 Binary files a/rpt_base/ProductLedger.jasper and b/rpt_base/ProductLedger.jasper differ diff --git a/rpt_base/ProductLedger.jrxml b/rpt_base/ProductLedger.jrxml index 4b68a2c798..cff09a0199 100644 --- a/rpt_base/ProductLedger.jrxml +++ b/rpt_base/ProductLedger.jrxml @@ -1,5 +1,5 @@ - + @@ -7,6 +7,7 @@ + @@ -57,7 +58,7 @@ LEFT JOIN OH_MEDICALDSRSTOCKMOV ON MDSR_ID = MMV_MDSR_ID LEFT JOIN OH_MEDICALDSRTYPE ON MDSRT_ID_A = MDSR_MDSRT_ID_A LEFT JOIN OH_MEDICALDSRSTOCKMOVTYPE ON MMV_MMVT_ID_A = MMVT_ID_A - WHERE DATE(MMV_DATE) <= DATE($P{fromdate}) + WHERE DATE(MMV_DATE) < DATE($P{fromdate}) AND MDSR_ID = $P{productID} GROUP BY MDSR_ID, MMV_LT_ID_A, MMV_MMVT_ID_A) AS QUANTITY JOIN OH_MEDICALDSRLOT ON MMV_LT_ID_A = LT_ID_A @@ -70,7 +71,7 @@ LEFT JOIN OH_MEDICALDSRSTOCKMOV ON MDSR_ID = MMV_MDSR_ID LEFT JOIN OH_MEDICALDSRTYPE ON MDSRT_ID_A = MDSR_MDSRT_ID_A LEFT JOIN OH_MEDICALDSRSTOCKMOVTYPE ON MMV_MMVT_ID_A = MMVT_ID_A - WHERE DATE(MMV_DATE) <= DATE($P{fromdate}) + WHERE DATE(MMV_DATE) < DATE($P{fromdate}) AND MDSR_ID = $P{productID} GROUP BY MDSR_ID, MMV_LT_ID_A, MMV_MMVT_ID_A) AS QUANTITY JOIN OH_MEDICALDSRLOT ON MMV_LT_ID_A = LT_ID_A @@ -83,7 +84,7 @@ LEFT JOIN OH_MEDICALDSRSTOCKMOV ON MDSR_ID = MMV_MDSR_ID LEFT JOIN OH_MEDICALDSRTYPE ON MDSRT_ID_A = MDSR_MDSRT_ID_A LEFT JOIN OH_MEDICALDSRSTOCKMOVTYPE ON MMV_MMVT_ID_A = MMVT_ID_A - WHERE DATE(MMV_DATE) <= DATE($P{fromdate}) + WHERE DATE(MMV_DATE) < DATE($P{fromdate}) AND MDSR_ID = $P{productID} GROUP BY MDSR_ID, MMV_LT_ID_A, MMV_MMVT_ID_A) AS QUANTITY JOIN OH_MEDICALDSRLOT ON MMV_LT_ID_A = LT_ID_A @@ -207,6 +208,16 @@ ORDER BY ORDERING_FIELD ASC, MMV_DATE ASC, MMV_REFNO DESC]]> + + + + + + @@ -732,7 +743,7 @@ ORDER BY ORDERING_FIELD ASC, MMV_DATE ASC, MMV_REFNO DESC]]> - + @@ -743,9 +754,11 @@ ORDER BY ORDERING_FIELD ASC, MMV_DATE ASC, MMV_REFNO DESC]]> - + - + @@ -758,7 +771,7 @@ ORDER BY ORDERING_FIELD ASC, MMV_DATE ASC, MMV_REFNO DESC]]> - + @@ -769,9 +782,11 @@ ORDER BY ORDERING_FIELD ASC, MMV_DATE ASC, MMV_REFNO DESC]]> - + - + diff --git a/rpt_base/operationslist_fr.properties b/rpt_base/operationslist_fr.properties new file mode 100644 index 0000000000..bca50fbf18 --- /dev/null +++ b/rpt_base/operationslist_fr.properties @@ -0,0 +1,8 @@ +#Generated by Eclipse Messages Editor (Eclipse Babel) + +Operation.Type = Intervention / Typologie + +Operations.List = Liste Interventions + +InOut.Patient = Patient hospitalisé / ambulatoire + diff --git a/rpt_base/patient_opd_chart_fr.properties b/rpt_base/patient_opd_chart_fr.properties index 20372e688c..5ab6974ab6 100644 --- a/rpt_base/patient_opd_chart_fr.properties +++ b/rpt_base/patient_opd_chart_fr.properties @@ -5,3 +5,19 @@ DoctorSignature = Signature Médecin OpdChart = DDP RAPPORT version = version + +Id = ID + +Date = Date + +Time = Heure + +Type = Typologie + +ClinicalRemarks = Remarques cliniques + +Diagnosis = diagnostic + +SecondDiagnosis = Deuxième diagnostic + +ThirdDiagnosis = Troisième diagnostic diff --git a/rpt_extra/MOH705A_Under_5_Years_Daily_Outpatient_Morbidity_Summary_Sheet_fr.properties b/rpt_extra/MOH705A_Under_5_Years_Daily_Outpatient_Morbidity_Summary_Sheet_fr.properties index c10920c3cb..4b13fd78b0 100644 --- a/rpt_extra/MOH705A_Under_5_Years_Daily_Outpatient_Morbidity_Summary_Sheet_fr.properties +++ b/rpt_extra/MOH705A_Under_5_Years_Daily_Outpatient_Morbidity_Summary_Sheet_fr.properties @@ -15,3 +15,5 @@ Totals = Totales Under5YearsDailyOutpatientMorbiditySummarySheet = MOINS QUE 5 ANS - AMBULATOIRE FEUILLE RÉCAPITULATIVE MORBIDITÉ JOURNALIÈRE Year = ANNÉE + +jTitle = MOH 705A - Moins de 5 ans - Feuille de résumé quotidien de la morbidité en consultation externe diff --git a/rpt_extra/MOH705B_Over_5_Years_Daily_Outpatient_Morbidity_Summary_Sheet_fr.properties b/rpt_extra/MOH705B_Over_5_Years_Daily_Outpatient_Morbidity_Summary_Sheet_fr.properties index 904023d7ad..d10cb1806e 100644 --- a/rpt_extra/MOH705B_Over_5_Years_Daily_Outpatient_Morbidity_Summary_Sheet_fr.properties +++ b/rpt_extra/MOH705B_Over_5_Years_Daily_Outpatient_Morbidity_Summary_Sheet_fr.properties @@ -17,3 +17,5 @@ RepublicOfKenyaMinistryOfHealth = MINISTÈRE DE LA ANTE Totals = Totales Year = ANNÉE + +jTitle = MOH 705B - Plus de 5 ans - Feuille de résumé quotidien de la morbidité chez les patients ambulatoires diff --git a/rpt_extra/MOH717_Monthly_Workload_Report_for_Hospitals_page2b_fr.properties b/rpt_extra/MOH717_Monthly_Workload_Report_for_Hospitals_page2b_fr.properties index 7fc9d8a5dc..793fccbec6 100644 --- a/rpt_extra/MOH717_Monthly_Workload_Report_for_Hospitals_page2b_fr.properties +++ b/rpt_extra/MOH717_Monthly_Workload_Report_for_Hospitals_page2b_fr.properties @@ -82,4 +82,4 @@ XRayNumberOfExaminations = X-Ray - Nombre d'Examens YRS = ANNEES -jTitle = MOH 717 - Monthly Workload Report For Hospitals (page 2b) +jTitle = MOH 717 - Rapport mensuel sur la charge de travail des hôpitaux (page 2b) diff --git a/rpt_extra/hmis033_weekly_epid_surv_over_5_fr.properties b/rpt_extra/hmis033_weekly_epid_surv_over_5_fr.properties index 594d4c8a77..2d27c0424b 100644 --- a/rpt_extra/hmis033_weekly_epid_surv_over_5_fr.properties +++ b/rpt_extra/hmis033_weekly_epid_surv_over_5_fr.properties @@ -17,3 +17,5 @@ In.Patient.Diag.Out = Patient hospitalisé (diag sortie) Out.Patient = Patient Ambulatoire To.DateYear = À DateAnnée + +jTitle = HMIS 33b - Surveillance épidémiologique hebdomadaire des plus de 5 ans diff --git a/rpt_extra/hmis033_weekly_epid_surv_under_5_fr.properties b/rpt_extra/hmis033_weekly_epid_surv_under_5_fr.properties index 7dba3bbe90..0d6350c428 100644 --- a/rpt_extra/hmis033_weekly_epid_surv_under_5_fr.properties +++ b/rpt_extra/hmis033_weekly_epid_surv_under_5_fr.properties @@ -4,7 +4,7 @@ Cases = Cas Dead = Décédé -Diagnosis = Diagnostique +Diagnosis = diagnostic From.Date = Du jour @@ -17,3 +17,5 @@ In.Patient.Diag.Out = Patient hospitalisé (diag sortie) Out.Patient = Patient Ambulatoire To.DateYear = À DateAnnée + +jTitle = HMIS 33b - Surveillance épidémiologique hebdomadaire des plus de 5 ans diff --git a/rpt_extra/hmis055b_lab_monthly_formatted_fr.properties b/rpt_extra/hmis055b_lab_monthly_formatted_fr.properties index 29bd3dcb6c..9a65d84f6c 100644 --- a/rpt_extra/hmis055b_lab_monthly_formatted_fr.properties +++ b/rpt_extra/hmis055b_lab_monthly_formatted_fr.properties @@ -31,3 +31,5 @@ Total.Tests.Done = Total des tests effectués Urine = Urine Year = Année + +jTitle = HMIS 55b - Tests de laboratoire diff --git a/rpt_extra/hmis105_opd_attendance_fr.properties b/rpt_extra/hmis105_opd_attendance_fr.properties index 74edef0c90..b90e81d865 100644 --- a/rpt_extra/hmis105_opd_attendance_fr.properties +++ b/rpt_extra/hmis105_opd_attendance_fr.properties @@ -17,3 +17,5 @@ Month = Mois Under.Five.Years.Older = Âgé moins de cinq ans Year = Année + +jTitle = HMIS 105 - Présence à la consultation ambulatoire diff --git a/rpt_extra/hmis105_opd_referrals_fr.properties b/rpt_extra/hmis105_opd_referrals_fr.properties index a287593b18..43f10b4183 100644 --- a/rpt_extra/hmis105_opd_referrals_fr.properties +++ b/rpt_extra/hmis105_opd_referrals_fr.properties @@ -17,3 +17,5 @@ Month = Mois Under.Five.Years.Older = Âgé moins de cinq ans Year = Année + +jTitle = HMIS 105 - Références ambulatoire diff --git a/rpt_extra/hmis108_cover_fr.properties b/rpt_extra/hmis108_cover_fr.properties index d589f7d0c1..60e3a8db3f 100644 --- a/rpt_extra/hmis108_cover_fr.properties +++ b/rpt_extra/hmis108_cover_fr.properties @@ -25,3 +25,5 @@ ReportVersionPatientDaysDischargedThisMonthDaysDismissionMinusAdmissionPlusOne = To = À: ePatientDays = (E)\nJours Patient + +jTitle = HMIS 108 - Rapport mensuel sur les patients hospitalisés diff --git a/rpt_extra/hmis108_operations_fr.properties b/rpt_extra/hmis108_operations_fr.properties index 6e2a9c7131..072a539b9b 100644 --- a/rpt_extra/hmis108_operations_fr.properties +++ b/rpt_extra/hmis108_operations_fr.properties @@ -21,3 +21,6 @@ TotalCount = Total count Undefined = Non definé Year = Année + +jTitle = HMIS 108 - Rapport mensuel d'activité + diff --git a/rpt_stat/BillsReportMonthlyWard_fr.properties b/rpt_stat/BillsReportMonthlyWard_fr.properties new file mode 100644 index 0000000000..c0e2e92bcf --- /dev/null +++ b/rpt_stat/BillsReportMonthlyWard_fr.properties @@ -0,0 +1,23 @@ +#Generated by Eclipse Messages Editor (Eclipse Babel) + +Billed.Income = Facturé / Revenue + +Cash.Collections = Encaissements + +Month = Mois + +Receivable = Recevable + +Report.From = Rapport de + +To = À + +Periodic.Incomes.Billed.And.Receivables.Report = Rapport periodique Entrées / Facturé et Recevables + +Month.Summary.per.Ward = (synthèse mensuelle par service) + +Summary = Synthèse + +OPD.wards = Services ambulatoires + +jTitle = OH011D - Recettes, revenus et créances (service / mois) diff --git a/rpt_stat/OH005_opd_count_monthly_report_fr.properties b/rpt_stat/OH005_opd_count_monthly_report_fr.properties index b0018f98c0..c40f8a4297 100644 --- a/rpt_stat/OH005_opd_count_monthly_report_fr.properties +++ b/rpt_stat/OH005_opd_count_monthly_report_fr.properties @@ -12,4 +12,6 @@ age = âge category = category -sex = sexe \ No newline at end of file +sex = sexe + +jTitle = OH005 - Nombre de patients ambulatoires par âge et par sexe diff --git a/rpt_stat/OH007_lab_monthly_report_fr.properties b/rpt_stat/OH007_lab_monthly_report_fr.properties index eb9a649d5a..a2907e8770 100644 --- a/rpt_stat/OH007_lab_monthly_report_fr.properties +++ b/rpt_stat/OH007_lab_monthly_report_fr.properties @@ -22,4 +22,6 @@ Negative = Négatif TotalTestsDone = Total des tests effectués -TestsDone = Tests effectués \ No newline at end of file +TestsDone = Tests effectués + +jTitle = OH007 - Rapport mensuel du laboratoire diff --git a/rpt_stat/OH007_lab_result_report_fr.properties b/rpt_stat/OH007_lab_result_report_fr.properties index 50c39b0531..d1b17f7d65 100644 --- a/rpt_stat/OH007_lab_result_report_fr.properties +++ b/rpt_stat/OH007_lab_result_report_fr.properties @@ -16,4 +16,6 @@ Address=Adresse Page=Page -of=sur \ No newline at end of file +of=sur + +jTitle = OH007 - Rapport de résultats de laboratoire diff --git a/rpt_stat/OH008_lab_summary_for_opd_fr.properties b/rpt_stat/OH008_lab_summary_for_opd_fr.properties index 9a54095b53..bd0f777aa1 100644 --- a/rpt_stat/OH008_lab_summary_for_opd_fr.properties +++ b/rpt_stat/OH008_lab_summary_for_opd_fr.properties @@ -26,4 +26,6 @@ Male = M Female = T -TestDone = Test effectué \ No newline at end of file +TestDone = Test effectué + +jTitle = OH008 - Rapport mensuel de laboratoire (ambulatoire uniquement) diff --git a/rsc/database.properties.dist b/rsc/database.properties.dist index a42f5a2a6d..da1db1c2fa 100644 --- a/rsc/database.properties.dist +++ b/rsc/database.properties.dist @@ -1,3 +1,3 @@ -jdbc.url=jdbc:mysql://DBSERVER:DBPORT/DBNAME +jdbc.url=jdbc:mariadb://DBSERVER:DBPORT/DBNAME jdbc.username=DBUSER jdbc.password=DBPASS diff --git a/rsc/log4j.properties.dist b/rsc/log4j.properties.dist deleted file mode 100644 index 74187a2a26..0000000000 --- a/rsc/log4j.properties.dist +++ /dev/null @@ -1,40 +0,0 @@ -# global logging to RollingFile (logs/ folder), available levels INFO, DEBUG, FINEST (debug++) -log4j.rootCategory=INFO,RollingFile - -# Null appender (off) -log4j.appender.null=org.apache.log4j.varia.NullAppender - -# StdOut Appender (with classes) (not used) -log4j.appender.StdOut = org.apache.log4j.ConsoleAppender -log4j.appender.StdOut.layout=org.apache.log4j.PatternLayout -log4j.appender.StdOut.layout.ConversionPattern=[%d{dd/MMM/yyyy HH:mm:ss}] [%X{OHUserGroup}:%X{OHUser}] %-p - %m%n - -# File Appender (with classes), daily rotation -log4j.appender.RollingFile=org.apache.log4j.RollingFileAppender -log4j.appender.RollingFile.PatternLayout.pattern='.'yyyy-MM-dd -log4j.appender.RollingFile.File=LOG_DEST -log4j.appender.RollingFile.layout=org.apache.log4j.PatternLayout -log4j.appender.RollingFile.Policies.TimeBasedTriggeringPolicy=1 -log4j.appender.RollingFile.layout.ConversionPattern=[%d{dd/MMM/yyyy HH:mm:ss}] [%X{OHUserGroup}:%X{OHUser}] %-p - %m (%l)%n - -# DB Appender (table columns) -log4j.appender.DB=org.apache.log4j.jdbc.JDBCAppender -log4j.appender.DB.URL=jdbc:mysql://DBSERVER:DBPORT/DBNAME?autoReconnect=true -log4j.appender.DB.user=DBUSER -log4j.appender.DB.password=DBPASS -log4j.appender.DB.sql=INSERT INTO LOG (LOG_TYPE, LOG_CLASS, LOG_METHOD, LOG_TIME, LOG_MESS, LOG_USER) VALUES (1, '%C', '%M', '%d{yyyy-MM-dd HH:mm:ss}', LEFT('%m', 1024), '%X{OHUser}') -log4j.appender.DB.layout=org.apache.log4j.PatternLayout - -# Security settings - see log4j CVE-2021-44228 -log4j.formatMsgNoLookups=true - -# Assigning appenders to packages (application loggers) -log4j.logger.org.isf=LOG_LEVEL,RollingFile -log4j.additivity.org.isf = false - -# Assigning appenders to Hibernate packages (DB loggers) -# - hibernate.SQL to DEBUG for SQL queries to be logged -# - hibernate.type to TRACE for queries parameters to be logged with "binding parameter [?]" -log4j.logger.org.hibernate=LOG_LEVEL,RollingFile,StdOut -#log4j.logger.org.hibernate.SQL=INFO,RollingFile,StdOut -#log4j.logger.org.hibernate.type=INFO,RollingFile,StdOut diff --git a/rsc/log4j2-spring.properties.dist b/rsc/log4j2-spring.properties.dist new file mode 100755 index 0000000000..5afd7c08ad --- /dev/null +++ b/rsc/log4j2-spring.properties.dist @@ -0,0 +1,58 @@ + +status = INFO +rootLogger.level = INFO +rootLogger.appenderRef.console.ref = STDOUT +rootLogger.appenderRef.rolling.ref = RollingFile + +# Direct log messages to STDOUT +appender.console.type = Console +appender.console.name = STDOUT +appender.console.layout.type = PatternLayout +appender.console.layout.pattern = [%d{dd/MMM/yyyy HH:mm:ss}] [%X{OHUserGroup}:%X{OHUser}] %-p - %m%n + +# File Appender (with classes), daily rotation +appender.rolling.type = RollingFile +appender.rolling.name = RollingFile +appender.rolling.fileName= LOG_DEST/openhospital.log +appender.rolling.filePattern= LOG_DEST/openhospital.log.%d{yyyy-MM-dd} +appender.rolling.layout.type = PatternLayout +appender.rolling.layout.pattern = [%d{dd/MMM/yyyy HH:mm:ss}] [%X{OHUserGroup}:%X{OHUser}] %-p - %m (%l)%n +appender.rolling.policies.type = Policies +# To change log file every day +appender.rolling.policies.time.type = TimeBasedTriggeringPolicy +appender.rolling.policies.time.interval = 1 +appender.rolling.policies.time.modulate = true + + +# DB Appender (table columns) +appender.jdbc.type = JDBC +appender.jdbc.name = jdbc +appender.jdbc.connectionSource.driverClassName = com.mysql.cj.jdbc.Driver +appender.jdbc.connectionSource.type = DriverManager +appender.jdbc.connectionSource.connectionString = dbc:mysql://DBSERVER:DBPORT/DBNAME?autoReconnect=true +appender.jdbc.connectionSource.userName = DBUSER +appender.jdbc.connectionSource.password = DBPASS +appender.jdbc.tableName = logs +appender.jdbc.ignoreExceptions = false +appender.jdbc.columnConfigs[0].type = COLUMN +appender.jdbc.columnConfigs[0].name = LOG_TIME +appender.jdbc.columnConfigs[0].pattern = %d +appender.jdbc.columnConfigs[0].isUnicode = false +appender.jdbc.columnConfigs[1].type = COLUMN +appender.jdbc.columnConfigs[1].name = LOG_LEVEL +appender.jdbc.columnConfigs[1].pattern = %5p +appender.jdbc.columnConfigs[1].isUnicode = false +appender.jdbc.columnConfigs[2].type = COLUMN +appender.jdbc.columnConfigs[2].name = MESSAGE +appender.jdbc.columnConfigs[2].pattern = %mm%ex%n +appender.jdbc.columnConfigs[2].isUnicode = false + + +# Assigning appenders to Hibernate packages (DB loggers) +# - hibernate.SQL to DEBUG for SQL queries to be logged +# - hibernate.type to TRACE for queries parameters to be logged with "binding parameter [?]" +##logger.hibernate-SQL.name=org.hibernate.SQL +##logger.hibernate-SQL.level=DEBUG +## +##logger.hibernate-type.name=org.hibernate.orm.jdbc.bind +##logger.hibernate-type.level=TRACE diff --git a/rsc/settings.properties.dist b/rsc/settings.properties.dist index 3bded160dc..886d240161 100644 --- a/rsc/settings.properties.dist +++ b/rsc/settings.properties.dist @@ -53,7 +53,7 @@ LOTWITHCOST=yes PHARMACEUTICALORDER=PharmaceuticalOrder PHARMACEUTICALSTOCK=PharmaceuticalStock_ver4 PHARMACEUTICALSTOCKLOT=PharmaceuticalStock_ver5 -PHARMACEUTICALAMC=PharmaceuticalAMC +PHARMACEUTICALAMC=PharmaceuticalAMC_ver2 # dicom / imaging settings DICOMMODULEENABLED=yes diff --git a/rsc/sms.properties.dist b/rsc/sms.properties.dist index 9f43c626b2..dd68e21265 100644 --- a/rsc/sms.properties.dist +++ b/rsc/sms.properties.dist @@ -28,6 +28,8 @@ skebby-gateway-service.ribbon.base-url=https://api.skebby.it:443 # USER_KEY and ACCESS_TOKEN avoids the login call every time we need to send sms skebby-gateway-service.accessToken= skebby-gateway-service.userKey= +# message_type: GP for Classic+, TI for Classic, SI for Basic (default) +#skebby-gateway-service.messageType= ################################################################## diff --git a/rsc/version.properties b/rsc/version.properties index 0f50ca8864..2a25d843c3 100644 --- a/rsc/version.properties +++ b/rsc/version.properties @@ -1,4 +1,4 @@ # This file is not meant to be modified by the user VER_MAJOR=1 VER_MINOR=14 -VER_RELEASE=0 +VER_RELEASE=2 diff --git a/src/main/java/org/isf/Application.java b/src/main/java/org/isf/Application.java new file mode 100644 index 0000000000..e65a868eb8 --- /dev/null +++ b/src/main/java/org/isf/Application.java @@ -0,0 +1,33 @@ +/* + * Open Hospital (www.open-hospital.org) + * Copyright © 2006-2024 Informatici Senza Frontiere (info@informaticisenzafrontiere.org) + * + * Open Hospital is a free and open source software for healthcare data management. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * https://www.gnu.org/licenses/gpl-3.0-standalone.html + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.isf; + +import org.isf.menu.gui.Menu; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class Application { + + public static void main(String... args) { + new Menu(args); + } +} diff --git a/src/main/java/org/isf/accounting/gui/BillBrowser.java b/src/main/java/org/isf/accounting/gui/BillBrowser.java index 5c17ffdd0e..530bddfd98 100644 --- a/src/main/java/org/isf/accounting/gui/BillBrowser.java +++ b/src/main/java/org/isf/accounting/gui/BillBrowser.java @@ -101,7 +101,7 @@ * @author Mwithi */ public class BillBrowser extends ModalJFrame implements PatientBillListener { - + protected static final String NO_USERNAME = null; private static final Logger LOGGER = LoggerFactory.getLogger(BillBrowser.class); @@ -193,13 +193,13 @@ public void billInserted(AWTEvent event) { private int[] columnsWidth = { 50, 50, 150, 50, 50, 100, 150, 50, 100, 50 }; private int[] maxWidth = { 70, 150, 150, 150, 200, 100, 150, 50, 100, 50 }; private boolean[] columnsResizable = { false, false, false, false, true, false, false, false, false, false }; - private Class[] columnsClasses = { String.class, Integer.class, String.class, String.class, String.class, Double.class, String.class, String.class, + private Class< ? >[] columnsClasses = { String.class, Integer.class, String.class, String.class, String.class, Double.class, String.class, String.class, Double.class, ImageIcon.class }; private boolean[] alignStringCenter = { false, true, true, true, false, false, true, true, false, false }; private boolean[] alingStringBoldCenter = { false, true, false, false, false, false, false, false, false, false }; private boolean[] showColumn = { !isSingleUser, true, true, true, true, true, true, true, true, true, true }; - //Totals + // Totals private BigDecimal totalToday; private BigDecimal balanceToday; private BigDecimal totalPeriod; @@ -209,7 +209,7 @@ public void billInserted(AWTEvent event) { private int month; private int year; - //Bills & Payments + // Bills & Payments private BillBrowserManager billBrowserManager = Context.getApplicationContext().getBean(BillBrowserManager.class); private List billPeriod; private List paymentsPeriod; @@ -217,7 +217,7 @@ public void billInserted(AWTEvent event) { private String currencyCod; - //Users + // Users private String user = UserBrowsingManager.getCurrentUser(); private List users; @@ -251,7 +251,7 @@ private void initComponents() { @Override public void windowClosing(WindowEvent e) { - //to free memory + // to free memory billPeriod.clear(); users.clear(); dispose(); @@ -284,20 +284,20 @@ private JPanel getJPanelTotals() { return jPanelTotals; } - private GoodDateChooser getJCalendarFrom() { - if (jCalendarFrom == null) { - jCalendarFrom = new GoodDateChooser(LocalDate.now()); - jCalendarFrom.addDateChangeListener(event -> { - LocalDate newDate = event.getNewDate(); - if (newDate != null) { + private GoodDateChooser getJCalendarFrom() { + if (jCalendarFrom == null) { + jCalendarFrom = new GoodDateChooser(LocalDate.now()); + jCalendarFrom.addDateChangeListener(event -> { + LocalDate newDate = event.getNewDate(); + if (newDate != null) { dateFrom = newDate.atStartOfDay(); jButtonToday.setEnabled(true); billInserted(null); - } - }); - } - return jCalendarFrom; - } + } + }); + } + return jCalendarFrom; + } private GoodDateChooser getJCalendarTo() { if (jCalendarTo == null) { @@ -333,10 +333,10 @@ private JButton getJButtonReport() { } Icon icon = new ImageIcon("rsc/icons/calendar_dialog.png"); String option = (String) MessageDialog.inputDialog(this, - icon, - options.toArray(), - options.get(0), - "angal.billbrowser.pleaseselectareport.msg"); + icon, + options.toArray(), + options.get(0), + "angal.billbrowser.pleaseselectareport.msg"); if (option == null) { return; } @@ -374,17 +374,17 @@ private JButton getJButtonReport() { if (options.indexOf(option) == ++i) { month = jComboBoxMonths.getMonth() + 1; LocalDateTime thisMonthFrom = dateFrom.toLocalDate() - .withMonth(month) - .withDayOfMonth(1) - .atStartOfDay() - .truncatedTo(ChronoUnit.SECONDS); + .withMonth(month) + .withDayOfMonth(1) + .atStartOfDay() + .truncatedTo(ChronoUnit.SECONDS); LocalDateTime thisMonthTo = dateTo.toLocalDate() - .withMonth(month) - .withDayOfMonth(YearMonth.of(dateFrom.getYear(), month).lengthOfMonth()) - .atStartOfDay() - .toLocalDate() - .atTime(LocalTime.MAX) - .truncatedTo(ChronoUnit.SECONDS); + .withMonth(month) + .withDayOfMonth(YearMonth.of(dateFrom.getYear(), month).lengthOfMonth()) + .atStartOfDay() + .toLocalDate() + .atTime(LocalTime.MAX) + .truncatedTo(ChronoUnit.SECONDS); from = TimeTools.formatDateTime(thisMonthFrom, DATE_FORMAT_DD_MM_YYYY); to = TimeTools.formatDateTime(thisMonthTo, DATE_FORMAT_DD_MM_YYYY); } @@ -394,11 +394,11 @@ private JButton getJButtonReport() { JMonthChooser monthChooser = new JMonthChooser(); int r = JOptionPane.showConfirmDialog(this, - monthChooser, - MessageBundle.getMessage("angal.billbrowser.month.txt"), - JOptionPane.OK_CANCEL_OPTION, - JOptionPane.PLAIN_MESSAGE, - icon); + monthChooser, + MessageBundle.getMessage("angal.billbrowser.month.txt"), + JOptionPane.OK_CANCEL_OPTION, + JOptionPane.PLAIN_MESSAGE, + icon); if (r == JOptionPane.OK_OPTION) { month = monthChooser.getMonth() + 1; @@ -407,17 +407,17 @@ private JButton getJButtonReport() { } LocalDateTime thisMonthFrom = dateFrom.toLocalDate() - .withMonth(month) - .withDayOfMonth(1) - .atStartOfDay() - .truncatedTo(ChronoUnit.SECONDS); + .withMonth(month) + .withDayOfMonth(1) + .atStartOfDay() + .truncatedTo(ChronoUnit.SECONDS); LocalDateTime thisMonthTo = dateTo.toLocalDate() - .withMonth(month) - .withDayOfMonth(YearMonth.of(dateFrom.getYear(), month).lengthOfMonth()) - .atStartOfDay() - .toLocalDate() - .atTime(LocalTime.MAX) - .truncatedTo(ChronoUnit.SECONDS); + .withMonth(month) + .withDayOfMonth(YearMonth.of(dateFrom.getYear(), month).lengthOfMonth()) + .atStartOfDay() + .toLocalDate() + .atTime(LocalTime.MAX) + .truncatedTo(ChronoUnit.SECONDS); from = TimeTools.formatDateTime(thisMonthFrom, DATE_FORMAT_DD_MM_YYYY); to = TimeTools.formatDateTime(thisMonthTo, DATE_FORMAT_DD_MM_YYYY); } @@ -427,27 +427,27 @@ private JButton getJButtonReport() { Bill bill = null; int selectedRow; int currentTab = jTabbedPaneBills.getSelectedIndex(); - switch(currentTab) { - case 0: - selectedRow = jTableBills.getSelectedRow(); - if (selectedRow >= 0) { - bill = (Bill)jTableBills.getValueAt(selectedRow, -1); - } - break; - case 1: - selectedRow = jTablePending.getSelectedRow(); - if (selectedRow >= 0) { - bill = (Bill)jTablePending.getValueAt(selectedRow, -1); - } - break; - case 2: - selectedRow = jTableClosed.getSelectedRow(); - if (selectedRow >= 0) { - bill = (Bill)jTableClosed.getValueAt(selectedRow, -1); - } - break; - default: - break; + switch (currentTab) { + case 0: + selectedRow = jTableBills.getSelectedRow(); + if (selectedRow >= 0) { + bill = (Bill) jTableBills.getValueAt(selectedRow, -1); + } + break; + case 1: + selectedRow = jTablePending.getSelectedRow(); + if (selectedRow >= 0) { + bill = (Bill) jTablePending.getValueAt(selectedRow, -1); + } + break; + case 2: + selectedRow = jTableClosed.getSelectedRow(); + if (selectedRow >= 0) { + bill = (Bill) jTableClosed.getValueAt(selectedRow, -1); + } + break; + default: + break; } if (bill != null) { patient = bill.getBillPatient(); @@ -466,21 +466,21 @@ private JButton getJButtonReport() { icon = new ImageIcon("rsc/icons/list_dialog.png"); option = (String) MessageDialog.inputDialog(this, - icon, - options.toArray(), - options.get(0), - "angal.billbrowser.pleaseselectareport.msg"); + icon, + options.toArray(), + options.get(0), + "angal.billbrowser.pleaseselectareport.msg"); if (option == null) { return; } if (options.indexOf(option) == 0) { - new GenericReportFromDateToDate(from, to, "rpt_base", GeneralData.BILLSREPORTPENDING, - MessageBundle.getMessage("angal.billbrowser.shortreportonlybaddebt.txt"), false); + new GenericReportFromDateToDate(from, to, "rpt_stat", GeneralData.BILLSREPORTPENDING, + MessageBundle.getMessage("angal.billbrowser.shortreportonlybaddebt.txt"), false); } if (options.indexOf(option) == 1) { - new GenericReportFromDateToDate(from, to, "rpt_base", GeneralData.BILLSREPORT, - MessageBundle.getMessage("angal.billbrowser.fullreportallbills.txt"), false); + new GenericReportFromDateToDate(from, to, "rpt_stat", GeneralData.BILLSREPORT, + MessageBundle.getMessage("angal.billbrowser.fullreportallbills.txt"), false); } }); } @@ -492,7 +492,7 @@ private JButton getJButtonClose() { jButtonClose = new JButton(MessageBundle.getMessage("angal.common.close.btn")); jButtonClose.setMnemonic(MessageBundle.getMnemonic("angal.common.close.btn.key")); jButtonClose.addActionListener(actionEvent -> { - //to free memory + // to free memory billPeriod.clear(); users.clear(); dispose(); @@ -635,7 +635,7 @@ private JButton getJButtonPrintReceipt() { String fromDate = dateFrom.format(DATE_TIME_FORMATTER); String toDate = dateTo.format(DATE_TIME_FORMATTER); new GenericReportBill(billsIdList.get(0), GeneralData.PATIENTBILLGROUPED, patientParent, billsIdList, fromDate, toDate, true, - true); + true); } else { MessageDialog.error(this, "angal.billbrowser.thebillisstillopen.msg"); return; @@ -895,15 +895,15 @@ private JMonthChooser getJComboMonths() { jComboBoxMonths.addPropertyChangeListener("month", propertyChangeEvent -> { month = jComboBoxMonths.getMonth() + 1; dateFrom = dateFrom.toLocalDate() - .withMonth(month) - .withDayOfMonth(1) - .atStartOfDay(); + .withMonth(month) + .withDayOfMonth(1) + .atStartOfDay(); dateTo = dateTo.toLocalDate() - .withMonth(month) - .withDayOfMonth(YearMonth.of(dateFrom.getYear(), month).lengthOfMonth()) - .atStartOfDay() - .toLocalDate() - .atTime(LocalTime.MAX); + .withMonth(month) + .withDayOfMonth(YearMonth.of(dateFrom.getYear(), month).lengthOfMonth()) + .atStartOfDay() + .toLocalDate() + .atTime(LocalTime.MAX); jCalendarFrom.setDate(dateFrom.toLocalDate()); jCalendarTo.setDate(dateTo.toLocalDate()); }); @@ -917,17 +917,17 @@ private JYearChooser getJComboYears() { jComboBoxYears.getModel().addChangeListener(e -> { year = jComboBoxYears.getYear(); dateFrom = LocalDate.now() - .withYear(year) - .withMonth(1) - .withDayOfMonth(1) - .atStartOfDay(); + .withYear(year) + .withMonth(1) + .withDayOfMonth(1) + .atStartOfDay(); dateTo = LocalDate.now() - .withYear(year) - .withMonth(12) - .withDayOfMonth(YearMonth.of(year, 12).lengthOfMonth()) - .atStartOfDay() - .toLocalDate() - .atTime(LocalTime.MAX); + .withYear(year) + .withMonth(12) + .withDayOfMonth(YearMonth.of(year, 12).lengthOfMonth()) + .atStartOfDay() + .toLocalDate() + .atTime(LocalTime.MAX); jCalendarFrom.setDate(dateFrom.toLocalDate()); jCalendarTo.setDate(dateTo.toLocalDate()); }); @@ -1035,31 +1035,31 @@ private JTable getJTableToday() { if (jTableToday == null) { jTableToday = new JTable(); jTableToday.setModel( - new DefaultTableModel(new Object[][] { - { - "" + MessageBundle.getMessage("angal.billbrowser.paidtodaycolon.txt") + "", - currencyCod, - totalToday, - "" + MessageBundle.getMessage("angal.billbrowser.notpaidcolon.txt") + "", - currencyCod, - balanceToday - } - }, - new String[] { "", "", "", "", "", "" }) { - - private static final long serialVersionUID = 1L; - Class[] types = new Class[] { JLabel.class, JLabel.class, Double.class, JLabel.class, JLabel.class, Double.class }; - - @Override - public Class getColumnClass(int columnIndex) { - return types[columnIndex]; - } + new DefaultTableModel(new Object[][] { + { + "" + MessageBundle.getMessage("angal.billbrowser.paidtodaycolon.txt") + "", + currencyCod, + totalToday, + "" + MessageBundle.getMessage("angal.billbrowser.notpaidcolon.txt") + "", + currencyCod, + balanceToday + } + }, + new String[] { "", "", "", "", "", "" }) { + + private static final long serialVersionUID = 1L; + Class< ? >[] types = new Class< ? >[] { JLabel.class, JLabel.class, Double.class, JLabel.class, JLabel.class, Double.class }; + + @Override + public Class< ? > getColumnClass(int columnIndex) { + return types[columnIndex]; + } - @Override - public boolean isCellEditable(int row, int column) { - return false; - } - }); + @Override + public boolean isCellEditable(int row, int column) { + return false; + } + }); jTableToday.getColumnModel().getColumn(1).setMinWidth(3); jTableToday.getColumnModel().getColumn(4).setMinWidth(3); jTableToday.setRowSelectionAllowed(false); @@ -1072,22 +1072,22 @@ private JTable getJTablePeriod() { if (jTablePeriod == null) { jTablePeriod = new JTable(); jTablePeriod.setModel(new DefaultTableModel( - new Object[][] { - { - "" + MessageBundle.getMessage("angal.billbrowser.paidperiodcolon.txt") + "", - currencyCod, - totalPeriod, - "" + MessageBundle.getMessage("angal.billbrowser.notpaidcolon.txt") + "", - currencyCod, - balancePeriod } - }, - new String[] { "", "", "", "", "", "" }) { + new Object[][] { + { + "" + MessageBundle.getMessage("angal.billbrowser.paidperiodcolon.txt") + "", + currencyCod, + totalPeriod, + "" + MessageBundle.getMessage("angal.billbrowser.notpaidcolon.txt") + "", + currencyCod, + balancePeriod } + }, + new String[] { "", "", "", "", "", "" }) { private static final long serialVersionUID = 1L; - Class[] types = new Class[] { JLabel.class, JLabel.class, Double.class, JLabel.class, JLabel.class, Double.class }; + Class< ? >[] types = new Class< ? >[] { JLabel.class, JLabel.class, Double.class, JLabel.class, JLabel.class, Double.class }; @Override - public Class getColumnClass(int columnIndex) { + public Class< ? > getColumnClass(int columnIndex) { return types[columnIndex]; } @@ -1109,28 +1109,27 @@ private JTable getJTableUser() { if (jTableUser == null) { jTableUser = new JTable(); jTableUser.setModel( - new DefaultTableModel(new Object[][] - { { - "" + user + ' ' + MessageBundle.getMessage("angal.billbrowser.todaycolon.txt") + "", - userToday, - "" + user + ' ' + MessageBundle.getMessage("angal.billbrowser.periodcolon.txt") + "", - userPeriod - } }, - new String[] { "", "", "", "" }) { - - private static final long serialVersionUID = 1L; - Class[] types = new Class[] { JLabel.class, Double.class, JLabel.class, Double.class }; - - @Override - public Class getColumnClass(int columnIndex) { - return types[columnIndex]; - } + new DefaultTableModel(new Object[][] { { + "" + user + ' ' + MessageBundle.getMessage("angal.billbrowser.todaycolon.txt") + "", + userToday, + "" + user + ' ' + MessageBundle.getMessage("angal.billbrowser.periodcolon.txt") + "", + userPeriod + } }, + new String[] { "", "", "", "" }) { + + private static final long serialVersionUID = 1L; + Class< ? >[] types = new Class< ? >[] { JLabel.class, Double.class, JLabel.class, Double.class }; + + @Override + public Class< ? > getColumnClass(int columnIndex) { + return types[columnIndex]; + } - @Override - public boolean isCellEditable(int row, int column) { - return false; - } - }); + @Override + public boolean isCellEditable(int row, int column) { + return false; + } + }); jTableUser.setRowSelectionAllowed(false); jTableUser.setGridColor(Color.WHITE); } @@ -1199,9 +1198,9 @@ private void updateTotals() { userPeriod = new BigDecimal(0); List notDeletedBills = billPeriod.stream() - .filter(bill -> !bill.getStatus().equals("D")) - .map(Bill::getId) - .collect(Collectors.toList()); + .filter(bill -> !bill.getStatus().equals("D")) + .map(Bill::getId) + .collect(Collectors.toList()); // Bills in range contribute for Not Paid (balance) balancePeriod = new BalanceTotal(billPeriod).getValue(); @@ -1248,7 +1247,7 @@ private void loadData(String status, String username) { } @Override - public Class getColumnClass(int columnIndex) { + public Class< ? > getColumnClass(int columnIndex) { return columnsClasses[columnIndex]; } diff --git a/src/main/java/org/isf/accounting/gui/BillDataLoader.java b/src/main/java/org/isf/accounting/gui/BillDataLoader.java index 81b816e08f..05618b065c 100644 --- a/src/main/java/org/isf/accounting/gui/BillDataLoader.java +++ b/src/main/java/org/isf/accounting/gui/BillDataLoader.java @@ -47,19 +47,12 @@ public BillDataLoader(List billPeriod, List billFromPayments, Patien } public List loadBills(String status, String username) throws OHServiceException { - List tableArray = new ArrayList<>(); - - switch (status) { - case "O": - tableArray = getPendingBills(status, username); - break; - case "ALL": - tableArray = getAllBills(username); - break; - case "C": - tableArray = getClosedBills(status, username); - break; - } + List tableArray = switch (status) { + case "O" -> getPendingBills(status, username); + case "ALL" -> getAllBills(username); + case "C" -> getClosedBills(status, username); + default -> new ArrayList<>(); + }; tableArray.sort(Collections.reverseOrder()); return tableArray; diff --git a/src/main/java/org/isf/accounting/gui/PatientBillEdit.java b/src/main/java/org/isf/accounting/gui/PatientBillEdit.java index 260a037644..4923780d49 100644 --- a/src/main/java/org/isf/accounting/gui/PatientBillEdit.java +++ b/src/main/java/org/isf/accounting/gui/PatientBillEdit.java @@ -107,8 +107,7 @@ import com.github.lgooddatepicker.zinternaltools.TimeChangeEvent; /** - * Create a single Patient Bill - * it affects tables BILLS, BILLITEMS and BILLPAYMENTS + * Create a single Patient Bill which affects tables BILLS, BILLITEMS and BILLPAYMENTS * * @author Mwithi */ @@ -558,8 +557,7 @@ private void checkBill() { MessageDialog.warning(this, MessageBundle.formatMessage("angal.newbill.somepricesnotfound.fmt.msg", String.join(", ", notFoundPriceList))); } else if (!changedPriceList.isEmpty()) { - int ok = MessageDialog.yesNo(this, MessageBundle.formatMessage( - "angal.newbill.somepriceshavebeenchangeddoyouwanttoupdatetheitemsprices.fmg.msg", String.join(", ", changedPriceList))); + int ok = MessageDialog.yesNo(this, "angal.newbill.somepriceshavebeenchangeddoyouwanttoupdatetheitemsprices.fmt.msg", String.join(", ", changedPriceList)); if (ok == JOptionPane.OK_OPTION) { updatePrices(); } @@ -721,6 +719,8 @@ private JComboBox getJComboBoxPriceList() { thisBill.setPriceList(selectedPricelist); thisBill.setIsList(true); setCurrencyCodeFromList(selectedPricelist); + setPriceListArray(); + checkBill(); updateGUI(); }); } diff --git a/src/main/java/org/isf/admission/gui/AdmittedPatientBrowser.java b/src/main/java/org/isf/admission/gui/AdmittedPatientBrowser.java index 0e2aa065c8..fb611a04cf 100644 --- a/src/main/java/org/isf/admission/gui/AdmittedPatientBrowser.java +++ b/src/main/java/org/isf/admission/gui/AdmittedPatientBrowser.java @@ -1206,15 +1206,11 @@ else if (patientClassBox.getSelectedItem().equals(patientClassItems[1])) { } // sex patient type - Character sex = null; - switch (patientSexBox.getSelectedIndex()) { - case 1: - sex = 'M'; - break; - case 2: - sex = 'F'; - break; - } + Character sex = switch (patientSexBox.getSelectedIndex()) { + case 1 -> 'M'; + case 2 -> 'F'; + default -> null; + }; if (sex != null && !sex.equals(ap.getPatient().getSex())) { continue; diff --git a/src/main/java/org/isf/admission/gui/PatientFolderBrowser.java b/src/main/java/org/isf/admission/gui/PatientFolderBrowser.java index ec84046472..6420b94444 100644 --- a/src/main/java/org/isf/admission/gui/PatientFolderBrowser.java +++ b/src/main/java/org/isf/admission/gui/PatientFolderBrowser.java @@ -452,19 +452,16 @@ public void mouseClicked(MouseEvent mouseEvent) { } } - if (selectedObject instanceof Admission) { + if (selectedObject instanceof Admission ad) { - Admission ad = (Admission) selectedObject; startDate = ad.getAdmDate(); endDate = ad.getDisDate(); - } else if (selectedObject instanceof Opd) { + } else if (selectedObject instanceof Opd opd) { - Opd opd = (Opd) selectedObject; startDate = opd.getDate(); - } else if (selectedObject instanceof PatientExamination) { - PatientExamination exam = (PatientExamination) selectedObject; + } else if (selectedObject instanceof PatientExamination exam) { startDate = exam.getPex_date(); } diff --git a/src/main/java/org/isf/medicals/gui/MedicalBrowser.java b/src/main/java/org/isf/medicals/gui/MedicalBrowser.java index 5b2d8d05f3..231810640a 100644 --- a/src/main/java/org/isf/medicals/gui/MedicalBrowser.java +++ b/src/main/java/org/isf/medicals/gui/MedicalBrowser.java @@ -1,6 +1,6 @@ /* * Open Hospital (www.open-hospital.org) - * Copyright © 2006-2023 Informatici Senza Frontiere (info@informaticisenzafrontiere.org) + * Copyright © 2006-2024 Informatici Senza Frontiere (info@informaticisenzafrontiere.org) * * Open Hospital is a free and open source software for healthcare data management. * @@ -28,8 +28,10 @@ import java.awt.Color; import java.awt.Component; import java.awt.Dimension; +import java.awt.Font; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; +import java.awt.font.TextAttribute; import java.io.File; import java.io.IOException; import java.time.LocalDate; @@ -37,6 +39,7 @@ import java.time.temporal.TemporalAdjusters; import java.util.ArrayList; import java.util.List; +import java.util.Map; import javax.swing.Icon; import javax.swing.ImageIcon; @@ -66,6 +69,7 @@ import org.isf.menu.gui.MainMenu; import org.isf.menu.manager.Context; import org.isf.stat.gui.report.GenericReportFromDateToDate; +import org.isf.stat.gui.report.GenericReportPharmaceuticalAMC; import org.isf.stat.gui.report.GenericReportPharmaceuticalOrder; import org.isf.stat.gui.report.GenericReportPharmaceuticalStock; import org.isf.stat.gui.report.GenericReportPharmaceuticalStockCard; @@ -84,23 +88,18 @@ import com.github.lgooddatepicker.zinternaltools.WrapLayout; /** - * This class shows a complete extended list of medical drugs, - * supplies-sundries, diagnostic kits -reagents, laboratory chemicals. It is - * possible to filter data with a selection combo box - * and edit-insert-delete records - * - * @author bob - * 11-dic-2005 - * modified by alex: - * - product code - * - pieces per packet + * This class shows a complete extended list of medical drugs, supplies-sundries, diagnostic kits -reagents, laboratory chemicals. It is possible to filter data + * with a selection combo box and edit-insert-delete records */ public class MedicalBrowser extends ModalJFrame implements MedicalListener { private static final long serialVersionUID = 1L; private static final Logger LOGGER = LoggerFactory.getLogger(MedicalBrowser.class); - private static final String STR_ALL = MessageBundle.getMessage("angal.common.all.txt").toUpperCase(); + private static final String STR_ALL = MessageBundle.getMessage("angal.common.all.txt"); + + private static final String STR_ACTIVE_ONLY = MessageBundle.getMessage("angal.medicals.activeonly.txt"); + private static final String STR_DISABLED_ONLY = MessageBundle.getMessage("angal.medicals.disabledonly.txt"); @Override public void medicalInserted(Medical medical) { @@ -122,17 +121,21 @@ public void medicalUpdated(AWTEvent e) { table.setRowSelectionInterval(selectedrow, selectedrow); } repaint(); - + activeComboBox.setSelectedItem(activeComboBox.getSelectedItem()); // simulate selections + int keyCode = 0; // simulate ENTER on the search field + KeyEvent enterPressed = new KeyEvent(searchString, KeyEvent.KEY_TYPED, System.currentTimeMillis(), 0, keyCode, '\n'); + searchString.dispatchEvent(enterPressed); } private int selectedrow; private JComboBox pbox; + private JComboBox activeComboBox; private List pMedicals; private String[] pColumns = { MessageBundle.getMessage("angal.common.type.txt").toUpperCase(), MessageBundle.getMessage("angal.common.code.txt").toUpperCase(), MessageBundle.getMessage("angal.common.description.txt").toUpperCase(), - MessageBundle.getMessage("angal.medicals.pcsperpck.col"), // not uppercased so column reads better + MessageBundle.getMessage("angal.medicals.pcsperpck.col"), // not uppercased so column reads better MessageBundle.getMessage("angal.medicals.stock.col").toUpperCase(), MessageBundle.getMessage("angal.medicals.critlevel.col").toUpperCase(), MessageBundle.getMessage("angal.medicals.outofstock.col").toUpperCase() @@ -147,6 +150,7 @@ public void medicalUpdated(AWTEvent e) { private final JFrame me; private String pSelection; + private String activeSelection = STR_ACTIVE_ONLY; private JTextField searchString; protected boolean altKeyReleased = true; private String lastKey = ""; @@ -195,6 +199,7 @@ private JTable getJTable() { model = new MedicalBrowsingModel(); table = new JTable(model); table.setAutoCreateRowSorter(true); + table.setAutoCreateColumnsFromModel(false); table.setDefaultRenderer(Object.class, new ColorTableCellRenderer()); for (int i = 0; i < pColumnWidth.length; i++) { table.getColumnModel().getColumn(i).setMinWidth(pColumnWidth[i]); @@ -208,6 +213,7 @@ private JTable getJTable() { private JPanel getJButtonPanel() { JPanel buttonPanel = new JPanel(new WrapLayout()); + buttonPanel.add(getComboBoxActive()); buttonPanel.add(new JLabel(MessageBundle.getMessage("angal.medicals.selecttype"))); buttonPanel.add(getComboBoxMedicalType()); buttonPanel.add(getSearchBox()); @@ -234,7 +240,46 @@ private JButton getJButtonAMC() { if (buttonAMC == null) { buttonAMC = new JButton(MessageBundle.getMessage("angal.medicals.averagemonthlyconsumption.btn")); buttonAMC.setMnemonic(MessageBundle.getMnemonic("angal.medicals.averagemonthlyconsumption.btn.key")); - buttonAMC.addActionListener(actionEvent -> new GenericReportPharmaceuticalOrder(GeneralData.PHARMACEUTICALAMC)); + buttonAMC.addActionListener(actionEvent -> { + + List dateOptions = new ArrayList<>(); + dateOptions.add(MessageBundle.getMessage("angal.medicals.today")); + dateOptions.add(MessageBundle.getMessage("angal.common.date.txt")); + + Icon icon = new ImageIcon("rsc/icons/calendar_dialog.png"); //$NON-NLS-1$ + String dateOption = (String) MessageDialog.inputDialog(this, + icon, + dateOptions.toArray(), + dateOptions.get(0), + "angal.medicals.pleaseselectareport.msg"); + + if (dateOption == null) { + return; + } + int i = 0; + if (dateOptions.indexOf(dateOption) == i) { + new GenericReportPharmaceuticalAMC(null, GeneralData.PHARMACEUTICALAMC, false); + new GenericReportPharmaceuticalAMC(null, GeneralData.PHARMACEUTICALAMC, true); + return; + } + if (dateOptions.indexOf(dateOption) == ++i) { + + icon = new ImageIcon("rsc/icons/calendar_dialog.png"); //$NON-NLS-1$ + + GoodDateChooser dateChooser = new GoodDateChooser(LocalDate.now(), true, false); + int r = JOptionPane.showConfirmDialog(this, + dateChooser, + MessageBundle.getMessage("angal.common.date.txt"), + JOptionPane.OK_CANCEL_OPTION, + JOptionPane.PLAIN_MESSAGE, + icon); + + if (r == JOptionPane.OK_OPTION) { + new GenericReportPharmaceuticalAMC(dateChooser.getDateEndOfDay(), GeneralData.PHARMACEUTICALAMC, false); + new GenericReportPharmaceuticalAMC(dateChooser.getDateEndOfDay(), GeneralData.PHARMACEUTICALAMC, true); + } + } + }); } return buttonAMC; } @@ -306,10 +351,10 @@ private JButton getJButtonStock() { Icon icon = new ImageIcon("rsc/icons/calendar_dialog.png"); //$NON-NLS-1$ String dateOption = (String) MessageDialog.inputDialog(this, - icon, - dateOptions.toArray(), - dateOptions.get(0), - "angal.medicals.pleaseselectareport.msg"); + icon, + dateOptions.toArray(), + dateOptions.get(0), + "angal.medicals.pleaseselectareport.msg"); if (dateOption == null) { return; @@ -320,10 +365,10 @@ private JButton getJButtonStock() { lotOptions.add(MessageBundle.getMessage("angal.medicals.withlot")); String lotOption = (String) MessageDialog.inputDialog(this, - icon, - lotOptions.toArray(), - lotOptions.get(0), - "angal.medicals.pleaseselectareport.msg"); + icon, + lotOptions.toArray(), + lotOptions.get(0), + "angal.medicals.pleaseselectareport.msg"); /* Getting Report parameters */ String sortBy; @@ -332,7 +377,7 @@ private JButton getJButtonStock() { if (pbox.getSelectedItem() instanceof MedicalType) { groupBy = ((MedicalType) pbox.getSelectedItem()).getDescription(); } - List sortedKeys = table.getRowSorter().getSortKeys(); + List< ? > sortedKeys = table.getRowSorter().getSortKeys(); if (!sortedKeys.isEmpty()) { int sortedColumn = ((SortKey) sortedKeys.get(0)).getColumn(); SortOrder sortedOrder = ((SortKey) sortedKeys.get(0)).getSortOrder(); @@ -349,7 +394,7 @@ private JButton getJButtonStock() { sortBy = columnName + ' ' + columnOrder; } - } else { //default values + } else { // default values groupBy = "%%"; sortBy = "MDSRT_DESC, MDSR_DESC"; } @@ -375,11 +420,11 @@ private JButton getJButtonStock() { GoodDateChooser dateChooser = new GoodDateChooser(LocalDate.now(), true, false); int r = JOptionPane.showConfirmDialog(this, - dateChooser, - MessageBundle.getMessage("angal.common.date.txt"), - JOptionPane.OK_CANCEL_OPTION, - JOptionPane.PLAIN_MESSAGE, - icon); + dateChooser, + MessageBundle.getMessage("angal.common.date.txt"), + JOptionPane.OK_CANCEL_OPTION, + JOptionPane.PLAIN_MESSAGE, + icon); if (r == JOptionPane.OK_OPTION) { new GenericReportPharmaceuticalStock(dateChooser.getDateEndOfDay(), report, filter, groupBy, sortBy, false); @@ -411,7 +456,7 @@ private JButton getJButtonStockCard() { if (!dataRange.isCancel()) { new GenericReportPharmaceuticalStockCard("ProductLedger", dateFrom.atStartOfDay(), dateTo.atTime(LocalTime.MAX), medical, - null, toExcel); + null, toExcel); } } }); @@ -446,9 +491,9 @@ private JButton getJButtonReport() { } } catch (IOException exc) { JOptionPane.showMessageDialog(this, - exc.getMessage(), - MessageBundle.getMessage("angal.messagedialog.error.title"), - JOptionPane.PLAIN_MESSAGE); + exc.getMessage(), + MessageBundle.getMessage("angal.messagedialog.error.title"), + JOptionPane.PLAIN_MESSAGE); LOGGER.error("Export to excel error : {}", exc.getMessage()); } } @@ -459,8 +504,8 @@ private JButton getJButtonReport() { private String compileFileName() { StringBuilder filename = new StringBuilder(MessageBundle.getMessage("angal.medicals.stock.txt")); if (pbox.isEnabled() - && !pbox.getSelectedItem().equals( - MessageBundle.getMessage("angal.common.all.txt").toUpperCase())) { + && !pbox.getSelectedItem().equals( + MessageBundle.getMessage("angal.common.all.txt").toUpperCase())) { filename.append('_').append(pbox.getSelectedItem()); } @@ -514,7 +559,7 @@ private JButton getJButtonNew() { buttonNew.setMnemonic(MessageBundle.getMnemonic("angal.common.new.btn.key")); buttonNew.addActionListener(actionEvent -> { // medical will reference the new record - medical = new Medical(null, new MedicalType("", ""), "", "", 0, 0, 0, 0, 0); + medical = new Medical(null, new MedicalType("", ""), "", "", 0, 0, 0, 0); MedicalEdit newrecord = new MedicalEdit(medical, true, me); newrecord.addMedicalListener(this); newrecord.setVisible(true); @@ -522,10 +567,32 @@ private JButton getJButtonNew() { return buttonNew; } + private JComboBox getComboBoxActive() { + if (activeComboBox == null) { + activeComboBox = new JComboBox(); + activeComboBox.addItem(STR_ACTIVE_ONLY); + activeComboBox.addItem(STR_ALL); + activeComboBox.addItem(STR_DISABLED_ONLY); + activeSelection = STR_ACTIVE_ONLY; + } + activeComboBox.addActionListener(actionEvent -> { + activeSelection = activeComboBox.getSelectedItem().toString(); + if (pSelection.compareTo(STR_ALL) == 0) { + model = new MedicalBrowsingModel(); + } else { + model = new MedicalBrowsingModel(pSelection, true); + } + table.setModel(model); + model.fireTableDataChanged(); + table.updateUI(); + }); + return activeComboBox; + } + private JComboBox getComboBoxMedicalType() { if (pbox == null) { pbox = new JComboBox(); - pbox.addItem(MessageBundle.getMessage("angal.common.all.txt").toUpperCase()); + pbox.addItem(STR_ALL); List type; try { type = medicalTypeManager.getMedicalType(); @@ -535,6 +602,7 @@ private JComboBox getComboBoxMedicalType() { } catch (OHServiceException e) { OHServiceExceptionUtil.showMessages(e); } + pSelection = STR_ALL; } pbox.addActionListener(actionEvent -> { pSelection = pbox.getSelectedItem().toString(); @@ -562,10 +630,10 @@ protected void launchExpiringReport() { Icon icon = new ImageIcon("rsc/icons/calendar_dialog.png"); //$NON-NLS-1$ String option = (String) MessageDialog.inputDialog(this, - icon, - options.toArray(), - options.get(0), - "angal.medicals.pleaseselectperiod.msg"); + icon, + options.toArray(), + options.get(0), + "angal.medicals.pleaseselectperiod.msg"); if (option == null) { return; @@ -581,7 +649,7 @@ protected void launchExpiringReport() { to = from; } if (options.indexOf(option) == ++i) { - //this month + // this month LocalDate gc = getFromDate(); from = TimeTools.formatDateTime(gc.atStartOfDay(), DATE_FORMAT_DD_MM_YYYY); @@ -590,17 +658,17 @@ protected void launchExpiringReport() { } if (options.indexOf(option) == ++i) { from = TimeTools.formatDateTime(getFromDate().atStartOfDay(), DATE_FORMAT_DD_MM_YYYY); - //next month + // next month to = TimeTools.formatDateTime(getToDatePlusMonth(1).atTime(LocalTime.MAX), DATE_FORMAT_DD_MM_YYYY); } if (options.indexOf(option) == ++i) { from = TimeTools.formatDateTime(getFromDate().atStartOfDay(), DATE_FORMAT_DD_MM_YYYY); - //next two month + // next two month to = TimeTools.formatDateTime(getToDatePlusMonth(2).atTime(LocalTime.MAX), DATE_FORMAT_DD_MM_YYYY); } if (options.indexOf(option) == ++i) { from = TimeTools.formatDateTime(getFromDate().atStartOfDay(), DATE_FORMAT_DD_MM_YYYY); - //next three month + // next three month to = TimeTools.formatDateTime(getToDatePlusMonth(3).atTime(LocalTime.MAX), DATE_FORMAT_DD_MM_YYYY); } if (options.indexOf(option) == ++i) { @@ -608,11 +676,11 @@ protected void launchExpiringReport() { icon = new ImageIcon("rsc/icons/calendar_dialog.png"); //$NON-NLS-1$ JMonthYearChooser monthYearChooser = new JMonthYearChooser(); int r = JOptionPane.showConfirmDialog(this, - monthYearChooser, - MessageBundle.getMessage("angal.billbrowser.month.txt"), - JOptionPane.OK_CANCEL_OPTION, - JOptionPane.PLAIN_MESSAGE, - icon); + monthYearChooser, + MessageBundle.getMessage("angal.billbrowser.month.txt"), + JOptionPane.OK_CANCEL_OPTION, + JOptionPane.PLAIN_MESSAGE, + icon); if (r == JOptionPane.OK_OPTION) { monthYear = monthYearChooser.getLocalDate(); @@ -623,17 +691,17 @@ protected void launchExpiringReport() { LocalDate fromDate = getFromDate(); from = TimeTools.formatDateTime(fromDate.atStartOfDay(), DATE_FORMAT_DD_MM_YYYY); LocalDate toDate = monthYear; - toDate = toDate.with (TemporalAdjusters.lastDayOfMonth()); + toDate = toDate.with(TemporalAdjusters.lastDayOfMonth()); to = TimeTools.formatDateTime(toDate.atTime(LocalTime.MAX), DATE_FORMAT_DD_MM_YYYY); } new GenericReportFromDateToDate( - from, - to, - "rpt_base", - "PharmaceuticalExpiration", - MessageBundle.getMessage("angal.medicals.expiringreport"), - false); + from, + to, + "rpt_base", + "PharmaceuticalExpiration", + MessageBundle.getMessage("angal.medicals.expiringreport"), + false); } private LocalDate getToDatePlusMonth(int monthsToMove) { @@ -655,6 +723,11 @@ public MedicalBrowsingModel(String key, boolean isType) { if (isType) { try { medicalList = pMedicals = medicalBrowsingManager.getMedicals(key, false); + if (activeSelection.equals(STR_ACTIVE_ONLY)) { + medicalList = pMedicals = new ArrayList<>(pMedicals.stream().filter(med -> med.getDeleted() == 'N').toList()); + } else if (activeSelection.equals(STR_DISABLED_ONLY)) { + medicalList = pMedicals = new ArrayList<>(pMedicals.stream().filter(med -> med.getDeleted() == 'Y').toList()); + } } catch (OHServiceException e) { pMedicals = null; OHServiceExceptionUtil.showMessages(e); @@ -692,6 +765,11 @@ public MedicalBrowsingModel(String key, boolean isType) { public MedicalBrowsingModel() { try { medicalList = pMedicals = medicalBrowsingManager.getMedicals(null, false); + if (activeSelection.equals(STR_ACTIVE_ONLY)) { + medicalList = pMedicals = new ArrayList<>(pMedicals.stream().filter(med -> med.getDeleted() == 'N').toList()); + } else if (activeSelection.equals(STR_DISABLED_ONLY)) { + medicalList = pMedicals = new ArrayList<>(pMedicals.stream().filter(med -> med.getDeleted() == 'Y').toList()); + } } catch (OHServiceException e) { pMedicals = null; OHServiceExceptionUtil.showMessages(e); @@ -699,7 +777,7 @@ public MedicalBrowsingModel() { } @Override - public Class getColumnClass(int c) { + public Class< ? > getColumnClass(int c) { if (c == 0) { return String.class; } else if (c == 1) { @@ -774,10 +852,10 @@ class ColorTableCellRenderer extends DefaultTableCellRenderer { @Override public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, - boolean hasFocus, int row, int column) { + boolean hasFocus, int row, int column) { Component cell = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); cell.setForeground(Color.BLACK); - Medical med = pMedicals.get(row); + Medical med = (Medical) table.getValueAt(row, -1); double actualQty = med.getInitialqty() + med.getInqty() - med.getOutqty(); if ((boolean) table.getValueAt(row, 6)) { cell.setForeground(Color.GRAY); // out of stock @@ -785,6 +863,11 @@ public Component getTableCellRendererComponent(JTable table, Object value, boole if (med.getMinqty() != 0 && actualQty <= med.getMinqty()) { cell.setForeground(Color.RED); // under critical level } + if (activeSelection.equals(STR_ALL) && med.getDeleted() == 'Y') { + Map attributes = cell.getFont().getAttributes(); + attributes.put(TextAttribute.STRIKETHROUGH, TextAttribute.STRIKETHROUGH_ON); + cell.setFont(new Font(attributes)); + } return cell; } } diff --git a/src/main/java/org/isf/medicals/gui/MedicalEdit.java b/src/main/java/org/isf/medicals/gui/MedicalEdit.java index ff47f1668f..61825d0143 100644 --- a/src/main/java/org/isf/medicals/gui/MedicalEdit.java +++ b/src/main/java/org/isf/medicals/gui/MedicalEdit.java @@ -1,6 +1,6 @@ /* * Open Hospital (www.open-hospital.org) - * Copyright © 2006-2023 Informatici Senza Frontiere (info@informaticisenzafrontiere.org) + * Copyright © 2006-2024 Informatici Senza Frontiere (info@informaticisenzafrontiere.org) * * Open Hospital is a free and open source software for healthcare data management. * @@ -29,6 +29,7 @@ import java.util.List; import javax.swing.JButton; +import javax.swing.JCheckBox; import javax.swing.JComboBox; import javax.swing.JDialog; import javax.swing.JFrame; @@ -58,12 +59,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -/** - * 18-ago-2008 - * added by alex: - * - product code - * - pieces per packet - */ public class MedicalEdit extends JDialog { private static final long serialVersionUID = 1L; @@ -71,19 +66,20 @@ public class MedicalEdit extends JDialog { private static final Logger LOGGER = LoggerFactory.getLogger(MedicalEdit.class); private EventListenerList medicalListeners = new EventListenerList(); - + public interface MedicalListener extends EventListener { - void medicalUpdated(AWTEvent e); - void medicalInserted(Medical medical); - } - public void addMedicalListener(MedicalListener l) { - medicalListeners.add(MedicalListener.class, l); - } + void medicalUpdated(AWTEvent e); + void medicalInserted(Medical medical); + } - public void removeMedicalListener(MedicalListener listener) { - medicalListeners.remove(MedicalListener.class, listener); - } + public void addMedicalListener(MedicalListener l) { + medicalListeners.add(MedicalListener.class, l); + } + + public void removeMedicalListener(MedicalListener listener) { + medicalListeners.remove(MedicalListener.class, listener); + } private void fireMedicalInserted(Medical medical) { new AWTEvent(new Object(), AWTEvent.RESERVED_ID_MAX + 1) { @@ -119,6 +115,7 @@ private void fireMedicalUpdated() { private VoLimitedTextField codeTextField; private VoDoubleTextField minQtiField; private JComboBox typeComboBox; + private JCheckBox activeCheckbox; private Medical oldMedical; private Medical medical; private boolean insert; @@ -127,8 +124,7 @@ private void fireMedicalUpdated() { private MedicalBrowsingManager medicalBrowsingManager = Context.getApplicationContext().getBean(MedicalBrowsingManager.class); /** - * This is the default constructor; we pass the arraylist and the - * selectedrow because we need to update them + * This is the default constructor; we pass the arraylist and the selectedrow because we need to update them */ public MedicalEdit(Medical old, boolean inserting, JFrame owner) { super(owner, true); @@ -184,8 +180,9 @@ private JPanel getDataPanel() { JLabel typeLabel = new JLabel(MessageBundle.getMessage("angal.medicals.type") + ':'); JLabel codeLabel = new JLabel(MessageBundle.getMessage("angal.common.code.txt") + ':'); JLabel descLabel = new JLabel(MessageBundle.getMessage("angal.common.description.txt") + ':'); - JLabel pcsperpckLabel = new JLabel(MessageBundle.getMessage("angal.medicals.pcsperpckExt") + ':'); - JLabel criticLabel = new JLabel(MessageBundle.getMessage("angal.medicals.criticallevel") + ':'); + JLabel pcsperpckLabel = new JLabel(MessageBundle.getMessage("angal.medicals.pcsperpck.txt") + ':'); + JLabel criticLabel = new JLabel(MessageBundle.getMessage("angal.medicals.criticallevel.txt") + ':'); + JLabel activeLabel = new JLabel(MessageBundle.getMessage("angal.medicals.active.txt") + ':'); dataPanel.add(typeLabel); dataPanel.add(getTypeComboBox()); @@ -197,11 +194,21 @@ private JPanel getDataPanel() { dataPanel.add(getPcsperpckField()); dataPanel.add(criticLabel); dataPanel.add(getMinQtiField()); - SpringUtilities.makeCompactGrid(dataPanel, 5, 2, 5, 5, 5, 5); + dataPanel.add(activeLabel); + dataPanel.add(getActiveField()); + SpringUtilities.makeCompactGrid(dataPanel, 6, 2, 5, 5, 5, 5); } return dataPanel; } + private JCheckBox getActiveField() { + if (activeCheckbox == null) { + activeCheckbox = new JCheckBox("Active"); + activeCheckbox.setSelected(medical.getDeleted() == 'N'); + } + return activeCheckbox; + } + /** * This method initializes buttonPanel * @@ -240,6 +247,7 @@ private JButton getOkButton() { okButton = new JButton(MessageBundle.getMessage("angal.common.ok.btn")); okButton.setMnemonic(MessageBundle.getMnemonic("angal.common.ok.btn.key")); okButton.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent e) { boolean result = false; @@ -252,6 +260,7 @@ public void actionPerformed(ActionEvent e) { newMedical.setProdCode(codeTextField.getText()); newMedical.setPcsperpck(pcsperpckField.getValue()); newMedical.setMinqty(minQtiField.getValue()); + newMedical.setDeleted(activeCheckbox.isSelected() ? 'N' : 'Y'); } catch (CloneNotSupportedException cloneNotSupportedException) { LOGGER.error(cloneNotSupportedException.getMessage(), cloneNotSupportedException); } @@ -293,6 +302,7 @@ public void actionPerformed(ActionEvent e) { oldMedical.setProdCode(codeTextField.getText()); oldMedical.setPcsperpck(pcsperpckField.getValue()); oldMedical.setMinqty(minQtiField.getValue()); + oldMedical.setDeleted(activeCheckbox.isSelected() ? 'N' : 'Y'); try { Medical updatedMedical = medicalBrowsingManager.updateMedical(oldMedical); if (updatedMedical != null) { @@ -335,6 +345,7 @@ public void actionPerformed(ActionEvent e) { medical.setPcsperpck(pcsperpckField.getValue()); medical.setMinqty(minQtiField.getValue()); medical.setLock(updatedMedical.getLock()); + medical.setDeleted(updatedMedical.getDeleted()); fireMedicalUpdated(); dispose(); } @@ -345,10 +356,10 @@ public void actionPerformed(ActionEvent e) { } private int manageSimilarFoundWarning(OHExceptionMessage error) { - /* Already shown by OHServiceExceptionUtil - int messageType = error.getLevel().getSwingSeverity(); - JOptionPane.showMessageDialog(MedicalEdit.this, error.getMessage(), - error.getTitle(), messageType);*/ + /* + * Already shown by OHServiceExceptionUtil int messageType = error.getLevel().getSwingSeverity(); + * JOptionPane.showMessageDialog(MedicalEdit.this, error.getMessage(), error.getTitle(), messageType); + */ return MessageDialog.yesNoCancel(MedicalEdit.this, "angal.common.doyouwanttoproceed.msg"); } }); @@ -420,19 +431,16 @@ private JTextField getPcsperpckField() { private JComboBox getTypeComboBox() { if (typeComboBox == null) { typeComboBox = new JComboBox<>(); - if (insert) { - List types; - try { - types = medicalTypeManager.getMedicalType(); - for (MedicalType elem : types) { - typeComboBox.addItem(elem); - } - } catch (OHServiceException e) { - OHServiceExceptionUtil.showMessages(e); + try { + List types = medicalTypeManager.getMedicalType(); + for (MedicalType elem : types) { + typeComboBox.addItem(elem); } - } else { - typeComboBox.addItem(medical.getType()); - typeComboBox.setEnabled(false); + } catch (OHServiceException e) { + OHServiceExceptionUtil.showMessages(e); + } + if (!insert) { + typeComboBox.setSelectedItem(medical.getType()); } } return typeComboBox; diff --git a/src/main/java/org/isf/medicalstock/gui/MovStockBrowser.java b/src/main/java/org/isf/medicalstock/gui/MovStockBrowser.java index 72cd9f8a60..99ab7dc533 100644 --- a/src/main/java/org/isf/medicalstock/gui/MovStockBrowser.java +++ b/src/main/java/org/isf/medicalstock/gui/MovStockBrowser.java @@ -49,6 +49,7 @@ import javax.swing.BorderFactory; import javax.swing.BoxLayout; +import javax.swing.DefaultListCellRenderer; import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JCheckBox; @@ -56,6 +57,7 @@ import javax.swing.JFileChooser; import javax.swing.JFrame; import javax.swing.JLabel; +import javax.swing.JList; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JScrollPane; @@ -63,6 +65,8 @@ import javax.swing.JTextField; import javax.swing.ScrollPaneConstants; import javax.swing.SwingConstants; +import javax.swing.ToolTipManager; +import javax.swing.UIManager; import javax.swing.WindowConstants; import javax.swing.table.DefaultTableCellRenderer; import javax.swing.table.DefaultTableModel; @@ -102,25 +106,31 @@ import com.github.lgooddatepicker.zinternaltools.WrapLayout; /** - * MovStockBrowser - list medicals movement. let the user search for movements - * and insert a new movements + * MovStockBrowser - list medicals movement. Let the user search for movements and insert a new movement. */ public class MovStockBrowser extends ModalJFrame { + private static final int defaultInitDelay = ToolTipManager.sharedInstance().getInitialDelay(); + private static final Color defaultBackgroundColor = (Color) UIManager.get("ToolTip.background"); + private static final long serialVersionUID = 1L; private static final Logger LOGGER = LoggerFactory.getLogger(MovStockBrowser.class); private static final String FROM_LABEL = MessageBundle.getMessage("angal.common.from.txt") + ':'; private static final String TO_LABEL = MessageBundle.getMessage("angal.common.to.txt") + ':'; + private static final String TEXT_ALL = MessageBundle.getMessage("angal.common.all.txt"); + private static final String TEXT_ALLCHARGES = MessageBundle.getMessage("angal.medicalstock.allcharges.txt"); + private static final String TEXT_ALLDISCHARGES = MessageBundle.getMessage("angal.medicalstock.alldischarges.txt"); private static final DateTimeFormatter DATE_FORMATTER = DateTimeFormatter.ofPattern(DATE_FORMAT_DD_MM_YYYY); private final JFrame myFrame; private JButton filterButton; + private JButton resetButton; private JCheckBox jCheckBoxKeepFilter; private JComboBox medicalBox; private JComboBox medicalTypeBox; - private JComboBox typeBox; + private JComboBox movementTypeBox; private JComboBox wardBox; private GoodDateChooser movDateFrom; private GoodDateChooser movDateTo; @@ -137,28 +147,31 @@ public class MovStockBrowser extends ModalJFrame { private String[] pColumns = { MessageBundle.getMessage("angal.medicalstock.refno.col").toUpperCase(), // 1 MessageBundle.getMessage("angal.common.date.txt").toUpperCase(), // 2 + MessageBundle.getMessage("angal.medicalstock.category.col").toUpperCase(), // 3 MessageBundle.getMessage("angal.common.type.txt").toUpperCase(), // 3 MessageBundle.getMessage("angal.common.ward.txt").toUpperCase(), // 4 MessageBundle.getMessage("angal.common.qty.txt").toUpperCase(), // 5 - MessageBundle.getMessage("angal.medicalstock.pharmaceutical.col").toUpperCase(), // 6 - MessageBundle.getMessage("angal.medicalstock.medtype.col").toUpperCase(), // 7 - MessageBundle.getMessage("angal.medicalstock.lot.col").toUpperCase(), // 8 - MessageBundle.getMessage("angal.medicalstock.prepdate.col").toUpperCase(), // 9 - MessageBundle.getMessage("angal.medicalstock.duedate.col").toUpperCase(), // 10 - MessageBundle.getMessage("angal.medicalstock.origin.col").toUpperCase(), // 11 - MessageBundle.getMessage("angal.medicalstock.cost.col").toUpperCase(), // 12 - MessageBundle.getMessage("angal.common.total.txt").toUpperCase(), // 13 - MessageBundle.getMessage("angal.common.userid").toUpperCase() // 14 + MessageBundle.getMessage("angal.common.code.txt").toUpperCase(), // 6 + MessageBundle.getMessage("angal.medicalstock.pharmaceutical.col").toUpperCase(), // 7 + MessageBundle.getMessage("angal.medicalstock.medtype.col").toUpperCase(), // 8 + MessageBundle.getMessage("angal.medicalstock.lot.col").toUpperCase(), // 9 + MessageBundle.getMessage("angal.medicalstock.prepdate.col").toUpperCase(), // 10 + MessageBundle.getMessage("angal.medicalstock.duedate.col").toUpperCase(), // 11 + MessageBundle.getMessage("angal.medicalstock.origin.col").toUpperCase(), // 12 + MessageBundle.getMessage("angal.medicalstock.cost.col").toUpperCase(), // 13 + MessageBundle.getMessage("angal.common.total.txt").toUpperCase(), // 14 + MessageBundle.getMessage("angal.common.userid").toUpperCase() // 15 }; - private boolean[] pColumnBold = { true, false, false, false, false, false, false, false, false, false, false, false, false, false }; + private boolean[] pColumnBold = { true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false }; private int[] columnAlignment = { SwingConstants.LEFT, SwingConstants.CENTER, SwingConstants.CENTER, SwingConstants.CENTER, SwingConstants.CENTER, - SwingConstants.LEFT, SwingConstants.LEFT, SwingConstants.CENTER, + SwingConstants.CENTER, SwingConstants.CENTER, SwingConstants.LEFT, SwingConstants.LEFT, SwingConstants.CENTER, SwingConstants.CENTER, SwingConstants.CENTER, SwingConstants.CENTER, SwingConstants.RIGHT, SwingConstants.RIGHT, SwingConstants.CENTER }; private boolean isSingleUser = GeneralData.getGeneralData().getSINGLEUSER(); - private boolean[] pColumnVisible = { true, true, true, true, true, true, true, !GeneralData.AUTOMATICLOT_IN, !GeneralData.AUTOMATICLOT_IN, true, true, + private boolean[] pColumnVisible = { true, true, false, true, true, true, true, true, true, !GeneralData.AUTOMATICLOT_IN, !GeneralData.AUTOMATICLOT_IN, + true, true, GeneralData.LOTWITHCOST, GeneralData.LOTWITHCOST, !isSingleUser }; - private int[] pColumnWidth = { 50, 90, 45, 130, 50, 150, 70, 70, 80, 80, 50, 50, 70, 70 }; + private int[] pColumnWidth = { 50, 90, 45, 45, 130, 50, 30, 150, 70, 70, 80, 80, 50, 50, 70, 70 }; /* * Adds to facilitate the selection of products @@ -313,7 +326,7 @@ public void updateTotals() { totalAmount = new BigDecimal(0); // quantity - if (!medicalBox.getSelectedItem().equals(MessageBundle.getMessage("angal.common.all.txt"))) { + if (!medicalBox.getSelectedItem().equals(TEXT_ALL)) { for (Movement mov : moves) { if (mov.getType().getType().contains("+")) { totalQti += mov.getQuantity(); @@ -360,6 +373,7 @@ private JPanel getFilterContentPanel() { filterContentPanel.add(getLotDueDatePanel()); JPanel filterButtonPanel = new JPanel(new FlowLayout(FlowLayout.CENTER)); filterButtonPanel.add(getFilterButton()); + filterButtonPanel.add(getResetButton()); filterButtonPanel.add(getJCheckBoxKeepFilter()); filterContentPanel.add(filterButtonPanel); return filterContentPanel; @@ -378,7 +392,7 @@ private JPanel getMedicalPanel() { medicalPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory .createLineBorder(Color.GRAY), MessageBundle.getMessage("angal.medicalstock.pharmaceutical"))); JPanel label1Panel = new JPanel(new FlowLayout(FlowLayout.CENTER)); - label1Panel.add(new JLabel(MessageBundle.getMessage("angal.common.description.txt"))); + label1Panel.add(new JLabel(MessageBundle.getMessage("angal.medicalstock.codeordescription.txt"))); medicalPanel.add(label1Panel); medicalPanel.add(getMedicalSearchPanel()); JPanel medicalDescPanel = new JPanel(new FlowLayout(FlowLayout.CENTER)); @@ -473,15 +487,16 @@ private JPanel getLotDueDatePanel() { private JComboBox getWardBox() { wardBox = new JComboBox(); wardBox.setPreferredSize(new Dimension(200, 25)); - wardBox.addItem(MessageBundle.getMessage("angal.common.all.txt")); - List wardList; + wardBox.addItem(TEXT_ALL); + List wardsList; try { - wardList = wardBrowserManager.getWards(); + wardsList = wardBrowserManager.getWards(); + wardsList.sort(new Ward.WardDescriptionComparator()); } catch (OHServiceException e) { - wardList = new ArrayList<>(); + wardsList = new ArrayList<>(); OHServiceExceptionUtil.showMessages(e); } - for (Ward elem : wardList) { + for (Ward elem : wardsList) { wardBox.addItem(elem); } wardBox.setEnabled(false); @@ -496,7 +511,7 @@ private JPanel getMedicalSearchPanel() { medicalBox.removeAllItems(); List medicals; try { - medicals = medicalBrowsingManager.getMedicals(); + medicals = medicalBrowsingManager.getMedicalsSortedByName(); } catch (OHServiceException e1) { medicals = null; OHServiceExceptionUtil.showMessages(e1); @@ -506,7 +521,7 @@ private JPanel getMedicalSearchPanel() { int originalSize = medicals.size(); int resultsSize = results.size(); if (originalSize == resultsSize) { - medicalBox.addItem(MessageBundle.getMessage("angal.common.all.txt")); + medicalBox.addItem(TEXT_ALL); } for (Medical aMedical : results) { medicalBox.addItem(aMedical); @@ -544,28 +559,36 @@ public void keyTyped(KeyEvent e) { private JComboBox getMedicalBox() { medicalBox = new JComboBox(); + medicalBox.setRenderer(new ToolTipListCellRenderer()); medicalBox.setPreferredSize(new Dimension(200, 25)); List medical; try { - medical = medicalBrowsingManager.getMedicals(); + medical = medicalBrowsingManager.getMedicalsSortedByName(); } catch (OHServiceException e1) { medical = null; OHServiceExceptionUtil.showMessages(e1); } - medicalBox.addItem(MessageBundle.getMessage("angal.common.all.txt")); + medicalBox.addItem(TEXT_ALL); if (null != medical) { for (Medical aMedical : medical) { medicalBox.addItem(aMedical); } } + medicalBox.addActionListener(actionEvent -> { + medicalBox.setToolTipText(getTooltipFromObject(medicalBox.getSelectedItem())); + }); medicalBox.addMouseListener(new MouseListener() { @Override public void mouseExited(MouseEvent e) { + ToolTipManager.sharedInstance().setInitialDelay(defaultInitDelay); + UIManager.put("ToolTip.background", defaultBackgroundColor); } @Override public void mouseEntered(MouseEvent e) { + ToolTipManager.sharedInstance().setInitialDelay(0); + UIManager.put("ToolTip.background", Color.white); } @Override @@ -592,7 +615,7 @@ private JComboBox getMedicalTypeBox() { medicalTypeBox.setPreferredSize(new Dimension(200, 25)); List medical; - medicalTypeBox.addItem(MessageBundle.getMessage("angal.common.all.txt")); + medicalTypeBox.addItem(TEXT_ALL); try { medical = medicalTypeBrowserManager.getMedicalType(); @@ -634,36 +657,42 @@ public void mouseClicked(MouseEvent e) { } private JComboBox getMovementTypeBox() { - typeBox = new JComboBox(); - typeBox.setPreferredSize(new Dimension(200, 25)); - List type; + movementTypeBox = new JComboBox(); + movementTypeBox.setPreferredSize(new Dimension(200, 25)); + List movementTypeList; try { - type = medicalDsrStockMovementTypeBrowserManager.getMedicalDsrStockMovementType(); + movementTypeList = medicalDsrStockMovementTypeBrowserManager.getMedicalDsrStockMovementType(); } catch (OHServiceException e1) { - type = null; + movementTypeList = null; OHServiceExceptionUtil.showMessages(e1); } - typeBox.addItem(MessageBundle.getMessage("angal.common.all.txt")); - if (null != type) { - for (MovementType movementType : type) { - typeBox.addItem(movementType); + movementTypeBox.addItem(TEXT_ALL); + movementTypeBox.addItem(TEXT_ALLCHARGES); + movementTypeBox.addItem(TEXT_ALLDISCHARGES); + if (null != movementTypeList) { + for (MovementType movementType : movementTypeList) { + movementTypeBox.addItem(movementType); } } - typeBox.addActionListener(actionEvent -> { - if (!(typeBox.getSelectedItem() instanceof String)) { - MovementType selected = (MovementType) typeBox.getSelectedItem(); + movementTypeBox.addActionListener(actionEvent -> { + Object selectedMovementType = movementTypeBox.getSelectedItem(); + + if (!(selectedMovementType instanceof String)) { + MovementType selected = (MovementType) selectedMovementType; if (selected.getType().contains("-")) { wardBox.setEnabled(true); } else { wardBox.setSelectedIndex(0); wardBox.setEnabled(false); } + } else if (TEXT_ALLDISCHARGES.equals(selectedMovementType)) { + wardBox.setEnabled(true); } else { wardBox.setSelectedIndex(0); wardBox.setEnabled(false); } }); - return typeBox; + return movementTypeBox; } private JTable getMovTable() { @@ -789,7 +818,7 @@ private JButton getFilterButton() { filterButton.addActionListener(actionEvent -> { Integer medicalSelected = null; String medicalTypeSelected = null; - String typeSelected = null; + String movementTypeSelected = null; String wardSelected = null; boolean dateOk = true; @@ -843,9 +872,18 @@ private JButton getFilterButton() { .getSelectedItem()).getCode(); } } - if (!(typeBox.getSelectedItem() instanceof String)) { - typeSelected = ((MovementType) typeBox + if (!(movementTypeBox.getSelectedItem() instanceof String)) { + movementTypeSelected = ((MovementType) movementTypeBox .getSelectedItem()).getCode(); + } else { + movementTypeSelected = (String) movementTypeBox.getSelectedItem(); + if (movementTypeSelected.equals(TEXT_ALL)) { + movementTypeSelected = null; + } else if (movementTypeSelected.equals(TEXT_ALLCHARGES)) { + movementTypeSelected = "+"; + } else if (movementTypeSelected.equals(TEXT_ALLDISCHARGES)) { + movementTypeSelected = "-"; + } } if (!(wardBox.getSelectedItem() instanceof String)) { wardSelected = ((Ward) wardBox.getSelectedItem()) @@ -853,7 +891,7 @@ private JButton getFilterButton() { } if (!isAutomaticLot()) { model = new MovBrowserModel(medicalSelected, - medicalTypeSelected, wardSelected, typeSelected, + medicalTypeSelected, wardSelected, movementTypeSelected, movDateFrom.getDateStartOfDay(), movDateTo.getDateStartOfDay(), lotPrepFrom.getDateStartOfDay(), @@ -862,7 +900,7 @@ private JButton getFilterButton() { lotDueTo.getDateStartOfDay()); } else { model = new MovBrowserModel(medicalSelected, - medicalTypeSelected, wardSelected, typeSelected, + medicalTypeSelected, wardSelected, movementTypeSelected, movDateFrom.getDateStartOfDay(), movDateTo.getDateStartOfDay(), null, @@ -884,6 +922,35 @@ private JButton getFilterButton() { return filterButton; } + private JButton getResetButton() { + resetButton = new JButton(MessageBundle.getMessage("angal.medicalstock.reset.btn")); + resetButton.setMnemonic(MessageBundle.getMnemonic("angal.medicalstock.reset.btn.key")); + resetButton.addActionListener(actionEvent -> { + + searchTextField.setText(""); + searchButton.doClick(); + medicalTypeBox.setSelectedIndex(0); + movementTypeBox.setSelectedItem(MessageBundle.getMessage("angal.common.all.txt")); + wardBox.setSelectedItem(MessageBundle.getMessage("angal.common.all.txt")); + + movDateFrom.setDate(LocalDate.now().minusWeeks(1)); + movDateTo.setDate(LocalDate.now()); + + if (!isAutomaticLot()) { + lotPrepFrom.setDate(null); + lotPrepTo.setDate(null); + } + lotDueFrom.setDate(null); + lotDueTo.setDate(null); + + if (jCheckBoxKeepFilter.isSelected()) { + filterButton.doClick(); + } + }); + return resetButton; + + } + /** * This method creates the button that close the mask * @@ -1023,22 +1090,22 @@ private String compileFileName() { StringBuilder filename = new StringBuilder("Stock Ledger"); if (medicalBox.isEnabled() && !medicalBox.getSelectedItem().equals( - MessageBundle.getMessage("angal.common.all.txt"))) { + TEXT_ALL)) { filename.append('_').append(medicalBox.getSelectedItem()); } if (medicalTypeBox.isEnabled() && !medicalTypeBox.getSelectedItem().equals( - MessageBundle.getMessage("angal.common.all.txt"))) { + TEXT_ALL)) { filename.append('_').append(medicalTypeBox.getSelectedItem()); } - if (typeBox.isEnabled() && - !typeBox.getSelectedItem().equals(MessageBundle.getMessage("angal.common.all.txt"))) { - filename.append('_').append(typeBox.getSelectedItem()); + if (movementTypeBox.isEnabled() && + !movementTypeBox.getSelectedItem().equals(TEXT_ALL)) { + filename.append('_').append(movementTypeBox.getSelectedItem()); } if (wardBox.isEnabled() && - !wardBox.getSelectedItem().equals(MessageBundle.getMessage("angal.common.all.txt"))) { + !wardBox.getSelectedItem().equals(TEXT_ALL)) { filename.append('_').append(wardBox.getSelectedItem()); } filename.append('_').append(TimeTools.formatDateTime(movDateFrom.getDateStartOfDay(), DATE_FORMAT_YYYYMMDD)) @@ -1126,6 +1193,7 @@ public int getColumnCount() { @Override public Object getValueAt(int r, int c) { Movement movement = moves.get(r); + Medical medical = movement.getMedical(); Lot lot = movement.getLot(); BigDecimal cost = lot.getCost(); int qty = movement.getQuantity(); @@ -1136,6 +1204,8 @@ public Object getValueAt(int r, int c) { return movement.getRefNo(); } else if (c == ++col) { return formatDateTime(movement.getDate()); + } else if (c == ++col) { + return movement.getType().getCategory(); } else if (c == ++col) { return movement.getType().toString(); } else if (c == ++col) { @@ -1148,9 +1218,11 @@ public Object getValueAt(int r, int c) { } else if (c == ++col) { return qty; } else if (c == ++col) { - return movement.getMedical().getDescription(); + return medical.getProdCode(); } else if (c == ++col) { - return movement.getMedical().getType().getDescription(); + return medical.getDescription(); + } else if (c == ++col) { + return medical.getType().getDescription(); } else if (c == ++col) { if (isAutomaticLot()) { return MessageBundle.getMessage("angal.medicalstock.generated"); @@ -1225,7 +1297,6 @@ public Component getTableCellRendererComponent(JTable table, Object value, boole class DecimalFormatRenderer extends DefaultTableCellRenderer { private static final long serialVersionUID = 1L; - private final DecimalFormat formatter100 = new DecimalFormat("#,##0.000"); private final DecimalFormat formatter10 = new DecimalFormat("#,##0.00"); private final DecimalFormat formatter1 = new DecimalFormat("#,##0"); @@ -1237,7 +1308,7 @@ public Component getTableCellRendererComponent(JTable table, Object value, boole value = formatter1.format(value); } if (column == 11 && value instanceof Number) { - value = formatter100.format(value); + value = formatter10.format(value); } if (column == 12 && value instanceof Number) { value = formatter10.format(value); @@ -1245,4 +1316,30 @@ public Component getTableCellRendererComponent(JTable table, Object value, boole return super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); } } + + private String getTooltipFromObject(Object value) { + String tooltip = ""; + if (value instanceof Medical) { + tooltip = ((Medical) value).getDescription(); + } else if (value instanceof String) { + tooltip = (String) value; + } + return tooltip; + } + + public class ToolTipListCellRenderer extends DefaultListCellRenderer { + + @Override + public Component getListCellRendererComponent(JList< ? > list, Object value, int index, boolean isSelected, boolean cellHasFocus) { + // I'd extract the basic "text" representation of the value + // and pass that to the super call, which will apply it to the + // JLabel via the setText method, otherwise it will use the + // objects toString method to generate a representation + super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); + String tooltip = getTooltipFromObject(value); + setToolTipText(tooltip); + return this; + } + + } } diff --git a/src/main/java/org/isf/medicalstock/gui/MovStockMultipleCharging.java b/src/main/java/org/isf/medicalstock/gui/MovStockMultipleCharging.java index ebffaa9dc7..90e5937876 100644 --- a/src/main/java/org/isf/medicalstock/gui/MovStockMultipleCharging.java +++ b/src/main/java/org/isf/medicalstock/gui/MovStockMultipleCharging.java @@ -44,9 +44,11 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; import javax.swing.DefaultCellEditor; import javax.swing.JButton; +import javax.swing.JCheckBox; import javax.swing.JComboBox; import javax.swing.JDialog; import javax.swing.JFrame; @@ -138,11 +140,22 @@ public class MovStockMultipleCharging extends JDialog { }; private JComboBox comboBoxUnits = new JComboBox(qtyOption); private int optionSelected = UNITS; + private List updateLots = new ArrayList<>(); + private final String[] lotSelectionColumnNames = { + MessageBundle.getMessage("angal.medicalstock.lotid").toUpperCase(), + MessageBundle.getMessage("angal.medicalstock.prepdate.col").toUpperCase(), + MessageBundle.getMessage("angal.medicalstock.duedate").toUpperCase(), + MessageBundle.getMessage("angal.common.quantity.txt").toUpperCase(), + MessageBundle.getMessage("angal.medicalstock.multiplecharging.cost").toUpperCase(), + MessageBundle.getMessage("angal.common.note.txt").toUpperCase() + }; + private boolean[] lotSelectionColumnVisible = { true, true, true, true, GeneralData.LOTWITHCOST, true }; + private final Class[] lotSelectionColumnClasse = { String.class, String.class, String.class, Integer.class, Double.class, String.class }; private MovStockInsertingManager movStockInsertingManager = Context.getApplicationContext().getBean(MovStockInsertingManager.class); private MedicalBrowsingManager medicalBrowsingManager = Context.getApplicationContext().getBean(MedicalBrowsingManager.class); private MedicalDsrStockMovementTypeBrowserManager medicalDsrStockMovementTypeBrowserManager = Context.getApplicationContext() - .getBean(MedicalDsrStockMovementTypeBrowserManager.class); + .getBean(MedicalDsrStockMovementTypeBrowserManager.class); private SupplierBrowserManager supplierBrowserManager = Context.getApplicationContext().getBean(SupplierBrowserManager.class); private boolean isAutomaticLotIn() { @@ -163,7 +176,7 @@ public MovStockMultipleCharging(JFrame owner) { private void initialize() { List medicals; try { - medicals = medicalBrowsingManager.getMedicals(); + medicals = new ArrayList<>(medicalBrowsingManager.getMedicals().stream().filter(med -> med.getDeleted() == 'N').toList()); } catch (OHServiceException e) { OHServiceExceptionUtil.showMessages(e); medicals = null; @@ -380,9 +393,9 @@ private JTextField getJTextFieldSearch() { jTextFieldSearch.setColumns(10); TextPrompt suggestion = new TextPrompt( - MessageBundle.getMessage("angal.medicalstock.typeacodeoradescriptionandpressenter"), //$NON-NLS-1$ - jTextFieldSearch, - Show.FOCUS_LOST); + MessageBundle.getMessage("angal.medicalstock.typeacodeoradescriptionandpressenter"), //$NON-NLS-1$ + jTextFieldSearch, + Show.FOCUS_LOST); suggestion.setFont(new Font("Tahoma", Font.PLAIN, 14)); //$NON-NLS-1$ suggestion.setForeground(Color.GRAY); @@ -409,41 +422,33 @@ private JTextField getJTextFieldSearch() { return; } - // Lot (PreparationDate && ExpiringDate) + // Lot Lot lot; boolean isNewLot = false; + boolean updateLot = false; if (isAutomaticLotIn()) { - LocalDateTime preparationDate = TimeTools.getNow().truncatedTo(ChronoUnit.MINUTES); - LocalDateTime expiringDate = askExpiringDate(); - lot = new Lot("", preparationDate, expiringDate); //$NON-NLS-1$ - // Cost - BigDecimal cost = new BigDecimal(0); - if (GeneralData.LOTWITHCOST) { - cost = askCost(qty); - if (cost.compareTo(new BigDecimal(0)) == 0) { - return; - } - } + lot = createNewLot(med, qty); isNewLot = true; - lot.setCost(cost); } else { do { lot = chooseLot(med); if (lot == null) { - lot = askLot(); + lot = askLot(med); if (lot == null) { return; } - // Lot Cost - BigDecimal cost = new BigDecimal(0); - if (GeneralData.LOTWITHCOST) { - cost = askCost(qty); - if (cost.compareTo(new BigDecimal(0)) == 0) { - return; - } + if (!setOrValidateCost(lot, qty)) { + return; } isNewLot = true; - lot.setCost(cost); + } + // Lot without cost + if (needsCostUpdate(lot)) { + MessageDialog.warning(null, "angal.medicalstock.multiplecharging.selectedlotwithoutcostpleasespecify", lot.getCode()); + if (!setOrValidateCost(lot, qty)) { + return; + } + updateLot = true; } } while (lot == null); } @@ -455,7 +460,7 @@ private JTextField getJTextFieldSearch() { String refNo = jTextFieldReference.getText().trim(); Movement movement = new Movement(med, (MovementType) jComboBoxChargeType.getSelectedItem(), null, lot, date, qty, new Supplier(), refNo); - model.addItem(movement, isNewLot); + model.addItem(movement, isNewLot, updateLot); units.add(PACKETS); @@ -467,6 +472,34 @@ private JTextField getJTextFieldSearch() { return jTextFieldSearch; } + private Lot createNewLot(Medical med, int qty) { + LocalDateTime preparationDate = TimeTools.getNow().truncatedTo(ChronoUnit.MINUTES); + LocalDateTime expiringDate = askExpiringDate(); + Lot newLot = new Lot("", preparationDate, expiringDate); + newLot.setMedical(med); + + if (!setOrValidateCost(newLot, qty)) { + return null; + } + return newLot; + } + + private boolean setOrValidateCost(Lot lot, int qty) { + BigDecimal cost = lot.getCost() != null ? lot.getCost() : BigDecimal.ZERO; + if (GeneralData.LOTWITHCOST && (cost.equals(BigDecimal.ZERO) || lot.getCost() == null)) { + cost = askCost(qty); + if (cost.compareTo(BigDecimal.ZERO) == 0) { + return false; + } + lot.setCost(cost); + } + return true; + } + + private boolean needsCostUpdate(Lot lot) { + return (lot.getCost() == null || lot.getCost().equals(BigDecimal.ZERO)) && GeneralData.LOTWITHCOST; + } + private GoodDateTimeSpinnerChooser getJDateChooser() { if (jDateChooser == null) { jDateChooser = new GoodDateTimeSpinnerChooser(TimeTools.getNow()); @@ -499,8 +532,8 @@ protected BigDecimal askCost(int qty) { double cost = 0.; do { String input = JOptionPane.showInputDialog(this, - MessageBundle.getMessage("angal.medicalstock.multiplecharging.unitcost"), //$NON-NLS-1$ - 0.); + MessageBundle.getMessage("angal.medicalstock.multiplecharging.unitcost"), //$NON-NLS-1$ + 0.); if (input != null) { try { cost = Double.parseDouble(input); @@ -523,8 +556,8 @@ protected BigDecimal askCost(int qty) { protected double askTotalCost() { String input = JOptionPane.showInputDialog(this, - MessageBundle.getMessage("angal.medicalstock.multiplecharging.totalcost"), //$NON-NLS-1$ - 0.); + MessageBundle.getMessage("angal.medicalstock.multiplecharging.totalcost"), //$NON-NLS-1$ + 0.); double total = 0.; if (input != null) { try { @@ -539,7 +572,7 @@ protected double askTotalCost() { return total; } - protected Lot askLot() { + protected Lot askLot(Medical med) { LocalDateTime preparationDate; LocalDateTime expiringDate; Lot lot = null; @@ -566,22 +599,30 @@ protected Lot askLot() { do { int ok = JOptionPane.showConfirmDialog( - this, - panel, - MessageBundle.getMessage("angal.medicalstock.multiplecharging.lotinformations"), //$NON-NLS-1$ - JOptionPane.OK_CANCEL_OPTION); + this, + panel, + MessageBundle.getMessage("angal.medicalstock.multiplecharging.lotinformations"), //$NON-NLS-1$ + JOptionPane.OK_CANCEL_OPTION); if (ok == JOptionPane.OK_OPTION) { String lotName = lotNameTextField.getText(); - - if (expireDateChooser.getDate().isBefore(preparationDateChooser.getDate())) { - MessageDialog.error(this, "angal.medicalstock.multiplecharging.expirydatebeforepreparationdate"); - } else if (expireDateChooser.getDate().isBefore(jDateChooser.getLocalDateTime().toLocalDate())) { - MessageDialog.error(this, "angal.medicalstock.multiplecharging.expiringdateinthepastnotallowed"); - } else { - expiringDate = expireDateChooser.getDateEndOfDay(); - preparationDate = preparationDateChooser.getDateStartOfDay(); - lot = new Lot(lotName, preparationDate, expiringDate); + try { + if (movStockInsertingManager.lotExists(lotName)) { + MessageDialog.error(this, "angal.medicalstock.multiplecharging.theinsertedlotcodealreaedyexists.msg"); + continue; + } + if (expireDateChooser.getDate().isBefore(preparationDateChooser.getDate())) { + MessageDialog.error(this, "angal.medicalstock.multiplecharging.expirydatebeforepreparationdate"); + } else if (expireDateChooser.getDate().isBefore(jDateChooser.getLocalDateTime().toLocalDate())) { + MessageDialog.error(this, "angal.medicalstock.multiplecharging.expiringdateinthepastnotallowed"); + } else { + expiringDate = expireDateChooser.getDateEndOfDay(); + preparationDate = preparationDateChooser.getDateStartOfDay(); + lot = new Lot(lotName, preparationDate, expiringDate); + lot.setMedical(med); + } + } catch (OHServiceException e) { + OHServiceExceptionUtil.showMessages(e); } } else { return null; @@ -608,10 +649,10 @@ protected Medical chooseMedical(String text) { panel.add(new JScrollPane(medTable)); int ok = JOptionPane.showConfirmDialog( - this, - panel, - MessageBundle.getMessage("angal.medicalstock.multiplecharging.chooseamedical"), //$NON-NLS-1$ - JOptionPane.YES_NO_OPTION); + this, + panel, + MessageBundle.getMessage("angal.medicalstock.multiplecharging.chooseamedical"), //$NON-NLS-1$ + JOptionPane.YES_NO_OPTION); if (ok == JOptionPane.OK_OPTION) { int row = medTable.getSelectedRow(); @@ -625,47 +666,70 @@ protected Medical chooseMedical(String text) { protected Lot chooseLot(Medical med) { List lots; try { - lots = movStockInsertingManager.getLotByMedical(med); + lots = movStockInsertingManager.getLotByMedical(med, false); // get also empty lots } catch (OHServiceException e) { lots = new ArrayList<>(); OHServiceExceptionUtil.showMessages(e); } - Lot lot = null; - if (!lots.isEmpty()) { - JTable lotTable = new JTable(new StockMovModel(lots)); - lotTable.getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_SELECTION); - JPanel panel = new JPanel(new BorderLayout()); - panel.add(new JLabel(MessageBundle.getMessage("angal.medicalstock.multiplecharging.useanexistinglot")), BorderLayout.NORTH); //$NON-NLS-1$ - panel.add(new JScrollPane(lotTable), BorderLayout.CENTER); - Object[] options = { - MessageBundle.getMessage("angal.medicalstock.multiplecharging.selectedlot"), //$NON-NLS-1$ - MessageBundle.getMessage("angal.medicalstock.multiplecharging.newlot") }; //$NON-NLS-1$ - - int row; - do { - int ok = JOptionPane.showOptionDialog(this, - panel, - MessageBundle.getMessage("angal.medicalstock.multiplecharging.existinglot"), //$NON-NLS-1$ - JOptionPane.YES_NO_OPTION, - JOptionPane.QUESTION_MESSAGE, - null, - options, - options[0]); - - if (ok == JOptionPane.YES_OPTION) { - row = lotTable.getSelectedRow(); - if (row != -1) { - lot = lots.get(row); - } else { - MessageDialog.error(this, "angal.common.pleaseselectarow.msg"); - } + if (lots.isEmpty()) { + return null; + } + + StockLotModel lotModel = new StockLotModel(lots); + JTable lotTable = createLotTable(lotModel); + JCheckBox filterZeroQuantityCheckBox = createFilterCheckbox(lotModel); + + JPanel panel = new JPanel(new BorderLayout()); + panel.add(new JLabel(MessageBundle.getMessage("angal.medicalstock.multiplecharging.useanexistinglot")), BorderLayout.NORTH); + panel.add(new JScrollPane(lotTable), BorderLayout.CENTER); + panel.add(filterZeroQuantityCheckBox, BorderLayout.SOUTH); + + Lot selectedLot = null; + Object[] options = { + MessageBundle.getMessage("angal.medicalstock.multiplecharging.selectedlot"), + MessageBundle.getMessage("angal.medicalstock.multiplecharging.newlot") + }; + + int row; + do { + int ok = JOptionPane.showOptionDialog(this, panel, + MessageBundle.getMessage("angal.medicalstock.multiplecharging.existinglot"), + JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, options[0]); + + if (ok == JOptionPane.YES_OPTION) { + row = lotTable.getSelectedRow(); + if (row != -1) { + selectedLot = lots.get(row); } else { - row = 0; + MessageDialog.error(this, "angal.common.pleaseselectarow.msg"); } + } else { + row = 0; + } + } while (row == -1); - } while (row == -1); + return selectedLot; + } + + private JTable createLotTable(StockLotModel lotModel) { + JTable lotTable = new JTable(lotModel); + lotTable.getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_SELECTION); + for (int i = 0; i < lotSelectionColumnNames.length; i++) { + if (!lotSelectionColumnVisible[i]) { + TableColumn column = lotTable.getColumnModel().getColumn(i); + column.setMinWidth(0); + column.setMaxWidth(0); + column.setWidth(0); + } } - return lot; + return lotTable; + } + + private JCheckBox createFilterCheckbox(StockLotModel lotModel) { + JCheckBox filterZeroQuantityCheckBox = new JCheckBox(MessageBundle.getMessage("angal.medicalstock.multiplecharging.hideemptylots")); + filterZeroQuantityCheckBox.setSelected(true); + filterZeroQuantityCheckBox.addActionListener(e -> lotModel.setFilterZeroQuantity(filterZeroQuantityCheckBox.isSelected())); + return filterZeroQuantityCheckBox; } protected LocalDateTime askExpiringDate() { @@ -676,8 +740,8 @@ protected LocalDateTime askExpiringDate() { panel.add(expireDateChooser); int ok = JOptionPane.showConfirmDialog(this, panel, - MessageBundle.getMessage("angal.medicalstock.multiplecharging.expiringdate"), //$NON-NLS-1$ - JOptionPane.OK_CANCEL_OPTION); + MessageBundle.getMessage("angal.medicalstock.multiplecharging.expiringdate"), //$NON-NLS-1$ + JOptionPane.OK_CANCEL_OPTION); if (ok == JOptionPane.OK_OPTION) { date = expireDateChooser.getLocalDateTime(); @@ -698,9 +762,9 @@ protected int askQuantity(Medical med) { int qty = 0; do { String quantity = JOptionPane.showInputDialog(this, - message.toString(), - title.toString(), - JOptionPane.QUESTION_MESSAGE); + message.toString(), + title.toString(), + JOptionPane.QUESTION_MESSAGE); if (quantity != null) { try { qty = Integer.parseInt(quantity); @@ -728,6 +792,7 @@ private JComboBox getJComboBoxSupplier() { List suppliers = null; try { suppliers = supplierBrowserManager.getList(); + suppliers.sort(new Supplier.SupplierNameComparator()); } catch (OHServiceException e) { OHServiceExceptionUtil.showMessages(e); } @@ -763,9 +828,12 @@ public void removeItem(int row) { fireTableDataChanged(); } - public void addItem(Movement movement, Boolean isNewLot) { + public void addItem(Movement movement, Boolean isNewLot, boolean updateLot) { movements.add(movement); newLots.add(isNewLot); + if (updateLot) { + updateLots.add(movement.getLot()); + } fireTableDataChanged(); } @@ -921,6 +989,7 @@ private boolean save() { boolean ok = true; List movements = model.getMovements(); try { + movStockInsertingManager.updateLot(updateLots); movStockInsertingManager.newMultipleChargingMovements(movements, movements.get(0).getRefNo()); } catch (OHServiceException e) { ok = false; @@ -975,68 +1044,86 @@ public Component getTableCellRendererComponent(JTable table, Object value, boole } } - class StockMovModel extends DefaultTableModel { + class StockLotModel extends DefaultTableModel { + private static final String EMPTY = MessageBundle.getMessage("angal.medicalstock.multiplecharging.empty"); + private static final String EXPIRED = MessageBundle.getMessage("angal.medicalstock.multiplecharging.expired"); private static final long serialVersionUID = 1L; private List lotList; + private List displayedLots; + private boolean filterZeroQuantity = true; + + @Override + public Class< ? > getColumnClass(int columnIndex) { + return lotSelectionColumnClasse[columnIndex]; + } - public StockMovModel(List lots) { - lotList = lots; + public StockLotModel(List lots) { + this.lotList = new ArrayList<>(lots); + updateFilteredLots(); + } + + public void setFilterZeroQuantity(boolean filter) { + this.filterZeroQuantity = filter; + updateFilteredLots(); + fireTableDataChanged(); + } + + private void updateFilteredLots() { + if (filterZeroQuantity) { + // Only include lots with quantity greater than zero + displayedLots = lotList.stream() + .filter(lot -> lot.getMainStoreQuantity() > 0) + .collect(Collectors.toList()); + } else { + // Show all lots + displayedLots = new ArrayList<>(lotList); + } } @Override public int getRowCount() { - if (lotList == null) { + if (displayedLots == null) { return 0; } - return lotList.size(); + return displayedLots.size(); } @Override public String getColumnName(int c) { - if (c == 0) { - return MessageBundle.getMessage("angal.medicalstock.lotid").toUpperCase(); - } - if (c == 1) { - return MessageBundle.getMessage("angal.medicalstock.prepdate").toUpperCase(); - } - if (c == 2) { - return MessageBundle.getMessage("angal.medicalstock.duedate").toUpperCase(); - } - if (c == 3) { - return MessageBundle.getMessage("angal.common.quantity.txt").toUpperCase(); - } - if (GeneralData.LOTWITHCOST) { - if (c == 4) { - return MessageBundle.getMessage("angal.medicalstock.multiplecharging.cost").toUpperCase(); - } - } - return ""; //$NON-NLS-1$ + return lotSelectionColumnNames[c]; } @Override public int getColumnCount() { - if (GeneralData.LOTWITHCOST) { - return 5; - } - return 4; + return lotSelectionColumnNames.length; } @Override public Object getValueAt(int r, int c) { - Lot lot = lotList.get(r); - if (c == -1) { + Lot lot = displayedLots.get(r); + int i = -1; + if (c == i) { return lot; - } else if (c == 0) { + } else if (c == ++i) { return lot.getCode(); - } else if (c == 1) { + } else if (c == ++i) { return TimeTools.formatDateTime(lot.getPreparationDate(), DATE_FORMAT_DD_MM_YYYY); - } else if (c == 2) { + } else if (c == ++i) { return TimeTools.formatDateTime(lot.getDueDate(), DATE_FORMAT_DD_MM_YYYY); - } else if (c == 3) { + } else if (c == ++i) { return lot.getMainStoreQuantity(); - } else if (c == 4) { + } else if (c == ++i) { return lot.getCost(); + } else if (c == ++i) { + List statuses = new ArrayList<>(); + if (lot.getDueDate().isBefore(TimeTools.getDateToday0())) { + statuses.add(EXPIRED); + } + if (lot.getMainStoreQuantity() == 0) { + statuses.add(EMPTY); + } + return String.join(",", statuses); } return null; } diff --git a/src/main/java/org/isf/medicalstock/gui/MovStockMultipleDischarging.java b/src/main/java/org/isf/medicalstock/gui/MovStockMultipleDischarging.java index efc5ff7e43..e3c2b89c28 100644 --- a/src/main/java/org/isf/medicalstock/gui/MovStockMultipleDischarging.java +++ b/src/main/java/org/isf/medicalstock/gui/MovStockMultipleDischarging.java @@ -114,7 +114,7 @@ public class MovStockMultipleDischarging extends JDialog { MessageBundle.getMessage("angal.medicalstock.multipledischarging.expiringdate").toUpperCase() }; private final Class[] columnClasses = { String.class, String.class, Integer.class, Integer.class, String.class, Integer.class, String.class, String.class }; - private boolean[] columnEditable = { false, false, false, false, true, false, false, false }; + private boolean[] columnEditable = { false, false, false, true, true, false, false, false }; private int[] columnWidth = { 50, 100, 70, 50, 70, 50, 100, 80 }; private boolean[] columnResizable = { false, true, false, false, false, false, false, false }; private boolean[] columnVisible = { true, true, true, true, true, true, !GeneralData.AUTOMATICLOT_OUT, !GeneralData.AUTOMATICLOT_OUT }; @@ -164,7 +164,7 @@ private void initialize() { List medicals; try { - medicals = medicalBrowsingManager.getMedicals(); + medicals = new ArrayList<>(medicalBrowsingManager.getMedicals().stream().filter(med -> med.getDeleted() == 'N').toList()); } catch (OHServiceException e) { medicals = null; OHServiceExceptionUtil.showMessages(e); @@ -315,12 +315,7 @@ private JTextField getJTextFieldSearch() { String refNo = jTextFieldReference.getText(); Movement movement = new Movement(med, (MovementType) jComboBoxDischargeType.getSelectedItem(), null, lot, date, qty, null, refNo); - if (med.getPcsperpck() > 1) { - model.addItem(movement, PACKETS); - } else { - model.addItem(movement, UNITS); - } - + model.addItem(movement, UNITS); jTextFieldSearch.setText(""); //$NON-NLS-1$ jTextFieldSearch.requestFocus(); } @@ -596,7 +591,7 @@ protected Lot chooseLot(List lots, double qty) { private boolean checkQuantityInLot(Lot lot, double qty) { double lotQty = lot.getMainStoreQuantity(); if (qty > lotQty) { - MessageDialog.error(this, "angal.medicalstock.movementquantityisgreaterthanthequantityof.msg"); + MessageDialog.error(this, "angal.medicalstock.movementquantityisgreaterthanthequantityof.fmt.msg", qty, lotQty); return false; } return true; @@ -742,6 +737,7 @@ private JComboBox getJComboBoxDestination() { List wardsList; try { wardsList = wardBrowserManager.getWards(); + wardsList.sort(new Ward.WardDescriptionComparator()); } catch (OHServiceException e) { wardsList = new ArrayList<>(); OHServiceExceptionUtil.showMessages(e); @@ -861,6 +857,15 @@ public Object getValueAt(int r, int c) { @Override public void setValueAt(Object value, int r, int c) { Movement movement = movements.get(r); + if (c == 3) { + int oldQuantity = movement.getQuantity(); + movement.setQuantity((int) value); + + int total = calcTotal(movement, units.get(r)); + if (!checkQuantityInMovement(movement, total)) { + movement.setQuantity(oldQuantity); + } + } if (c == 4) { int newOption = 0; if (qtyOption[1].equals(value)) { diff --git a/src/main/java/org/isf/medicalstockward/gui/WardPharmacy.java b/src/main/java/org/isf/medicalstockward/gui/WardPharmacy.java index efc2d4aa76..5c50678441 100644 --- a/src/main/java/org/isf/medicalstockward/gui/WardPharmacy.java +++ b/src/main/java/org/isf/medicalstockward/gui/WardPharmacy.java @@ -112,8 +112,8 @@ import com.github.lgooddatepicker.zinternaltools.WrapLayout; public class WardPharmacy extends ModalJFrame implements - WardPharmacyNew.MovementWardListeners, - MovementWardListeners { + WardPharmacyNew.MovementWardListeners, + MovementWardListeners { @Override public void movementInserted(AWTEvent e) { @@ -126,7 +126,7 @@ public void movementUpdated(AWTEvent e) { jTableOutcomes.setModel(new OutcomesModel()); jTableDrugs.setModel(new DrugsModel()); } - + private static final long serialVersionUID = 1L; private static final Logger LOGGER = LoggerFactory.getLogger(WardPharmacy.class); @@ -234,7 +234,7 @@ public void movementUpdated(AWTEvent e) { private List wardOutcomes; private List wardIncomes; - //private static final String PREFERRED_LOOK_AND_FEEL = "javax.swing.plaf.metal.MetalLookAndFeel"; //$NON-NLS-1$ + // private static final String PREFERRED_LOOK_AND_FEEL = "javax.swing.plaf.metal.MetalLookAndFeel"; //$NON-NLS-1$ /* * Adds to facilitate the selection of products @@ -329,13 +329,13 @@ private JButton getJButtonStockCard() { if (!stockCardDialog.isCancel()) { new GenericReportPharmaceuticalStockCard("ProductLedgerWard", stockCardDialog.getLocalDateTimeFrom(), - stockCardDialog.getLocalDateTimeTo(), medical, wardSelected, toExcel); + stockCardDialog.getLocalDateTimeTo(), medical, wardSelected, toExcel); } }); } return jButtonStockCard; } - + private JButton getJButtonStockLedger() { if (jButtonStockLedger == null) { jButtonStockLedger = new JButton(MessageBundle.getMessage("angal.common.stockledger.btn")); @@ -346,7 +346,7 @@ private JButton getJButtonStockLedger() { StockLedgerDialog stockCardDialog = new StockLedgerDialog(this, dateFrom, dateTo); if (!stockCardDialog.isCancel()) { new GenericReportPharmaceuticalStockCard("ProductLedgerWard_multi", stockCardDialog.getLocalDateTimeFrom(), - stockCardDialog.getLocalDateTimeTo(), null, wardSelected, false); + stockCardDialog.getLocalDateTimeTo(), null, wardSelected, false); } }); } @@ -390,8 +390,8 @@ private JButton getJButtonDelete() { jButtonDelete.setMnemonic(MessageBundle.getMnemonic("angal.common.delete.btn.key")); jButtonDelete.setVisible(false); jButtonDelete.addActionListener(actionEvent -> { - - if (jTableOutcomes.getSelectedRowCount() > 1 ) { + + if (jTableOutcomes.getSelectedRowCount() > 1) { MessageDialog.error(this, "angal.medicalstock.pleaseselectonlyonemovement.msg"); return; } @@ -400,7 +400,7 @@ private JButton getJButtonDelete() { MessageDialog.error(this, "angal.medicalstock.pleaseselectoucomemovement.msg"); return; } - MovementWard selectedMovement = (MovementWard)jTableOutcomes.getValueAt(selectedRow, -1); + MovementWard selectedMovement = (MovementWard) jTableOutcomes.getValueAt(selectedRow, -1); try { MovementWard movWard = movWardBrowserManager.getLastMovementWard(wardSelected); if (movWard.getCode() == selectedMovement.getCode()) { @@ -414,7 +414,7 @@ private JButton getJButtonDelete() { MessageDialog.error(this, "angal.medicalstock.onlythelastmovementcanbedeleted.msg"); return; } - + } catch (OHServiceException e) { OHServiceExceptionUtil.showMessages(e); return; @@ -422,12 +422,12 @@ private JButton getJButtonDelete() { MessageDialog.info(this, "angal.medicalstock.deletemovementsuccess.msg"); filterButton.doClick(); jTableDrugs.setModel(new DrugsModel()); - + }); } return jButtonDelete; } - + private JPanel getJPanelWard() { if (jPanelWard == null) { jPanelWard = new JPanel(); @@ -520,9 +520,9 @@ private JScrollPane getJScrollPaneDrugs() { if (jScrollPaneDrugs == null) { jScrollPaneDrugs = new JScrollPane(); jScrollPaneDrugs.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), - MessageBundle.getMessage("angal.medicalstock.clickdrugs"), - TitledBorder.LEFT, - TitledBorder.TOP)); + MessageBundle.getMessage("angal.medicalstock.clickdrugs"), + TitledBorder.LEFT, + TitledBorder.TOP)); jScrollPaneDrugs.setViewportView(getJTableDrugs()); } return jScrollPaneDrugs; @@ -550,16 +550,16 @@ public void mouseClicked(MouseEvent me) { JTable target = (JTable) me.getSource(); int row = target.getSelectedRow(); // select a row - /*Checking the row or column is valid or not*/ + /* Checking the row or column is valid or not */ if (row < jTableDrugs.getRowCount() && row >= 0 && column < jTableDrugs.getColumnCount() && column >= 0) { Object value = jTableDrugs.getValueAt(row, column); if (value instanceof JButton) { - /*perform a click event*/ + /* perform a click event */ ((JButton) value).doClick(); } } - if (me.getClickCount() == 2) { // to detect double click events + if (me.getClickCount() == 2) { // to detect double click events showLotDetail(wardDrugs, (String) jTableDrugs.getValueAt(row, 0));// get the value of a row and column. } @@ -596,9 +596,9 @@ private void showLotDetail(List drug, String me) { panel.add(new JScrollPane(lotTable), BorderLayout.CENTER); JOptionPane.showMessageDialog(this, - panel, - MessageBundle.getMessage("angal.medicalstock.multipledischarging.lotinformations"), //$NON-NLS-1$ - JOptionPane.INFORMATION_MESSAGE); + panel, + MessageBundle.getMessage("angal.medicalstock.multipledischarging.lotinformations"), //$NON-NLS-1$ + JOptionPane.INFORMATION_MESSAGE); } class StockMovModel extends DefaultTableModel { @@ -784,7 +784,7 @@ public void focusLost(FocusEvent e) { if (weightTo < 0 || weightTo > 200) { jWeightToTextField.setText(""); //$NON-NLS-1$ JOptionPane - .showMessageDialog(WardPharmacy.this, MessageBundle.getMessage("angal.medicalstockward.insertavalidweight")); //$NON-NLS-1$ + .showMessageDialog(WardPharmacy.this, MessageBundle.getMessage("angal.medicalstockward.insertavalidweight")); //$NON-NLS-1$ } } catch (NumberFormatException ex) { jWeightToTextField.setText("0"); //$NON-NLS-1$ @@ -992,7 +992,7 @@ private JPanel getJPanelMedicalsSearch() { }); searchTextField = new JTextField(15); - //searchTextField.setToolTipText(MessageBundle.getMessage("angal.medicalstock.pharmaceutical")); + // searchTextField.setToolTipText(MessageBundle.getMessage("angal.medicalstock.pharmaceutical")); searchTextField.addKeyListener(new KeyListener() { @Override @@ -1203,20 +1203,20 @@ public IncomesModel() { } } - //List movements from other wards + // List movements from other wards for (MovementWard wMvnt : movWardBrowserManager.getWardMovementsToWard(wardSelected.getCode(), dateFrom, dateTo)) { if (wMvnt.getWardTo().getDescription() != null) { if (wMvnt.getWardTo().equals(wardSelected)) { - MovementType typeCharge = new MovementType("fromward", wMvnt.getWard().getDescription(), "*"); + MovementType typeCharge = new MovementType("fromward", wMvnt.getWard().getDescription(), "*", "*"); wardIncomes.add(new Movement( - wMvnt.getMedical(), - typeCharge, - wardSelected, - wMvnt.getLot(), - wMvnt.getDate(), - wMvnt.getQuantity().intValue(), - null, - null)); + wMvnt.getMedical(), + typeCharge, + wardSelected, + wMvnt.getLot(), + wMvnt.getDate(), + wMvnt.getQuantity().intValue(), + null, + null)); } } } @@ -1363,7 +1363,7 @@ public OutcomesModel() { if (weightTo != 0) { ok = ok && weight >= weightFrom && weight <= weightTo; } - + // filter out movements to this ward, already shown in 'Incomings' table if (wardFrom != null) { ok = false; @@ -1575,10 +1575,10 @@ private JButton getPrintTableButton() { Icon icon = new ImageIcon("rsc/icons/calendar_dialog.png"); //$NON-NLS-1$ String option = (String) MessageDialog.inputDialog(this, - icon, - options.toArray(), - options.get(0), - "angal.medicals.pleaseselectareport.msg"); + icon, + options.toArray(), + options.get(0), + "angal.medicals.pleaseselectareport.msg"); if (option == null) { return; @@ -1595,11 +1595,11 @@ private JButton getPrintTableButton() { GoodDateChooser dateChooser = new GoodDateChooser(LocalDate.now(), true, false); int r = JOptionPane.showConfirmDialog(this, - dateChooser, - MessageBundle.getMessage("angal.common.date.txt"), - JOptionPane.OK_CANCEL_OPTION, - JOptionPane.PLAIN_MESSAGE, - icon); + dateChooser, + MessageBundle.getMessage("angal.common.date.txt"), + JOptionPane.OK_CANCEL_OPTION, + JOptionPane.PLAIN_MESSAGE, + icon); if (r == JOptionPane.OK_OPTION) { new GenericReportPharmaceuticalStockWard(dateChooser.getDateEndOfDay(), "PharmaceuticalStockWard", wardSelected); //$NON-NLS-1$ @@ -1655,9 +1655,9 @@ private JButton getExportToExcelButton() { } } catch (IOException exc) { JOptionPane.showMessageDialog(this, - exc.getMessage(), - MessageBundle.getMessage("angal.messagedialog.error.title"), - JOptionPane.PLAIN_MESSAGE); + exc.getMessage(), + MessageBundle.getMessage("angal.messagedialog.error.title"), + JOptionPane.PLAIN_MESSAGE); LOGGER.info("Export to excel error : {}", exc.getMessage()); } @@ -1679,19 +1679,19 @@ private String compileFileName() { filename.append('_').append(MessageBundle.getMessage("angal.medicalstockward.drugs")); } if (jComboBoxTypes.isEnabled() - && !jComboBoxTypes.getSelectedItem().equals( - MessageBundle.getMessage("angal.common.alltypes.txt"))) { + && !jComboBoxTypes.getSelectedItem().equals( + MessageBundle.getMessage("angal.common.alltypes.txt"))) { filename.append('_').append(jComboBoxTypes.getSelectedItem()); } if (jComboBoxMedicals.isEnabled() - && !jComboBoxMedicals.getSelectedItem().equals( - MessageBundle.getMessage("angal.medicalstockward.allmedicals"))) { + && !jComboBoxMedicals.getSelectedItem().equals( + MessageBundle.getMessage("angal.medicalstockward.allmedicals"))) { filename.append('_').append(jComboBoxMedicals.getSelectedItem()); } filename.append('_').append(TimeTools.formatDateTime(jCalendarFrom.getDateStartOfDay(), DATE_FORMAT_YYYYMMDD)) - .append('_').append(TimeTools.formatDateTime(jCalendarTo.getDateStartOfDay(), DATE_FORMAT_YYYYMMDD)); + .append('_').append(TimeTools.formatDateTime(jCalendarTo.getDateStartOfDay(), DATE_FORMAT_YYYYMMDD)); return filename.toString(); } @@ -1702,7 +1702,7 @@ class CenterBoldTableCellRenderer extends DefaultTableCellRenderer { @Override public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, - boolean hasFocus, int row, int column) { + boolean hasFocus, int row, int column) { Component cell = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); cell.setForeground(Color.BLACK); @@ -1718,7 +1718,7 @@ class BlueBoldTableCellRenderer extends DefaultTableCellRenderer { @Override public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, - boolean hasFocus, int row, int column) { + boolean hasFocus, int row, int column) { Component cell = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); cell.setForeground(Color.BLACK); @@ -1752,7 +1752,7 @@ private List getSearchMedicalsResults(String s, List medicalsL for (String pattern : patterns) { if (code.contains(pattern.toLowerCase()) || description.contains(pattern.toLowerCase())) { patternFound = true; - //It is sufficient that only one pattern matches the query + // It is sufficient that only one pattern matches the query break; } } diff --git a/src/main/java/org/isf/medstockmovtype/gui/MedicalDsrStockMovementTypeBrowser.java b/src/main/java/org/isf/medstockmovtype/gui/MedicalDsrStockMovementTypeBrowser.java index 623082520c..873aa24694 100644 --- a/src/main/java/org/isf/medstockmovtype/gui/MedicalDsrStockMovementTypeBrowser.java +++ b/src/main/java/org/isf/medstockmovtype/gui/MedicalDsrStockMovementTypeBrowser.java @@ -55,9 +55,10 @@ public class MedicalDsrStockMovementTypeBrowser extends ModalJFrame implements M private String[] pColumns = { MessageBundle.getMessage("angal.common.code.txt").toUpperCase(), MessageBundle.getMessage("angal.common.description.txt").toUpperCase(), - MessageBundle.getMessage("angal.common.type.txt").toUpperCase() + MessageBundle.getMessage("angal.common.type.txt").toUpperCase(), + MessageBundle.getMessage("angal.medstockmovtype.category.txt").toUpperCase() }; - private int[] pColumnWidth = { 80, 200, 40 }; + private int[] pColumnWidth = { 80, 200, 40, 100 }; private JPanel jContainPanel; private JPanel jButtonPanel; @@ -68,10 +69,11 @@ public class MedicalDsrStockMovementTypeBrowser extends ModalJFrame implements M private JTable jTable; private MedicalDsrStockMovementTypeBrowserModel model; private int selectedrow; - private MedicalDsrStockMovementTypeBrowserManager medicalDsrStockMovementTypeBrowserManager = Context.getApplicationContext().getBean(MedicalDsrStockMovementTypeBrowserManager.class); + private MedicalDsrStockMovementTypeBrowserManager medicalDsrStockMovementTypeBrowserManager = Context.getApplicationContext() + .getBean(MedicalDsrStockMovementTypeBrowserManager.class); private MovementType medicalDsrStockMovementType; private final JFrame myFrame; - + /** * This method initializes */ @@ -88,7 +90,7 @@ private void initialize() { pack(); setLocationRelativeTo(null); } - + private JPanel getJContainPanel() { if (jContainPanel == null) { jContainPanel = new JPanel(); @@ -99,7 +101,7 @@ private JPanel getJContainPanel() { } return jContainPanel; } - + private JPanel getJButtonPanel() { if (jButtonPanel == null) { jButtonPanel = new JPanel(); @@ -116,7 +118,7 @@ private JButton getJNewButton() { jNewButton = new JButton(MessageBundle.getMessage("angal.common.new.btn")); jNewButton.setMnemonic(MessageBundle.getMnemonic("angal.common.new.btn.key")); jNewButton.addActionListener(actionEvent -> { - MovementType mdsr = new MovementType("", "", ""); + MovementType mdsr = new MovementType("", "", "", ""); MedicalDsrStockMovementTypeBrowserEdit newrecord = new MedicalDsrStockMovementTypeBrowserEdit(myFrame, mdsr, true); newrecord.addMedicalDsrStockMovementTypeListener(this); newrecord.setVisible(true); @@ -126,9 +128,9 @@ private JButton getJNewButton() { } /** - * This method initializes jEditButton - * - * @return javax.swing.JButton + * This method initializes jEditButton + * + * @return javax.swing.JButton */ private JButton getJEditButton() { if (jEditButton == null) { @@ -148,11 +150,11 @@ private JButton getJEditButton() { } return jEditButton; } - + /** - * This method initializes jCloseButton - * - * @return javax.swing.JButton + * This method initializes jCloseButton + * + * @return javax.swing.JButton */ private JButton getJCloseButton() { if (jCloseButton == null) { @@ -162,11 +164,11 @@ private JButton getJCloseButton() { } return jCloseButton; } - + /** * This method initializes jDeleteButton - * - * @return javax.swing.JButton + * + * @return javax.swing.JButton */ private JButton getJDeleteButton() { if (jDeleteButton == null) { @@ -198,12 +200,13 @@ private JTable getJTable() { if (jTable == null) { model = new MedicalDsrStockMovementTypeBrowserModel(); jTable = new JTable(model); - jTable.getColumnModel().getColumn(0).setMinWidth(pColumnWidth[0]); - jTable.getColumnModel().getColumn(1).setMinWidth(pColumnWidth[1]); + for (int i = 0; i < pColumnWidth.length; i++) { + jTable.getColumnModel().getColumn(i).setMinWidth(pColumnWidth[i]); + } } return jTable; } - + class MedicalDsrStockMovementTypeBrowserModel extends DefaultTableModel { private static final long serialVersionUID = 1L; @@ -246,6 +249,8 @@ public Object getValueAt(int r, int c) { return movType.getDescription(); } else if (c == 2) { return movType.getType(); + } else if (c == 3) { + return medicalDsrStockMovementTypeBrowserManager.getCategoryTranslated(movType.getCategory()); } return null; } @@ -256,7 +261,6 @@ public boolean isCellEditable(int arg0, int arg1) { } } - @Override public void medicalDsrStockMovementTypeUpdated(AWTEvent e) { pMedicalDsrStockMovementType.set(selectedrow, medicalDsrStockMovementType); @@ -266,11 +270,10 @@ public void medicalDsrStockMovementTypeUpdated(AWTEvent e) { jTable.setRowSelectionInterval(selectedrow, selectedrow); } } - - + @Override public void medicalDsrStockMovementTypeInserted(AWTEvent e) { - medicalDsrStockMovementType = (MovementType)e.getSource(); + medicalDsrStockMovementType = (MovementType) e.getSource(); pMedicalDsrStockMovementType.add(0, medicalDsrStockMovementType); ((MedicalDsrStockMovementTypeBrowserModel) jTable.getModel()).fireTableDataChanged(); if (jTable.getRowCount() > 0) { diff --git a/src/main/java/org/isf/medstockmovtype/gui/MedicalDsrStockMovementTypeBrowserEdit.java b/src/main/java/org/isf/medstockmovtype/gui/MedicalDsrStockMovementTypeBrowserEdit.java index b968d32a8c..9ec2af20a9 100644 --- a/src/main/java/org/isf/medstockmovtype/gui/MedicalDsrStockMovementTypeBrowserEdit.java +++ b/src/main/java/org/isf/medstockmovtype/gui/MedicalDsrStockMovementTypeBrowserEdit.java @@ -24,6 +24,7 @@ import java.awt.AWTEvent; import java.awt.BorderLayout; import java.util.EventListener; +import java.util.List; import javax.swing.JButton; import javax.swing.JComboBox; @@ -62,9 +63,9 @@ public void addMedicalDsrStockMovementTypeListener(MedicalDsrStockMovementTypeLi medicalDsrStockMovementTypeListeners.add(MedicalDsrStockMovementTypeListener.class, l); } - public void removeMedicalDsrStockMovementTypeListener(MedicalDsrStockMovementTypeListener listener) { - medicalDsrStockMovementTypeListeners.remove(MedicalDsrStockMovementTypeListener.class, listener); - } + public void removeMedicalDsrStockMovementTypeListener(MedicalDsrStockMovementTypeListener listener) { + medicalDsrStockMovementTypeListeners.remove(MedicalDsrStockMovementTypeListener.class, listener); + } private void fireMedicaldsrstockmovInserted(MovementType anMedicalDsrStockMovementType) { AWTEvent event = new AWTEvent(anMedicalDsrStockMovementType, AWTEvent.RESERVED_ID_MAX + 1) { @@ -89,7 +90,7 @@ private void fireMedicaldsrstockmovUpdated() { ((MedicalDsrStockMovementTypeListener) listener).medicalDsrStockMovementTypeUpdated(event); } } - + private JPanel jContentPane; private JPanel dataPanel; private JPanel buttonPanel; @@ -98,11 +99,14 @@ private void fireMedicaldsrstockmovUpdated() { private JTextField descriptionTextField; private VoLimitedTextField codeTextField; private JComboBox typeComboBox; + private JComboBox categoryComboBox; private String lastdescription; + private String lastCategory; private MovementType medicalDsrStockMovementType; private boolean insert; private JPanel jDataPanel; - private MedicalDsrStockMovementTypeBrowserManager medicalDsrStockMovementTypeBrowserManager = Context.getApplicationContext().getBean(MedicalDsrStockMovementTypeBrowserManager.class); + private MedicalDsrStockMovementTypeBrowserManager medicalDsrStockMovementTypeBrowserManager = Context.getApplicationContext() + .getBean(MedicalDsrStockMovementTypeBrowserManager.class); /** * This is the default constructor @@ -110,8 +114,9 @@ private void fireMedicaldsrstockmovUpdated() { public MedicalDsrStockMovementTypeBrowserEdit(JFrame owner, MovementType old, boolean inserting) { super(owner, true); insert = inserting; - medicalDsrStockMovementType = old;//disease will be used for every operation + medicalDsrStockMovementType = old;// disease will be used for every operation lastdescription = medicalDsrStockMovementType.getDescription(); + lastCategory = medicalDsrStockMovementType.getCategory(); initialize(); } @@ -147,9 +152,9 @@ private JPanel getJContentPane() { } /** - * This method initializes dataPanel - * - * @return javax.swing.JPanel + * This method initializes dataPanel + * + * @return javax.swing.JPanel */ private JPanel getDataPanel() { if (dataPanel == null) { @@ -160,9 +165,9 @@ private JPanel getDataPanel() { } /** - * This method initializes buttonPanel - * - * @return javax.swing.JPanel + * This method initializes buttonPanel + * + * @return javax.swing.JPanel */ private JPanel getButtonPanel() { if (buttonPanel == null) { @@ -174,9 +179,9 @@ private JPanel getButtonPanel() { } /** - * This method initializes cancelButton - * - * @return javax.swing.JButton + * This method initializes cancelButton + * + * @return javax.swing.JButton */ private JButton getCancelButton() { if (cancelButton == null) { @@ -199,13 +204,16 @@ private JButton getOkButton() { okButton.addActionListener(actionEvent -> { String description = descriptionTextField.getText(); + String category = medicalDsrStockMovementTypeBrowserManager.getCategoryKey((String) categoryComboBox.getSelectedItem()); medicalDsrStockMovementType.setDescription(description); medicalDsrStockMovementType.setCode(codeTextField.getText()); medicalDsrStockMovementType.setType((String) typeComboBox.getSelectedItem()); + medicalDsrStockMovementType.setCategory(category); if (insert) { // inserting try { - MovementType insertedMovementType = medicalDsrStockMovementTypeBrowserManager.newMedicalDsrStockMovementType(medicalDsrStockMovementType); + MovementType insertedMovementType = medicalDsrStockMovementTypeBrowserManager + .newMedicalDsrStockMovementType(medicalDsrStockMovementType); if (insertedMovementType != null) { fireMedicaldsrstockmovInserted(medicalDsrStockMovementType); dispose(); @@ -216,11 +224,12 @@ private JButton getOkButton() { OHServiceExceptionUtil.showMessages(e1); } } else { // updating - if (description.equals(lastdescription)) { + if (description.equals(lastdescription) && category.equals(lastCategory)) { dispose(); } else { try { - MovementType updatedMovementType = medicalDsrStockMovementTypeBrowserManager.updateMedicalDsrStockMovementType(medicalDsrStockMovementType); + MovementType updatedMovementType = medicalDsrStockMovementTypeBrowserManager + .updateMedicalDsrStockMovementType(medicalDsrStockMovementType); if (updatedMovementType != null) { fireMedicaldsrstockmovUpdated(); dispose(); @@ -238,25 +247,25 @@ private JButton getOkButton() { } /** - * This method initializes descriptionTextField - * - * @return javax.swing.JTextField + * This method initializes descriptionTextField + * + * @return javax.swing.JTextField */ private JTextField getDescriptionTextField() { if (descriptionTextField == null) { descriptionTextField = new JTextField(20); if (!insert) { descriptionTextField.setText(medicalDsrStockMovementType.getDescription()); - lastdescription=medicalDsrStockMovementType.getDescription(); - } + lastdescription = medicalDsrStockMovementType.getDescription(); + } } return descriptionTextField; } - + /** - * This method initializes codeTextField - * - * @return javax.swing.JTextField + * This method initializes codeTextField + * + * @return javax.swing.JTextField */ private JTextField getCodeTextField() { if (codeTextField == null) { @@ -268,11 +277,11 @@ private JTextField getCodeTextField() { } return codeTextField; } - + /** - * This method initializes typeTextField - * - * @return javax.swing.JTextField + * This method initializes typeComboBox + * + * @return javax.swing.JTextField */ private JComboBox getTypeComboBox() { if (typeComboBox == null) { @@ -288,9 +297,29 @@ private JComboBox getTypeComboBox() { } /** - * This method initializes jDataPanel - * - * @return javax.swing.JPanel + * This method initializes categoryComboBox + * + * @return javax.swing.JTextField + */ + private JComboBox getCategoryComboBox() { + if (categoryComboBox == null) { + categoryComboBox = new JComboBox<>(); + List categoryList = medicalDsrStockMovementTypeBrowserManager.getCategoryList(); + for (String description : categoryList) { + categoryComboBox.addItem(description); + } + if (!insert) { + categoryComboBox.setSelectedItem(medicalDsrStockMovementTypeBrowserManager.getCategoryTranslated(medicalDsrStockMovementType.getCategory())); + lastCategory = medicalDsrStockMovementType.getCategory(); + } + } + return categoryComboBox; + } + + /** + * This method initializes jDataPanel + * + * @return javax.swing.JPanel */ private JPanel getJDataPanel() { if (jDataPanel == null) { @@ -301,7 +330,9 @@ private JPanel getJDataPanel() { jDataPanel.add(getDescriptionTextField()); jDataPanel.add(new JLabel(MessageBundle.getMessage("angal.medstockmovtype.type") + ':')); jDataPanel.add(getTypeComboBox()); - SpringUtilities.makeCompactGrid(jDataPanel, 3, 2, 5, 5, 5, 5); + jDataPanel.add(new JLabel(MessageBundle.getMessage("angal.medstockmovtype.category.txt") + ':')); + jDataPanel.add(getCategoryComboBox()); + SpringUtilities.makeCompactGrid(jDataPanel, 4, 2, 5, 5, 5, 5); } return jDataPanel; } diff --git a/src/main/java/org/isf/medstockmovtype/gui/MedicalsrMovPatList.java b/src/main/java/org/isf/medstockmovtype/gui/MedicalsrMovPatList.java index c73203dfe8..90f476f1cd 100644 --- a/src/main/java/org/isf/medstockmovtype/gui/MedicalsrMovPatList.java +++ b/src/main/java/org/isf/medstockmovtype/gui/MedicalsrMovPatList.java @@ -40,6 +40,9 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +/* + * TODO: Move under package org.isf.medicalstockward.gui + */ public class MedicalsrMovPatList extends JPanel { private static final Logger LOGGER = LoggerFactory.getLogger(MedicalsrMovPatList.class); @@ -58,11 +61,11 @@ public MedicalsrMovPatList(Object object) { JScrollPane scrollPaneData = new JScrollPane(); panelData.add(scrollPaneData); - + if (object instanceof Patient) { myPatient = (Patient) object; } - + if (myPatient != null) { try { List movPat = movWardBrowserManager.getMovementToPatient(myPatient); @@ -88,7 +91,7 @@ public MedicalsrMovPatList(Object object) { dialogDrug.setLocationRelativeTo(null); dialogDrug.setModal(true); } - + public List getDrugsData() { return drugsData; } diff --git a/src/main/java/org/isf/menu/gui/MainMenu.java b/src/main/java/org/isf/menu/gui/MainMenu.java index a2943a59a3..d6a6fa0ca4 100644 --- a/src/main/java/org/isf/menu/gui/MainMenu.java +++ b/src/main/java/org/isf/menu/gui/MainMenu.java @@ -180,6 +180,15 @@ public MainMenu(User myUserIn) { if (singleUser) { LOGGER.info("Logging: Single User mode."); myUser = new User(ADMIN_STR, new UserGroup(ADMIN_STR, ""), ADMIN_STR, ""); + try { + userBrowsingManager.setLastLogin(myUser); + } catch (OHServiceException e) { + LOGGER.error("Unable to update last login time for {}.", myUser.getUserName()); + } + if (myUser.getFailedAttempts() > 0) { + userBrowsingManager.resetFailedAttempts(myUser); + } + RestartUserSession.setUser(myUser); } else { // get an user LOGGER.info("Logging: Multi User mode."); @@ -211,7 +220,7 @@ public MainMenu(User myUserIn) { try { this.sessionAuditId = sessionAuditManager.newSessionAudit(new SessionAudit(myUser.getUserName(), LocalDateTime.now(), null)); } catch (OHServiceException e1) { - LOGGER.error("Unable to log user login in the session_audit table"); + LOGGER.error("Unable to log user login in the session_audit table."); } // get menu items try { diff --git a/src/main/java/org/isf/menu/gui/Menu.java b/src/main/java/org/isf/menu/gui/Menu.java index d46a9ad063..560649bc20 100644 --- a/src/main/java/org/isf/menu/gui/Menu.java +++ b/src/main/java/org/isf/menu/gui/Menu.java @@ -34,6 +34,7 @@ import javax.swing.UIManager; import javax.swing.plaf.FontUIResource; +import org.isf.Application; import org.isf.generaldata.GeneralData; import org.isf.generaldata.MessageBundle; import org.isf.generaldata.Version; @@ -41,15 +42,15 @@ import org.isf.utils.jobjects.WaitCursorEventQueue; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.context.ApplicationContext; -import org.springframework.context.support.ClassPathXmlApplicationContext; public class Menu { private static final Logger LOGGER = LoggerFactory.getLogger(Menu.class); private static final Pattern DELIMITER = Pattern.compile("[._\\-+]"); - private static final String MIN_JAVA_VERSION = "11"; + private static final String MIN_JAVA_VERSION = "17"; /** * Create the GUI and show it. @@ -158,15 +159,15 @@ public static void fontChecker() { } } - public static void main(String[] args) { - ApplicationContext context = null; - try { - context = new ClassPathXmlApplicationContext("applicationContext.xml"); - } catch (Exception e) { - LOGGER.error("Fatal: fail to load application context. {}", e.getMessage(), e); - System.exit(1); - } + public Menu(String[] args) { + ApplicationContext context = createApplicationContext(args); Context.setApplicationContext(context); SwingUtilities.invokeLater(() -> createAndShowGUI()); } + + private static ApplicationContext createApplicationContext(String... args) { + return new SpringApplicationBuilder(Application.class) + .headless(false) + .run(args); + } } diff --git a/src/main/java/org/isf/opd/gui/OpdEditExtended.java b/src/main/java/org/isf/opd/gui/OpdEditExtended.java index 4602a078bd..3c44beac58 100644 --- a/src/main/java/org/isf/opd/gui/OpdEditExtended.java +++ b/src/main/java/org/isf/opd/gui/OpdEditExtended.java @@ -445,8 +445,7 @@ private void setAttendance() { return; } Object selectedObject = diseaseBox1.getSelectedItem(); - if (selectedObject instanceof Disease) { - Disease disease = (Disease) selectedObject; + if (selectedObject instanceof Disease disease) { if (lastOPDDisease1 != null && disease.getCode().equals(lastOPDDisease1.getCode())) { rePatientButton.setSelected(true); } else { diff --git a/src/main/java/org/isf/operation/gui/OperationBrowser.java b/src/main/java/org/isf/operation/gui/OperationBrowser.java index 4c9fbeb4cf..3e1342d8dd 100644 --- a/src/main/java/org/isf/operation/gui/OperationBrowser.java +++ b/src/main/java/org/isf/operation/gui/OperationBrowser.java @@ -42,6 +42,7 @@ import org.isf.generaldata.MessageBundle; import org.isf.menu.manager.Context; +import org.isf.operation.enums.OperationTarget; import org.isf.operation.gui.OperationEdit.OperationListener; import org.isf.operation.manager.OperationBrowserManager; import org.isf.operation.model.Operation; @@ -53,62 +54,38 @@ import org.isf.utils.jobjects.ModalJFrame; /** - * This class shows a list of operations. It is possible to filter data with a - * selection combo box and edit-insert-delete records - * + * This class shows a list of operations. It is possible to filter data with a selection combo box and edit-insert-delete records * @author Rick, Vero, Pupo */ public class OperationBrowser extends ModalJFrame implements OperationListener { - private static final long serialVersionUID = 1L; - private static final String STR_ALL = MessageBundle.getMessage("angal.common.all.txt").toUpperCase(); - - @Override - public void operationInserted(AWTEvent e) { - pOperation.add(0, operation); - ((OperationBrowserModel) table.getModel()).fireTableDataChanged(); - if (table.getRowCount() > 0) { - table.setRowSelectionInterval(0, 0); - } - } - - @Override - public void operationUpdated(AWTEvent e) { - pOperation.set(selectedrow, operation); - ((OperationBrowserModel) table.getModel()).fireTableDataChanged(); - table.updateUI(); - if ((table.getRowCount() > 0) && selectedrow > -1) { - table.setRowSelectionInterval(selectedrow, selectedrow); - } - } - //TODO: replace with mapping mnemonic / translation in OperationBrowserManager public static final String OPD = MessageBundle.getMessage("angal.admission.opd.txt").toUpperCase(); public static final String ADMISSION = MessageBundle.getMessage("angal.admission.admission.txt").toUpperCase(); public static final String OPD_ADMISSION = OPD + " / " + ADMISSION; - + private static final long serialVersionUID = 1L; + private static final String STR_ALL = MessageBundle.getMessage("angal.common.all.txt").toUpperCase(); private static final int pfrmBase = 8; private static final int pfrmWidth = 5; private static final int pfrmHeight = 5; private int selectedrow; - private JComboBox diseaseTypeFilter; + private final JComboBox diseaseTypeFilter; private List pOperation; - private String[] pColumns = { - MessageBundle.getMessage("angal.common.id.txt").toUpperCase(), - MessageBundle.getMessage("angal.common.type.txt").toUpperCase(), - MessageBundle.getMessage("angal.common.name.txt").toUpperCase(), - MessageBundle.getMessage("angal.operation.operationcontext.col").toUpperCase() + private final String[] pColumns = { + MessageBundle.getMessage("angal.common.id.txt").toUpperCase(), + MessageBundle.getMessage("angal.common.type.txt").toUpperCase(), + MessageBundle.getMessage("angal.common.name.txt").toUpperCase(), + MessageBundle.getMessage("angal.operation.operationcontext.col").toUpperCase() }; - private int[] pColumnWidth = { 50, 180, 200, 100 }; + private final int[] pColumnWidth = { 50, 180, 200, 100 }; private Operation operation; private DefaultTableModel model; - private JTable table; - private JFrame myFrame; + private final JTable table; + private final JFrame myFrame; private String pSelection; - - private OperationBrowserManager operationBrowserManager = Context.getApplicationContext().getBean(OperationBrowserManager.class); - private OperationTypeBrowserManager operationTypeBrowserManager = Context.getApplicationContext().getBean(OperationTypeBrowserManager.class); - + private final OperationBrowserManager operationBrowserManager = Context.getApplicationContext().getBean(OperationBrowserManager.class); + private final OperationTypeBrowserManager operationTypeBrowserManager = Context.getApplicationContext().getBean(OperationTypeBrowserManager.class); + public OperationBrowser() { setTitle(MessageBundle.getMessage("angal.operation.operationsbrowser.title")); @@ -117,7 +94,7 @@ public OperationBrowser() { int pfrmBordX = (screensize.width - (screensize.width / pfrmBase * pfrmWidth)) / 2; int pfrmBordY = (screensize.height - (screensize.height / pfrmBase * pfrmHeight)) / 2; this.setBounds(pfrmBordX, pfrmBordY, screensize.width / pfrmBase * pfrmWidth, - screensize.height / pfrmBase * pfrmHeight); + screensize.height / pfrmBase * pfrmHeight); myFrame = this; model = new OperationBrowserModel(); table = new JTable(model); @@ -214,6 +191,23 @@ public OperationBrowser() { setVisible(true); } + @Override + public void operationInserted(AWTEvent e) { + pOperation.add(0, operation); + ((OperationBrowserModel) table.getModel()).fireTableDataChanged(); + if (table.getRowCount() > 0) { + table.setRowSelectionInterval(0, 0); + } + } + @Override + public void operationUpdated(AWTEvent e) { + pOperation.set(selectedrow, operation); + ((OperationBrowserModel) table.getModel()).fireTableDataChanged(); + table.updateUI(); + if ((table.getRowCount() > 0) && selectedrow > -1) { + table.setRowSelectionInterval(selectedrow, selectedrow); + } + } class OperationBrowserModel extends DefaultTableModel { @@ -257,7 +251,7 @@ public int getColumnCount() { @Override public Object getValueAt(int r, int c) { Operation operation = pOperation.get(r); - String p = operation.getOpeFor(); + OperationTarget opeFor = operation.getOpeFor(); if (c == 0) { return operation.getCode(); } else if (c == -1) { @@ -267,14 +261,12 @@ public Object getValueAt(int r, int c) { } else if (c == 2) { return operation.getDescription(); } else if (c == 3) { // TODO: use bundles - if (p != null) { - if (p.equals("1")) { - return OPD_ADMISSION; - } else if (p.equals("2")) { - return ADMISSION; - } else { - return OPD; - } + if (opeFor != null) { + return switch (opeFor) { + case admission -> ADMISSION; + case opd -> OPD; + default -> OPD_ADMISSION; + }; } else { return MessageBundle.getMessage("angal.common.notdefined.txt"); } diff --git a/src/main/java/org/isf/operation/gui/OperationEdit.java b/src/main/java/org/isf/operation/gui/OperationEdit.java index 02a3b2055e..cd07434b18 100644 --- a/src/main/java/org/isf/operation/gui/OperationEdit.java +++ b/src/main/java/org/isf/operation/gui/OperationEdit.java @@ -42,6 +42,7 @@ import org.isf.generaldata.MessageBundle; import org.isf.menu.manager.Context; +import org.isf.operation.enums.OperationTarget; import org.isf.operation.manager.OperationBrowserManager; import org.isf.operation.model.Operation; import org.isf.opetype.manager.OperationTypeBrowserManager; @@ -58,22 +59,38 @@ public class OperationEdit extends JDialog { private static final long serialVersionUID = 1L; - private EventListenerList operationListeners = new EventListenerList(); - - public interface OperationListener extends EventListener { - void operationUpdated(AWTEvent e); - - void operationInserted(AWTEvent e); + private final EventListenerList operationListeners = new EventListenerList(); + private final OperationBrowserManager operationBrowserManager = Context.getApplicationContext().getBean(OperationBrowserManager.class); + private final OperationTypeBrowserManager operationTypeBrowserManager = Context.getApplicationContext().getBean(OperationTypeBrowserManager.class); + private final Operation operation; + private final boolean insert; + private JPanel jContentPane; + private JPanel dataPanel; + private JPanel buttonPanel; + private JButton cancelButton; + private JButton okButton; + private JTextField descriptionTextField; + private JTextField codeTextField; + private JComboBox operationTypeComboBox; + private String lastdescription; + private JRadioButton major; + private JPanel radioButtonPanel; + private JComboBox opeForBox; + /** + * This is the default constructor; we pass the arraylist and the selectedrow because we need to update them + */ + public OperationEdit(JFrame parent, Operation old, boolean inserting) { + super(parent, true); + insert = inserting; + operation = old; // operation will be used for every operation + initialize(); } - public void addOperationListener(OperationListener l) { operationListeners.add(OperationListener.class, l); } - public void removeOperationListener(OperationListener listener) { operationListeners.remove(OperationListener.class, listener); } - private void fireOperationInserted() { AWTEvent event = new AWTEvent(new Object(), AWTEvent.RESERVED_ID_MAX + 1) { @@ -85,7 +102,6 @@ private void fireOperationInserted() { ((OperationListener) listener).operationInserted(event); } } - private void fireOperationUpdated() { AWTEvent event = new AWTEvent(new Object(), AWTEvent.RESERVED_ID_MAX + 1) { @@ -97,36 +113,6 @@ private void fireOperationUpdated() { ((OperationListener) listener).operationUpdated(event); } } - - private OperationBrowserManager operationBrowserManager = Context.getApplicationContext().getBean(OperationBrowserManager.class); - private OperationTypeBrowserManager operationTypeBrowserManager = Context.getApplicationContext().getBean(OperationTypeBrowserManager.class); - - private JPanel jContentPane; - private JPanel dataPanel; - private JPanel buttonPanel; - private JButton cancelButton; - private JButton okButton; - private JTextField descriptionTextField; - private JTextField codeTextField; - private JComboBox operationTypeComboBox; - private String lastdescription; - private Operation operation; - private JRadioButton major; - private JPanel radioButtonPanel; - private boolean insert; - private JComboBox operBox; - - /** - * This is the default constructor; we pass the arraylist and the selectedrow - * because we need to update them - */ - public OperationEdit(JFrame parent, Operation old, boolean inserting) { - super(parent, true); - insert = inserting; - operation = old; // operation will be used for every operation - initialize(); - } - /** * This method initializes this */ @@ -141,10 +127,8 @@ private void initialize() { pack(); setLocationRelativeTo(null); } - /** * This method initializes jContentPane - * * @return javax.swing.JPanel */ private JPanel getJContentPane() { @@ -156,10 +140,8 @@ private JPanel getJContentPane() { } return jContentPane; } - /** * This method initializes dataPanel - * * @return javax.swing.JPanel */ private JPanel getDataPanel() { @@ -179,35 +161,33 @@ private JPanel getDataPanel() { dataPanel.add(new JLabel("")); dataPanel.add(getRadioButtonPanel()); dataPanel.add(operForLabel); - dataPanel.add(getOperFor()); + dataPanel.add(getOpeFor()); SpringUtilities.makeCompactGrid(dataPanel, 5, 2, 5, 5, 5, 5); } return dataPanel; } + private JComboBox getOpeFor() { - private JComboBox getOperFor() { - - operBox = new JComboBox<>(); + opeForBox = new JComboBox<>(); //TODO: replace integer values with mnemonic ones - operBox.addItem(OperationBrowser.OPD_ADMISSION); // = "1" - operBox.addItem(OperationBrowser.ADMISSION); // = "2" - operBox.addItem(OperationBrowser.OPD); // = "3" - + opeForBox.addItem(OperationBrowser.OPD_ADMISSION); + opeForBox.addItem(OperationBrowser.ADMISSION); + opeForBox.addItem(OperationBrowser.OPD); + if (!insert) { - int index = operation.getOpeFor().equals("1") ? 0 - : operation.getOpeFor().equals("2") ? 1 - : operation.getOpeFor().equals("3") ? 2 - : 0; // default - operBox.setSelectedIndex(index); + int index = switch (operation.getOpeFor()) { + case admission -> 1; + case opd -> 2; + default -> 0; + }; + opeForBox.setSelectedIndex(index); } - return operBox; + return opeForBox; } - /** * This method initializes buttonPanel - * * @return javax.swing.JPanel */ private JPanel getButtonPanel() { @@ -218,10 +198,8 @@ private JPanel getButtonPanel() { } return buttonPanel; } - /** * This method initializes cancelButton - * * @return javax.swing.JButton */ private JButton getCancelButton() { @@ -232,10 +210,8 @@ private JButton getCancelButton() { } return cancelButton; } - /** * This method initializes okButton - * * @return javax.swing.JButton */ private JButton getOkButton() { @@ -268,12 +244,16 @@ private JButton getOkButton() { } else { if (operationBrowserManager.descriptionControl(descriptionTextField.getText(), - ((OperationType) operationTypeComboBox.getSelectedItem()).getCode())) { + ((OperationType) operationTypeComboBox.getSelectedItem()).getCode())) { MessageDialog.error(null, "angal.operation.operationalreadypresent"); return; } } - String opeForSelection = String.valueOf(operBox.getSelectedIndex()+1); + OperationTarget opeForSelection = switch (opeForBox.getSelectedIndex()) { + case 1 -> OperationTarget.admission; + case 2 -> OperationTarget.opd; + default -> OperationTarget.opd_admission; + }; operation.setOpeFor(opeForSelection); operation.setType((OperationType) operationTypeComboBox.getSelectedItem()); operation.setDescription(descriptionTextField.getText()); @@ -300,8 +280,7 @@ private JButton getOkButton() { } if (!result) { MessageDialog.error(null, "angal.common.datacouldnotbesaved.msg"); - } - else { + } else { dispose(); } } catch (OHServiceException ex) { @@ -311,10 +290,8 @@ private JButton getOkButton() { } return okButton; } - /** * This method initializes descriptionTextField - * * @return javax.swing.JTextField */ private JTextField getDescriptionTextField() { @@ -327,10 +304,8 @@ private JTextField getDescriptionTextField() { } return descriptionTextField; } - /** * This method initializes radioButtonPanel - * * @return javax.swing.JPanel */ private JPanel getRadioButtonPanel() { @@ -364,17 +339,14 @@ private JPanel getRadioButtonPanel() { } return radioButtonPanel; } - private JRadioButton getRadioButton(String label, boolean active) { JRadioButton rb = new JRadioButton(label); rb.setSelected(active); rb.setName(label); return rb; } - /** * This method initializes codeTextField - * * @return javax.swing.JTextField */ private JTextField getCodeTextField() { @@ -387,10 +359,8 @@ private JTextField getCodeTextField() { } return codeTextField; } - /** * This method initializes operationTypeComboBox - * * @return javax.swing.JComboBox */ private JComboBox getOperationTypeComboBox() { @@ -413,7 +383,8 @@ private JComboBox getOperationTypeComboBox() { selectedOperationType = elem; } } - } if (selectedOperationType != null) { + } + if (selectedOperationType != null) { operationTypeComboBox.setSelectedItem(selectedOperationType); } } @@ -425,4 +396,11 @@ private JComboBox getOperationTypeComboBox() { return operationTypeComboBox; } + public interface OperationListener extends EventListener { + + void operationUpdated(AWTEvent e); + + void operationInserted(AWTEvent e); + } + } diff --git a/src/main/java/org/isf/patient/gui/PatientInsert.java b/src/main/java/org/isf/patient/gui/PatientInsert.java index 28878c1e3a..cd0d1f8a71 100644 --- a/src/main/java/org/isf/patient/gui/PatientInsert.java +++ b/src/main/java/org/isf/patient/gui/PatientInsert.java @@ -263,14 +263,11 @@ private JButton getJOkButton() { String name = jFirstNameTextField.getText() + ' ' + jSecondNameTextField.getText(); try { if (patientBrowserManager.isNamePresent(name)) { - switch (MessageDialog.yesNo(null, "angal.patient.thepatientisalreadypresent.msg")) { - case JOptionPane.OK_OPTION: - ok = true; - break; - case JOptionPane.NO_OPTION: - ok = false; - break; - } + ok = switch (MessageDialog.yesNo(null, "angal.patient.thepatientisalreadypresent.msg")) { + case JOptionPane.OK_OPTION -> true; + case JOptionPane.NO_OPTION -> false; + default -> ok; + }; } } catch (OHServiceException ex) { OHServiceExceptionUtil.showMessages(ex); @@ -320,14 +317,11 @@ private JButton getJOkButton() { if (!patient.getName().equals(name)) { try { if (patientBrowserManager.isNamePresent(name)) { - switch (MessageDialog.yesNo(null, "angal.patient.thepatientisalreadypresent.msg")) { - case JOptionPane.OK_OPTION: - ok = true; - break; - case JOptionPane.NO_OPTION: - ok = false; - break; - } + ok = switch (MessageDialog.yesNo(null, "angal.patient.thepatientisalreadypresent.msg")) { + case JOptionPane.OK_OPTION -> true; + case JOptionPane.NO_OPTION -> false; + default -> ok; + }; } } catch (OHServiceException ex) { OHServiceExceptionUtil.showMessages(ex); diff --git a/src/main/java/org/isf/patient/gui/PatientInsertExtended.java b/src/main/java/org/isf/patient/gui/PatientInsertExtended.java index 53a8a9901c..da5a0829c5 100644 --- a/src/main/java/org/isf/patient/gui/PatientInsertExtended.java +++ b/src/main/java/org/isf/patient/gui/PatientInsertExtended.java @@ -444,14 +444,11 @@ private JButton getJOkButton() { String name = firstName + ' ' + secondName; try { if (patientBrowserManager.isNamePresent(name)) { - switch (MessageDialog.yesNo(null, "angal.patient.thepatientisalreadypresent.msg")) { - case JOptionPane.OK_OPTION: - ok = true; - break; - case JOptionPane.NO_OPTION: - ok = false; - break; - } + ok = switch (MessageDialog.yesNo(null, "angal.patient.thepatientisalreadypresent.msg")) { + case JOptionPane.OK_OPTION -> true; + case JOptionPane.NO_OPTION -> false; + default -> ok; + }; } } catch (OHServiceException ex) { OHServiceExceptionUtil.showMessages(ex); diff --git a/src/main/java/org/isf/session/LoginEventListener.java b/src/main/java/org/isf/session/LoginEventListener.java index 54029aa21f..aec980cf45 100644 --- a/src/main/java/org/isf/session/LoginEventListener.java +++ b/src/main/java/org/isf/session/LoginEventListener.java @@ -30,8 +30,7 @@ public class LoginEventListener implements LoginListener { @Override public void loginInserted(AWTEvent e) { - if (e.getSource() instanceof User) { - User myUser = (User) e.getSource(); + if (e.getSource() instanceof User myUser) { RestartUserSession.setUser(myUser); RestartUserSession.getTimer().startTimer(); } diff --git a/src/main/java/org/isf/sms/gui/SmsEdit.java b/src/main/java/org/isf/sms/gui/SmsEdit.java index e94c6f0062..73a90e9d5d 100644 --- a/src/main/java/org/isf/sms/gui/SmsEdit.java +++ b/src/main/java/org/isf/sms/gui/SmsEdit.java @@ -95,7 +95,7 @@ public SmsEdit(JFrame owner) { } private void initialize() { - maxLength = SmsManager.MAX_LENGHT; + maxLength = SmsManager.MAX_LENGTH; } private void initComponents() { diff --git a/src/main/java/org/isf/stat/gui/report/DisplayReport.java b/src/main/java/org/isf/stat/gui/report/DisplayReport.java index 644dd800b7..6bfde5c442 100644 --- a/src/main/java/org/isf/stat/gui/report/DisplayReport.java +++ b/src/main/java/org/isf/stat/gui/report/DisplayReport.java @@ -25,7 +25,6 @@ import java.util.Locale; import org.isf.generaldata.GeneralData; -import org.isf.generaldata.MessageBundle; import org.isf.stat.dto.JasperReportResultDto; import org.isf.utils.jobjects.MessageDialog; @@ -35,7 +34,7 @@ public class DisplayReport { protected void showReport(JasperReportResultDto jasperReportResultDto) throws IOException { if (jasperReportResultDto.getJasperPrint().getPages().isEmpty()) { - MessageDialog.info(null, MessageBundle.getMessage("angal.common.documenthasnopages.msg")); + MessageDialog.info(null, "angal.common.documenthasnopages.msg"); return; } if (GeneralData.INTERNALVIEWER) { diff --git a/src/main/java/org/isf/stat/gui/report/GenericReportPharmaceuticalAMC.java b/src/main/java/org/isf/stat/gui/report/GenericReportPharmaceuticalAMC.java new file mode 100644 index 0000000000..b643471918 --- /dev/null +++ b/src/main/java/org/isf/stat/gui/report/GenericReportPharmaceuticalAMC.java @@ -0,0 +1,84 @@ +/* + * Open Hospital (www.open-hospital.org) + * Copyright © 2006-2024 Informatici Senza Frontiere (info@informaticisenzafrontiere.org) + * + * Open Hospital is a free and open source software for healthcare data management. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * https://www.gnu.org/licenses/gpl-3.0-standalone.html + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.isf.stat.gui.report; + +import static org.isf.utils.Constants.DATE_FORMAT_YYYYMMDD; + +import java.io.File; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; + +import javax.swing.JFileChooser; +import javax.swing.filechooser.FileNameExtensionFilter; + +import org.isf.menu.manager.Context; +import org.isf.stat.dto.JasperReportResultDto; +import org.isf.stat.manager.JasperReportsManager; +import org.isf.utils.excel.ExcelExporter; +import org.isf.utils.jobjects.MessageDialog; +import org.isf.utils.time.TimeTools; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class GenericReportPharmaceuticalAMC extends DisplayReport { + + private static final Logger LOGGER = LoggerFactory.getLogger(GenericReportPharmaceuticalAMC.class); + private JasperReportsManager jasperReportsManager = Context.getApplicationContext().getBean(JasperReportsManager.class); + + public GenericReportPharmaceuticalAMC(LocalDateTime date, String jasperFileName, boolean toExcel) { + try { + + if (date == null) { + date = TimeTools.getNow(); + } + + File defaultFilename = new File(compileAMCFilename(jasperFileName, date)); + + if (toExcel) { + JFileChooser fcExcel = ExcelExporter.getJFileChooserExcel(defaultFilename); + int iRetVal = fcExcel.showSaveDialog(null); + if (iRetVal == JFileChooser.APPROVE_OPTION) { + File exportFile = fcExcel.getSelectedFile(); + FileNameExtensionFilter selectedFilter = (FileNameExtensionFilter) fcExcel.getFileFilter(); + String extension = selectedFilter.getExtensions()[0]; + if (!exportFile.getName().endsWith(extension)) { + exportFile = new File(exportFile.getAbsoluteFile() + "." + extension); + } + jasperReportsManager.getGenericReportPharmaceuticalAMCExcel(date, jasperFileName, exportFile.getAbsolutePath()); + } + } else { + JasperReportResultDto jasperReportResultDto = jasperReportsManager.GenericReportPharmaceuticalAMCPdf(date, jasperFileName); + showReport(jasperReportResultDto); + } + } catch (Exception e) { + LOGGER.error("", e); + MessageDialog.error(null, "angal.stat.reporterror.msg"); + } + } + + private String compileAMCFilename(String jasperFileName, LocalDateTime date) { + DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern(DATE_FORMAT_YYYYMMDD); + StringBuilder fileName = new StringBuilder(jasperFileName); + fileName.append('_').append(dateTimeFormatter.format(date)); + return fileName.toString(); + } +} diff --git a/src/main/java/org/isf/telemetry/gui/TelemetryEdit.java b/src/main/java/org/isf/telemetry/gui/TelemetryEdit.java index 07f70f4e78..497418c7cb 100644 --- a/src/main/java/org/isf/telemetry/gui/TelemetryEdit.java +++ b/src/main/java/org/isf/telemetry/gui/TelemetryEdit.java @@ -174,8 +174,7 @@ private JButton buildCloseButton() { } /** - * We could load checkboxes information from somewhere (properties file or from - * other strange places) + * We could load checkboxes information from somewhere (properties file or from other strange places) * * @return */ @@ -208,8 +207,7 @@ private List buildPermissionCheckboxes(ApplicationContext appli } /** - * Action for confirmation button: inserts for the first time in the telemetry - * table or updates the existing row + * Action for confirmation button: inserts for the first time in the telemetry table or updates the existing row * * @param checkboxes * @param telemetryManager @@ -223,8 +221,8 @@ public void actionPerformed(ActionEvent e) { if (!agreementCheckbox.isSelected()) { MessageDialog.info(TelemetryEdit.this, - MessageBundle.formatMessage("angal.telemetry.fmt.confirm.pleaseselecttoproceed", - MessageBundle.getMessage(KEY_TELEMETRY_CHECKBOX))); + "angal.telemetry.fmt.confirm.pleaseselecttoproceed", + MessageBundle.getMessage(KEY_TELEMETRY_CHECKBOX)); return; } Map consentMap = buildConsentData(checkboxes); @@ -244,7 +242,7 @@ public void actionPerformed(ActionEvent e) { return; } } catch (RuntimeException | OHException f) { - LOGGER.error("Something strange happened: {}", f.getMessage()); + LOGGER.error("Something strange happened: {}", f.getMessage()); LOGGER.debug(f.getMessage(), f); } } else { diff --git a/src/main/java/org/isf/therapy/gui/TherapyEdit.java b/src/main/java/org/isf/therapy/gui/TherapyEdit.java index 1e6855e163..1c1b612976 100644 --- a/src/main/java/org/isf/therapy/gui/TherapyEdit.java +++ b/src/main/java/org/isf/therapy/gui/TherapyEdit.java @@ -1142,14 +1142,12 @@ public void mouseClicked(MouseEvent e) { model = list.getModel(); for (int i = 0; i < model.getSize(); i++) { Object iteratedItem = model.getElementAt(i); - if (iteratedItem instanceof Therapy) { - Therapy aTherapy = (Therapy) iteratedItem; + if (iteratedItem instanceof Therapy aTherapy) { if (therapyID != 0 && aTherapy.getTherapyID() == therapyID) { list.setSelectedIndex(i); } } - if (iteratedItem instanceof Visit) { - Visit aVisit = (Visit) iteratedItem; + if (iteratedItem instanceof Visit aVisit) { if (visitID != 0 && aVisit.getVisitID() == visitID) { list.setSelectedIndex(i); } diff --git a/src/main/java/org/isf/utils/jobjects/OhTableDrugsModel.java b/src/main/java/org/isf/utils/jobjects/OhTableDrugsModel.java index 4d1d50b63f..ebfe1b2b8f 100644 --- a/src/main/java/org/isf/utils/jobjects/OhTableDrugsModel.java +++ b/src/main/java/org/isf/utils/jobjects/OhTableDrugsModel.java @@ -97,8 +97,7 @@ public Object getValueAt(int rowIndex, int columnIndex) { String value = ""; if (rowIndex >= 0 && rowIndex < this.filteredList.size()) { T obj = this.filteredList.get(rowIndex); - if (obj instanceof MovementWard) { - MovementWard drugObj = (MovementWard) obj; + if (obj instanceof MovementWard drugObj) { switch (columnIndex) { case 0: String dt; diff --git a/src/main/java/org/isf/utils/jobjects/OhTableModel.java b/src/main/java/org/isf/utils/jobjects/OhTableModel.java index d2780e654b..6ce43fc84c 100644 --- a/src/main/java/org/isf/utils/jobjects/OhTableModel.java +++ b/src/main/java/org/isf/utils/jobjects/OhTableModel.java @@ -67,8 +67,7 @@ public T filter(String searchQuery) throws OHException { for (T t : this.dataList) { Object object = t; - if (object instanceof Price) { - Price price = (Price) object; + if (object instanceof Price price) { String strItem = price.getItem() + price.getDesc(); if (allowSearchByCode && searchQuery.equalsIgnoreCase(price.getItem())) { T resPbj = (T) object; @@ -83,8 +82,7 @@ public T filter(String searchQuery) throws OHException { } } - if (object instanceof MedicalWard) { - MedicalWard mdw = (MedicalWard) object; + if (object instanceof MedicalWard mdw) { String strItem = mdw.getMedical().getProdCode() + mdw.getMedical().getDescription(); if (allowSearchByCode && searchQuery.equalsIgnoreCase(mdw.getMedical().getProdCode())) { @@ -101,8 +99,7 @@ public T filter(String searchQuery) throws OHException { } } - if (object instanceof PricesOthers) { - PricesOthers priceO = (PricesOthers) object; + if (object instanceof PricesOthers priceO) { String strItem = priceO.getCode() + priceO.getDescription(); if (allowSearchByCode && searchQuery.equalsIgnoreCase(priceO.getCode())) { @@ -119,8 +116,7 @@ public T filter(String searchQuery) throws OHException { } } - if (object instanceof BillItems) { - BillItems priceO = (BillItems) object; + if (object instanceof BillItems priceO) { String strItem = priceO.getItemDisplayCode() + priceO.getItemDescription(); if (allowSearchByCode && searchQuery.equalsIgnoreCase(priceO.getItemDisplayCode())) { @@ -188,24 +184,21 @@ public Object getValueAt(int rowIndex, int columnIndex) { String value = ""; if (rowIndex >= 0 && rowIndex < this.filteredList.size()) { T obj = this.filteredList.get(rowIndex); - if (obj instanceof Price) { - Price priceObj = (Price) obj; + if (obj instanceof Price priceObj) { if (columnIndex == 0) { value = priceObj.getItem() != null ? priceObj.getItem() : String.valueOf(priceObj.getId()); } else { value = priceObj.getDesc(); } } - if (obj instanceof MedicalWard) { - MedicalWard mdwObj = (MedicalWard) obj; + if (obj instanceof MedicalWard mdwObj) { if (columnIndex == 0) { value = mdwObj.getMedical().getProdCode() != null ? mdwObj.getMedical().getProdCode() : String.valueOf(mdwObj.getMedical().getCode()); } else { value = mdwObj.getMedical().getDescription(); } } - if (obj instanceof PricesOthers) { - PricesOthers mdwObj = (PricesOthers) obj; + if (obj instanceof PricesOthers mdwObj) { if (columnIndex == 0) { value = mdwObj.getCode() != null ? mdwObj.getCode() : String.valueOf(mdwObj.getId()); } else { @@ -213,8 +206,7 @@ public Object getValueAt(int rowIndex, int columnIndex) { } } - if (obj instanceof BillItems) { - BillItems mdwObj = (BillItems) obj; + if (obj instanceof BillItems mdwObj) { if (columnIndex == 0) { value = mdwObj.getItemDisplayCode() != null ? mdwObj.getItemDisplayCode() : String.valueOf(mdwObj.getId()); } else { diff --git a/src/main/java/org/isf/utils/jobjects/OhTableOperationModel.java b/src/main/java/org/isf/utils/jobjects/OhTableOperationModel.java index 812c360f46..6946646975 100644 --- a/src/main/java/org/isf/utils/jobjects/OhTableOperationModel.java +++ b/src/main/java/org/isf/utils/jobjects/OhTableOperationModel.java @@ -63,8 +63,7 @@ public int filter(String searchQuery) { for (T t : this.dataList) { Object object = t; - if (object instanceof OperationRow) { - OperationRow price = (OperationRow) object; + if (object instanceof OperationRow price) { String strItem = price.getOperation().getCode() + price.getOpResult(); strItem = strItem.toLowerCase(); searchQuery = searchQuery.toLowerCase(); @@ -126,8 +125,7 @@ public Object getValueAt(int rowIndex, int columnIndex) { String value = ""; if (rowIndex >= 0 && rowIndex < this.filteredList.size()) { T obj = this.filteredList.get(rowIndex); - if (obj instanceof OperationRow) { - OperationRow opdObj = (OperationRow) obj; + if (obj instanceof OperationRow opdObj) { switch (columnIndex) { case -1: return opdObj; diff --git a/src/main/java/org/isf/video/PhotoboothTester.java b/src/main/java/org/isf/video/PhotoboothTester.java index 994f13453e..878383f5ed 100644 --- a/src/main/java/org/isf/video/PhotoboothTester.java +++ b/src/main/java/org/isf/video/PhotoboothTester.java @@ -46,16 +46,14 @@ public static void main(final String[] args) { final PhotoboothPanelPresentationModel presentationModel = new PhotoboothPanelPresentationModel(); presentationModel.addBeanPropertyChangeListener(PhotoboothPanelModel.PROPERTY_IMAGE, propertyChangeEvent -> { final Object newValue = propertyChangeEvent.getNewValue(); - if (newValue instanceof BufferedImage) { - final BufferedImage bufferedImage = (BufferedImage) newValue; - LOGGER.info("New image is being set {}x{}", bufferedImage.getWidth(), bufferedImage.getHeight()); + if (newValue instanceof BufferedImage bufferedImage) { + LOGGER.info("New image is being set {}x{}", bufferedImage.getWidth(), bufferedImage.getHeight()); } }); presentationModel.addBeanPropertyChangeListener(PhotoboothPanelModel.PROPERTY_RESOLUTION, propertyChangeEvent -> { Object newValue = propertyChangeEvent.getNewValue(); - if (newValue instanceof Dimension) { - final Dimension newDimension = (Dimension) newValue; - LOGGER.info("New dimension is {}x{}", newDimension.getWidth(), newDimension.getHeight()); + if (newValue instanceof Dimension newDimension) { + LOGGER.info("New dimension is {}x{}", newDimension.getWidth(), newDimension.getHeight()); } }); diff --git a/src/main/java/org/isf/video/gui/PhotoboothComponentImpl.java b/src/main/java/org/isf/video/gui/PhotoboothComponentImpl.java index 644e091074..25c71ad390 100644 --- a/src/main/java/org/isf/video/gui/PhotoboothComponentImpl.java +++ b/src/main/java/org/isf/video/gui/PhotoboothComponentImpl.java @@ -58,9 +58,8 @@ public Component getListCellRendererComponent(final JList list, final boolean isSelected, final boolean cellHasFocus) { final Component component = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); - if (value instanceof Dimension) { - final Dimension valueAsDimension = (Dimension) value; - setText(String.format("%d x %d", (int) valueAsDimension.getWidth(), (int) valueAsDimension.getHeight())); + if (value instanceof Dimension valueAsDimension) { + setText(String.format("%d x %d", (int) valueAsDimension.getWidth(), (int) valueAsDimension.getHeight())); } return component; } @@ -73,9 +72,8 @@ public Component getListCellRendererComponent(final JList list, final boolean isSelected, final boolean cellHasFocus) { final Component component = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); - if (value instanceof Webcam) { - final Webcam webcam = (Webcam) value; - setText(webcam.getName()); + if (value instanceof Webcam webcam) { + setText(webcam.getName()); } return component; } diff --git a/src/test/java/org/isf/accounting/gui/BillDataLoaderTest.java b/src/test/java/org/isf/accounting/gui/BillDataLoaderTest.java index ccbb8d9ee9..54a12a956b 100644 --- a/src/test/java/org/isf/accounting/gui/BillDataLoaderTest.java +++ b/src/test/java/org/isf/accounting/gui/BillDataLoaderTest.java @@ -28,113 +28,106 @@ import java.util.Collections; import java.util.List; -import org.isf.accounting.TestBill; import org.isf.accounting.manager.BillBrowserManager; import org.isf.accounting.model.Bill; +import org.isf.accounting.service.AccountingIoOperations; import org.isf.patient.model.Patient; import org.isf.utils.exception.OHServiceException; import org.junit.jupiter.api.Test; +import org.mockito.Mock; class BillDataLoaderTest { - + private static final String NO_USERNAME = null; - @Test - void shouldLoadPendingBillsFromManagerForParentPatient() throws OHServiceException { - // given: - Patient patientParent = new Patient(); - patientParent.setCode(1); - BillDataLoader billDataLoader = new BillDataLoader( - Collections.emptyList(), - Collections.emptyList(), - patientParent, - new BillBrowserManager() { - @Override - public List getPendingBillsAffiliate(int patID) throws OHServiceException { - return new ArrayList<>(Arrays.asList( - TestBill.notDeletedBillWithStatus(1, "O"), - TestBill.notDeletedBillWithStatus(2, "O"), - TestBill.notDeletedBillWithStatus(3, "O") - )); - } - } - ); - - // when: - List result = billDataLoader.loadBills("O", NO_USERNAME); - - // then: - assertThat(result).hasSize(3); - } - - @Test - void shouldLoadPendingBillsFromPeriodOnly() throws OHServiceException { - // given: - BillDataLoader billDataLoader = new BillDataLoader( - Arrays.asList( - TestBill.notDeletedBillWithStatus(1, "C"), - TestBill.notDeletedBillWithStatus(2, "O") - ), - Arrays.asList( - TestBill.notDeletedBillWithStatus(1, "C"), - TestBill.notDeletedBillWithStatus(3, "O") - ), - null, - new BillBrowserManager() - ); - - // when: - List result = billDataLoader.loadBills("O", NO_USERNAME); - - // then: - assertThat(result).hasSize(1); - } - - @Test - void shouldLoadAllBillsMergedWithBillsFromPaymentWithoutDuplicates() throws OHServiceException { - // given: - BillDataLoader billDataLoader = new BillDataLoader( - Arrays.asList( - TestBill.notDeletedBillWithStatus(1, "O"), - TestBill.notDeletedBillWithStatus(2, "C") - ), - Arrays.asList( - TestBill.notDeletedBillWithStatus(1, "0"), - TestBill.notDeletedBillWithStatus(3, "C") - ), - null, - new BillBrowserManager() - ); - - // when: - List result = billDataLoader.loadBills("ALL", NO_USERNAME); - - // then: - assertThat(result).hasSize(3); - } - - @Test - void shouldLoadClosedBillFromGivenPeriod() throws OHServiceException { - // given: - BillDataLoader billDataLoader = new BillDataLoader( - Arrays.asList( - TestBill.notDeletedBillWithStatus(1, "O"), - TestBill.notDeletedBillWithStatus(2, "C") - ), - Arrays.asList( - TestBill.notDeletedBillWithStatus(1, "0"), - TestBill.notDeletedBillWithStatus(3, "C") - ), - null, - new BillBrowserManager() - ); - - // when: - List result = billDataLoader.loadBills("C", NO_USERNAME); - - // then: - assertThat(result).hasSize(1); - } - - -} \ No newline at end of file + @Mock + private AccountingIoOperations accountingIoOperations; + + @Test + void shouldLoadPendingBillsFromManagerForParentPatient() throws OHServiceException { + // given: + Patient patientParent = new Patient(); + patientParent.setCode(1); + BillDataLoader billDataLoader = new BillDataLoader( + Collections.emptyList(), + Collections.emptyList(), + patientParent, + new BillBrowserManager(accountingIoOperations) { + + @Override + public List getPendingBillsAffiliate(int patID) throws OHServiceException { + return new ArrayList<>(Arrays.asList( + TestBill.notDeletedBillWithStatus(1, "O"), + TestBill.notDeletedBillWithStatus(2, "O"), + TestBill.notDeletedBillWithStatus(3, "O"))); + } + }); + + // when: + List result = billDataLoader.loadBills("O", NO_USERNAME); + + // then: + assertThat(result).hasSize(3); + } + + @Test + void shouldLoadPendingBillsFromPeriodOnly() throws OHServiceException { + // given: + BillDataLoader billDataLoader = new BillDataLoader( + Arrays.asList( + TestBill.notDeletedBillWithStatus(1, "C"), + TestBill.notDeletedBillWithStatus(2, "O")), + Arrays.asList( + TestBill.notDeletedBillWithStatus(1, "C"), + TestBill.notDeletedBillWithStatus(3, "O")), + null, + new BillBrowserManager(accountingIoOperations)); + + // when: + List result = billDataLoader.loadBills("O", NO_USERNAME); + + // then: + assertThat(result).hasSize(1); + } + + @Test + void shouldLoadAllBillsMergedWithBillsFromPaymentWithoutDuplicates() throws OHServiceException { + // given: + BillDataLoader billDataLoader = new BillDataLoader( + Arrays.asList( + TestBill.notDeletedBillWithStatus(1, "O"), + TestBill.notDeletedBillWithStatus(2, "C")), + Arrays.asList( + TestBill.notDeletedBillWithStatus(1, "0"), + TestBill.notDeletedBillWithStatus(3, "C")), + null, + new BillBrowserManager(accountingIoOperations)); + + // when: + List result = billDataLoader.loadBills("ALL", NO_USERNAME); + + // then: + assertThat(result).hasSize(3); + } + + @Test + void shouldLoadClosedBillFromGivenPeriod() throws OHServiceException { + // given: + BillDataLoader billDataLoader = new BillDataLoader( + Arrays.asList( + TestBill.notDeletedBillWithStatus(1, "O"), + TestBill.notDeletedBillWithStatus(2, "C")), + Arrays.asList( + TestBill.notDeletedBillWithStatus(1, "0"), + TestBill.notDeletedBillWithStatus(3, "C")), + null, + new BillBrowserManager(accountingIoOperations)); + + // when: + List result = billDataLoader.loadBills("C", NO_USERNAME); + + // then: + assertThat(result).hasSize(1); + } + +} diff --git a/src/test/java/org/isf/accounting/TestBill.java b/src/test/java/org/isf/accounting/gui/TestBill.java similarity index 97% rename from src/test/java/org/isf/accounting/TestBill.java rename to src/test/java/org/isf/accounting/gui/TestBill.java index 3a41f75cc7..b502648f0a 100644 --- a/src/test/java/org/isf/accounting/TestBill.java +++ b/src/test/java/org/isf/accounting/gui/TestBill.java @@ -19,7 +19,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.isf.accounting; +package org.isf.accounting.gui; import org.isf.accounting.model.Bill; diff --git a/src/test/java/org/isf/accounting/TestPayment.java b/src/test/java/org/isf/accounting/gui/TestPayment.java similarity index 97% rename from src/test/java/org/isf/accounting/TestPayment.java rename to src/test/java/org/isf/accounting/gui/TestPayment.java index 97e0988123..1dc8a4c91d 100644 --- a/src/test/java/org/isf/accounting/TestPayment.java +++ b/src/test/java/org/isf/accounting/gui/TestPayment.java @@ -19,7 +19,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.isf.accounting; +package org.isf.accounting.gui; import org.isf.accounting.model.Bill; import org.isf.accounting.model.BillPayments; diff --git a/src/test/java/org/isf/accounting/gui/totals/BalanceTotalTest.java b/src/test/java/org/isf/accounting/gui/totals/BalanceTotalTest.java index 7c62cace19..6d39a3b06d 100644 --- a/src/test/java/org/isf/accounting/gui/totals/BalanceTotalTest.java +++ b/src/test/java/org/isf/accounting/gui/totals/BalanceTotalTest.java @@ -26,7 +26,7 @@ import java.math.BigDecimal; import java.util.Arrays; -import org.isf.accounting.TestBill; +import org.isf.accounting.gui.TestBill; import org.junit.jupiter.api.Test; class BalanceTotalTest { diff --git a/src/test/java/org/isf/accounting/gui/totals/PaymentsTotalTest.java b/src/test/java/org/isf/accounting/gui/totals/PaymentsTotalTest.java index 4ebf3d8add..aab1e1f412 100644 --- a/src/test/java/org/isf/accounting/gui/totals/PaymentsTotalTest.java +++ b/src/test/java/org/isf/accounting/gui/totals/PaymentsTotalTest.java @@ -26,8 +26,8 @@ import java.math.BigDecimal; import java.util.Arrays; -import org.isf.accounting.TestBill; -import org.isf.accounting.TestPayment; +import org.isf.accounting.gui.TestBill; +import org.isf.accounting.gui.TestPayment; import org.junit.jupiter.api.Test; class PaymentsTotalTest { diff --git a/src/test/java/org/isf/accounting/gui/totals/UserTotalTest.java b/src/test/java/org/isf/accounting/gui/totals/UserTotalTest.java index baf48c6a99..7ffd2bf395 100644 --- a/src/test/java/org/isf/accounting/gui/totals/UserTotalTest.java +++ b/src/test/java/org/isf/accounting/gui/totals/UserTotalTest.java @@ -26,8 +26,8 @@ import java.math.BigDecimal; import java.util.Arrays; -import org.isf.accounting.TestBill; -import org.isf.accounting.TestPayment; +import org.isf.accounting.gui.TestBill; +import org.isf.accounting.gui.TestPayment; import org.junit.jupiter.api.Test; class UserTotalTest { diff --git a/src/test/java/org/isf/admission/gui/ward/WardBrowserManagerStub.java b/src/test/java/org/isf/admission/gui/ward/WardBrowserManagerStub.java index 14f1a31708..3080544e18 100644 --- a/src/test/java/org/isf/admission/gui/ward/WardBrowserManagerStub.java +++ b/src/test/java/org/isf/admission/gui/ward/WardBrowserManagerStub.java @@ -24,11 +24,21 @@ import java.util.ArrayList; import java.util.List; +import org.isf.admission.manager.AdmissionBrowserManager; import org.isf.ward.manager.WardBrowserManager; import org.isf.ward.model.Ward; +import org.isf.ward.service.WardIoOperations; +import org.mockito.Mock; public class WardBrowserManagerStub extends WardBrowserManager { + @Mock + private WardIoOperations wardIoOperations; + + public WardBrowserManagerStub(AdmissionBrowserManager admissionBrowserManager, WardIoOperations wardIoOperations) { + super(admissionBrowserManager, wardIoOperations); + } + private final List wards = new ArrayList<>(); @Override diff --git a/src/test/java/org/isf/admission/gui/ward/WardComboBoxInitializerTest.java b/src/test/java/org/isf/admission/gui/ward/WardComboBoxInitializerTest.java index 8c8496c206..ce283549ef 100644 --- a/src/test/java/org/isf/admission/gui/ward/WardComboBoxInitializerTest.java +++ b/src/test/java/org/isf/admission/gui/ward/WardComboBoxInitializerTest.java @@ -43,7 +43,7 @@ class WardComboBoxInitializerTest { @BeforeEach void setUp() { - wardBrowserManager = new WardBrowserManagerStub(); + wardBrowserManager = new WardBrowserManagerStub(null, null); wardComboBox = new JComboBox(); } @@ -57,13 +57,12 @@ void shouldSkipFemaleWardForMalePatient() throws OHServiceException { // when: new WardComboBoxInitializer( - wardComboBox, - wardBrowserManager, - patient, - null, - false, - TestAdmission.withAdmAndDisDate(TimeTools.getNow(), TimeTools.getNow()) - ).initialize(); + wardComboBox, + wardBrowserManager, + patient, + null, + false, + TestAdmission.withAdmAndDisDate(TimeTools.getNow(), TimeTools.getNow())).initialize(); // then: assertThat(wardComboBox.getItemCount()).isEqualTo(2); @@ -82,13 +81,12 @@ void shouldSkipWardWithoutBeds() throws OHServiceException { // when: new WardComboBoxInitializer( - wardComboBox, - wardBrowserManager, - patient, - null, - false, - TestAdmission.withAdmAndDisDate(TimeTools.getNow(), TimeTools.getNow()) - ).initialize(); + wardComboBox, + wardBrowserManager, + patient, + null, + false, + TestAdmission.withAdmAndDisDate(TimeTools.getNow(), TimeTools.getNow())).initialize(); // then: assertThat(wardComboBox.getItemCount()).isEqualTo(2); @@ -106,13 +104,12 @@ void shouldSkipMaleWardForFemalePatient() throws OHServiceException { // when: new WardComboBoxInitializer( - wardComboBox, - wardBrowserManager, - patient, - null, - false, - TestAdmission.withAdmAndDisDate(TimeTools.getNow(), TimeTools.getNow()) - ).initialize(); + wardComboBox, + wardBrowserManager, + patient, + null, + false, + TestAdmission.withAdmAndDisDate(TimeTools.getNow(), TimeTools.getNow())).initialize(); // then: assertThat(wardComboBox.getItemCount()).isEqualTo(2); @@ -131,13 +128,12 @@ void shouldSelectRecentlySavedWard() throws OHServiceException { // when: new WardComboBoxInitializer( - wardComboBox, - wardBrowserManager, - patient, - recentlySavedWard, - false, - TestAdmission.withAdmAndDisDate(TimeTools.getNow(), TimeTools.getNow()) - ).initialize(); + wardComboBox, + wardBrowserManager, + patient, + recentlySavedWard, + false, + TestAdmission.withAdmAndDisDate(TimeTools.getNow(), TimeTools.getNow())).initialize(); // then: assertThat(((Ward) wardComboBox.getSelectedItem()).getCode()).isEqualTo(recentlySavedWard.getCode()); @@ -152,18 +148,17 @@ void shouldSelectWardFromAdmissionWhenEditing() throws OHServiceException { wardBrowserManager.newWard(editedWard); wardBrowserManager.newWard(TestWard.femaleWardWithBeds("2")); Admission admission = TestAdmission.withAdmAndDisDateAndWard(TimeTools.getNow(), - TimeTools.getNow(), - editedWard); + TimeTools.getNow(), + editedWard); // when: new WardComboBoxInitializer( - wardComboBox, - wardBrowserManager, - patient, - null, - true, - admission - ).initialize(); + wardComboBox, + wardBrowserManager, + patient, + null, + true, + admission).initialize(); // then: assertThat(((Ward) wardComboBox.getSelectedItem()).getCode()).isEqualTo(editedWard.getCode());