初回実施月日の自動入力
初回実施月日が未設定の場合,今日の日付を入れるようにした。
client/KartePane.java
public void stamp(final ModuleModel stamp) {
if (stamp != null) {
//pns^ text stamp がここに入った時の対策(新規カルテにテキストスタンプ挿入するときここに来る)
・
・
// 「月 日」の自動挿入
StampModifier.modify(stamp);
//pns$
client/StampModifier.java
package open.dolphin.client;
import java.util.Calendar;
import open.dolphin.infomodel.ClaimBundle;
import open.dolphin.infomodel.ClaimItem;
import open.dolphin.infomodel.IInfoModel;
import open.dolphin.infomodel.ModuleModel;
/**
* drop された stamp を加工する
* @author pns
*/
public class StampModifier {
public static void modify(ModuleModel stamp) {
// 「初回実施 月 日」の日付自動入力
if (IInfoModel.ENTITY_TREATMENT.equals(stamp.getModuleInfo().getEntity())) {
ClaimBundle bundle = (ClaimBundle) stamp.getModel();
ClaimItem[] items = bundle.getClaimItem();
for (ClaimItem c : items) {
// 初回実施で number が入力されていない場合,今日の日付を入れる
if ("840000085".equals(c.getCode()) && "1".equals(c.getNumber())) {
Calendar calendar = Calendar.getInstance();
c.setNumber(String.format("%02d-%02d", calendar.get(Calendar.MONTH)+1, calendar.get(Calendar.DATE)));
break;
}
}
}
}
}
« シェーマの jpeg保存 vs png保存 | トップページ | 年齢ソート »
「OpenDolphin」カテゴリの記事
- OpenDolphin: Java 25 / WildFly 38 への移行(2025.11.09)
- 運用17年目のまとめ(2025.02.03)
- IME on/off の切換 - その2(2024.12.02)
- OrcaController オルコン(2024.11.28)
- OpenDolphin: java 21 / wildfly 34 への移行(2024.11.08)


