Java 类ims.core.vo.MedicationDoseCollection 实例源码
项目:AvoinApotti
文件:Logic.java
private void setDoses(MedicationDoseCollection prescribedDoses)
{
form.dyngrdDoses().getRows().clear();
if (prescribedDoses == null)
return;
for (int i = 0; i < prescribedDoses.size(); i++)
{
setDoseRowValue(form.dyngrdDoses().getRows().newRow(), prescribedDoses.get(i));
}
}
项目:openMAXIMS
文件:Logic.java
private void setDoses(MedicationDoseCollection prescribedDoses)
{
form.dyngrdDoses().getRows().clear();
if (prescribedDoses == null)
return;
for (int i = 0; i < prescribedDoses.size(); i++)
{
setDoseRowValue(form.dyngrdDoses().getRows().newRow(), prescribedDoses.get(i));
}
}
项目:openMAXIMS
文件:Logic.java
private void setDoses(MedicationDoseCollection prescribedDoses)
{
form.dyngrdDoses().getRows().clear();
if (prescribedDoses == null)
return;
for (int i = 0; i < prescribedDoses.size(); i++)
{
setDoseRowValue(form.dyngrdDoses().getRows().newRow(), prescribedDoses.get(i));
}
}
项目:AvoinApotti
文件:Logic.java
private void copyMedicationOverViewDropAuthoringHCPAndDiscontinuedMeds(MedicationOverViewVo currentMedicationOverView)
{
currentMedicationOverView.setAuthoringInformation(null);
PatientMedicationVoCollection copyOfMeds = new PatientMedicationVoCollection();
for(int i = 0 ; i < currentMedicationOverView.getMedication().size() ; i++)
{
PatientMedicationVo voMed = currentMedicationOverView.getMedication().get(i);
if ( (voMed.getIsDiscontinued() == null) || (voMed.getIsDiscontinuedIsNotNull() && (voMed.getIsDiscontinued().booleanValue() == false))
&& (voMed.getPrescribedDosesIsNotNull()))
{
MedicationDoseCollection copyOfDoses = new MedicationDoseCollection();
boolean bAllDosesAreDiscontinued = true;
MedicationDose voDose = null;
//Loop thru to see if collection has any non-discontinued Doses.
for (int k = 0 ; k < voMed.getPrescribedDoses().size() ; k++)
{
voDose = voMed.getPrescribedDoses().get(k);
if ((voDose.getIsStopped() == null) || (voDose.getIsStoppedIsNotNull() && (voDose.getIsStopped().booleanValue() == false)) )
bAllDosesAreDiscontinued = false;
}
//If there is then copy valid doses and the med itself.
if (!bAllDosesAreDiscontinued)
{
for(int j = 0 ; j < voMed.getPrescribedDoses().size() ; j++)
{
voDose = voMed.getPrescribedDoses().get(j);
if ((voDose.getIsStopped() == null) || (voDose.getIsStoppedIsNotNull() && (voDose.getIsStopped().booleanValue() == false)) )
{
voDose.setID_PatientMedicationDose(null);
voDose.setAuthoringInformation(form.customControlAuthoringInfo().getValue());
voDose.setIsCopied(new Boolean(true));
copyOfDoses.add(voDose);
}
}
voMed.setPrescribedDoses(copyOfDoses);
voMed.setID_PatientMedication(null);
voMed.setAuthoringInformation(form.customControlAuthoringInfo().getValue());
voMed.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
voMed.setNoDaysSupply(null);//wdev-1462
voMed.setIsInTTO(null);//wdev-1462
voMed.setIsCopied(new Boolean(true));
copyOfMeds.add(voMed);
}
}
}
currentMedicationOverView.setMedication(copyOfMeds);
currentMedicationOverView.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
form.getLocalContext().setCurrentOverView(currentMedicationOverView);
}
项目:AvoinApotti
文件:Logic.java
private void fillDosesGridReadOnly(MedicationDoseCollection prescribedDoses)
{
form.ctnDetails().dyngrdDoses().getRows().clear();
for(int i = 0 ; i < prescribedDoses.size() ; i++)
{
DynamicGridRow childRow = form.ctnDetails().dyngrdDoses().getRows().newRow();
MedicationDose voDose = prescribedDoses.get(i);
DynamicGridCell cell1 = childRow.getCells().newCell(form.ctnDetails().dyngrdDoses().getColumns().getByIdentifier(COL_DOSE_DOSE), DynamicCellType.LABEL);
cell1.setValue(voDose.getDoseIsNotNull() ? voDose.getDose() : "");
cell1.setTooltip(voDose.getDiscontinuedTooltip());
cell1.setIdentifier(voDose.getDose());
cell1.setWidth(120);
DynamicGridCell cell2 = childRow.getCells().newCell(form.ctnDetails().dyngrdDoses().getColumns().getByIdentifier(COL_DOSE_ROUTE), DynamicCellType.LABEL);
cell2.setValue(voDose.getAdminRouteIsNotNull() ? voDose.getAdminRoute().toString() : "");
cell2.setIdentifier(voDose.getAdminRoute());
cell2.setWidth(120);
DynamicGridCell cell3 = childRow.getCells().newCell(form.ctnDetails().dyngrdDoses().getColumns().getByIdentifier(COL_DOSE_TIMES), DynamicCellType.LABEL);
cell3.setValue(voDose.getAdminTimesIsNotNull() ? createTimesString(voDose.getAdminTimes()) : "");
cell3.setTooltip(voDose.getAdminTimesIsNotNull() ? createTimesString(voDose.getAdminTimes()) : "");
cell3.setIdentifier(voDose.getAdminTimes());
cell3.setWidth(140);
DynamicGridCell cell6 = childRow.getCells().newCell(form.ctnDetails().dyngrdDoses().getColumns().getByIdentifier(COL_DOSE_COMMENCED_BY_TYPE), DynamicCellType.LABEL);
cell6.setValue(voDose.getCommencedByTypeIsNotNull() ? voDose.getCommencedByType().toString() : "");
cell6.setIdentifier(voDose.getCommencedByType());
cell6.setWidth(140);
DynamicGridCell cell4 = childRow.getCells().newCell(form.ctnDetails().dyngrdDoses().getColumns().getByIdentifier(COL_DOSE_COMMENCED_BY), DynamicCellType.LABEL);
cell4.setValue(voDose.getDoseStartHcpIsNotNull() ? voDose.getDoseStartHcp().toString() : "");
cell4.setIdentifier(voDose.getDoseStartHcp());
cell4.setWidth(160);
DynamicGridCell cell5 = childRow.getCells().newCell(form.ctnDetails().dyngrdDoses().getColumns().getByIdentifier(COL_DOSE_COMMENCED_DATE), DynamicCellType.LABEL);
cell5.setValue(voDose.getDoseStartDateIsNotNull() ? voDose.getDoseStartDate().toString() : null);
cell5.setIdentifier(voDose.getDoseStartDate());
cell5.setWidth(-1);
childRow.setValue(voDose);
childRow.setExpanded(true);
if ( (voDose.getIsStoppedIsNotNull()) && (voDose.getIsStopped().booleanValue()) )
childRow.setBold(false);
else
childRow.setBold(true);
}
}
项目:openMAXIMS
文件:Logic.java
private void copyMedicationOverViewDropAuthoringHCPAndDiscontinuedMeds(MedicationOverViewVo currentMedicationOverView)
{
currentMedicationOverView.setAuthoringInformation(null);
PatientMedicationVoCollection copyOfMeds = new PatientMedicationVoCollection();
for(int i = 0 ; i < currentMedicationOverView.getMedication().size() ; i++)
{
PatientMedicationVo voMed = currentMedicationOverView.getMedication().get(i);
if ( (voMed.getIsDiscontinued() == null) || (voMed.getIsDiscontinuedIsNotNull() && (voMed.getIsDiscontinued().booleanValue() == false))
&& (voMed.getPrescribedDosesIsNotNull()))
{
MedicationDoseCollection copyOfDoses = new MedicationDoseCollection();
boolean bAllDosesAreDiscontinued = true;
MedicationDose voDose = null;
//Loop thru to see if collection has any non-discontinued Doses.
for (int k = 0 ; k < voMed.getPrescribedDoses().size() ; k++)
{
voDose = voMed.getPrescribedDoses().get(k);
if ((voDose.getIsStopped() == null) || (voDose.getIsStoppedIsNotNull() && (voDose.getIsStopped().booleanValue() == false)) )
bAllDosesAreDiscontinued = false;
}
//If there is then copy valid doses and the med itself.
if (!bAllDosesAreDiscontinued)
{
for(int j = 0 ; j < voMed.getPrescribedDoses().size() ; j++)
{
voDose = voMed.getPrescribedDoses().get(j);
if ((voDose.getIsStopped() == null) || (voDose.getIsStoppedIsNotNull() && (voDose.getIsStopped().booleanValue() == false)) )
{
voDose.setID_PatientMedicationDose(null);
voDose.setAuthoringInformation(form.customControlAuthoringInfo().getValue());
voDose.setIsCopied(new Boolean(true));
copyOfDoses.add(voDose);
}
}
voMed.setPrescribedDoses(copyOfDoses);
voMed.setID_PatientMedication(null);
voMed.setAuthoringInformation(form.customControlAuthoringInfo().getValue());
voMed.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
voMed.setNoDaysSupply(null);//wdev-1462
voMed.setIsInTTO(null);//wdev-1462
voMed.setIsCopied(new Boolean(true));
copyOfMeds.add(voMed);
}
}
}
currentMedicationOverView.setMedication(copyOfMeds);
currentMedicationOverView.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
form.getLocalContext().setCurrentOverView(currentMedicationOverView);
}
项目:openMAXIMS
文件:Logic.java
private void fillDosesGridReadOnly(MedicationDoseCollection prescribedDoses)
{
form.ctnDetails().dyngrdDoses().getRows().clear();
for(int i = 0 ; i < prescribedDoses.size() ; i++)
{
DynamicGridRow childRow = form.ctnDetails().dyngrdDoses().getRows().newRow();
MedicationDose voDose = prescribedDoses.get(i);
DynamicGridCell cell1 = childRow.getCells().newCell(form.ctnDetails().dyngrdDoses().getColumns().getByIdentifier(COL_DOSE_DOSE), DynamicCellType.LABEL);
cell1.setValue(voDose.getDoseIsNotNull() ? voDose.getDose() : "");
cell1.setTooltip(voDose.getDiscontinuedTooltip());
cell1.setIdentifier(voDose.getDose());
cell1.setWidth(120);
DynamicGridCell cell2 = childRow.getCells().newCell(form.ctnDetails().dyngrdDoses().getColumns().getByIdentifier(COL_DOSE_ROUTE), DynamicCellType.LABEL);
cell2.setValue(voDose.getAdminRouteIsNotNull() ? voDose.getAdminRoute().toString() : "");
cell2.setIdentifier(voDose.getAdminRoute());
cell2.setWidth(120);
DynamicGridCell cell3 = childRow.getCells().newCell(form.ctnDetails().dyngrdDoses().getColumns().getByIdentifier(COL_DOSE_TIMES), DynamicCellType.LABEL);
cell3.setValue(voDose.getAdminTimesIsNotNull() ? createTimesString(voDose.getAdminTimes()) : "");
cell3.setTooltip(voDose.getAdminTimesIsNotNull() ? createTimesString(voDose.getAdminTimes()) : "");
cell3.setIdentifier(voDose.getAdminTimes());
cell3.setWidth(140);
DynamicGridCell cell6 = childRow.getCells().newCell(form.ctnDetails().dyngrdDoses().getColumns().getByIdentifier(COL_DOSE_COMMENCED_BY_TYPE), DynamicCellType.LABEL);
cell6.setValue(voDose.getCommencedByTypeIsNotNull() ? voDose.getCommencedByType().toString() : "");
cell6.setIdentifier(voDose.getCommencedByType());
cell6.setWidth(140);
DynamicGridCell cell4 = childRow.getCells().newCell(form.ctnDetails().dyngrdDoses().getColumns().getByIdentifier(COL_DOSE_COMMENCED_BY), DynamicCellType.LABEL);
cell4.setValue(voDose.getDoseStartHcpIsNotNull() ? voDose.getDoseStartHcp().toString() : "");
cell4.setIdentifier(voDose.getDoseStartHcp());
cell4.setWidth(160);
DynamicGridCell cell5 = childRow.getCells().newCell(form.ctnDetails().dyngrdDoses().getColumns().getByIdentifier(COL_DOSE_COMMENCED_DATE), DynamicCellType.LABEL);
cell5.setValue(voDose.getDoseStartDateIsNotNull() ? voDose.getDoseStartDate().toString() : null);
cell5.setIdentifier(voDose.getDoseStartDate());
//WDEV-20591
// cell5.setWidth(-1);
cell5.setWidth(80);
//WDEV-20591
DynamicGridCell cell7 = childRow.getCells().newCell(form.ctnDetails().dyngrdDoses().getColumns().getByIdentifier(COL_DOSE_COMMENT), DynamicCellType.LABEL);
cell7.setValue(voDose.getCommentIsNotNull() ? voDose.getComment() : null);
cell7.setIdentifier(voDose.getComment());
cell7.setWidth(-1);
childRow.setValue(voDose);
childRow.setExpanded(true);
if ( (voDose.getIsStoppedIsNotNull()) && (voDose.getIsStopped().booleanValue()) )
childRow.setBold(false);
else
childRow.setBold(true);
}
}
项目:openMAXIMS
文件:Logic.java
private void fillDosesGridReadOnly(MedicationDoseCollection prescribedDoses)
{
form.ctnDetails().dyngrdDoses().getRows().clear();
for(int i = 0 ; i < prescribedDoses.size() ; i++)
{
DynamicGridRow childRow = form.ctnDetails().dyngrdDoses().getRows().newRow();
MedicationDose voDose = prescribedDoses.get(i);
DynamicGridCell cell1 = childRow.getCells().newCell(form.ctnDetails().dyngrdDoses().getColumns().getByIdentifier(COL_DOSE_DOSE), DynamicCellType.LABEL);
cell1.setValue(voDose.getDoseIsNotNull() ? voDose.getDose() : "");
cell1.setTooltip(voDose.getDiscontinuedTooltip());
cell1.setIdentifier(voDose.getDose());
// cell1.setWidth(120);
cell1.setWidth(60); //WDEV-21114
DynamicGridCell cell2 = childRow.getCells().newCell(form.ctnDetails().dyngrdDoses().getColumns().getByIdentifier(COL_DOSE_ROUTE), DynamicCellType.LABEL);
cell2.setValue(voDose.getAdminRouteIsNotNull() ? voDose.getAdminRoute().toString() : "");
cell2.setIdentifier(voDose.getAdminRoute());
// cell2.setWidth(120);
cell2.setWidth(100); //WDEV-21114
DynamicGridCell cell3 = childRow.getCells().newCell(form.ctnDetails().dyngrdDoses().getColumns().getByIdentifier(COL_DOSE_TIMES), DynamicCellType.LABEL);
cell3.setValue(voDose.getAdminTimesIsNotNull() ? createTimesString(voDose.getAdminTimes()) : "");
cell3.setTooltip(voDose.getAdminTimesIsNotNull() ? createTimesString(voDose.getAdminTimes()) : "");
cell3.setIdentifier(voDose.getAdminTimes());
cell3.setWidth(140);
DynamicGridCell cell6 = childRow.getCells().newCell(form.ctnDetails().dyngrdDoses().getColumns().getByIdentifier(COL_DOSE_COMMENCED_BY_TYPE), DynamicCellType.LABEL);
cell6.setValue(voDose.getCommencedByTypeIsNotNull() ? voDose.getCommencedByType().toString() : "");
cell6.setIdentifier(voDose.getCommencedByType());
cell6.setWidth(140);
DynamicGridCell cell4 = childRow.getCells().newCell(form.ctnDetails().dyngrdDoses().getColumns().getByIdentifier(COL_DOSE_COMMENCED_BY), DynamicCellType.LABEL);
cell4.setValue(voDose.getDoseStartHcpIsNotNull() ? voDose.getDoseStartHcp().toString() : "");
cell4.setIdentifier(voDose.getDoseStartHcp());
cell4.setWidth(160);
DynamicGridCell cell5 = childRow.getCells().newCell(form.ctnDetails().dyngrdDoses().getColumns().getByIdentifier(COL_DOSE_COMMENCED_DATE), DynamicCellType.LABEL);
cell5.setValue(voDose.getDoseStartDateIsNotNull() ? voDose.getDoseStartDate().toString() : null);
cell5.setIdentifier(voDose.getDoseStartDate());
cell5.setWidth(80);
DynamicGridCell cell7 = childRow.getCells().newCell(form.ctnDetails().dyngrdDoses().getColumns().getByIdentifier(COL_DOSE_COMMENT), DynamicCellType.LABEL);
cell7.setValue(voDose.getCommentIsNotNull() ? voDose.getComment() : null);
cell7.setIdentifier(voDose.getComment());
cell7.setWidth(-1);
childRow.setValue(voDose);
childRow.setExpanded(true);
if ( (voDose.getIsStoppedIsNotNull()) && (voDose.getIsStopped().booleanValue()) )
{
childRow.setBold(false);
}
else
{
childRow.setBold(true);
}
}
}
项目:openMAXIMS
文件:Logic.java
private void copyMedicationOverViewDropAuthoringHCPAndDiscontinuedMeds(MedicationOverViewVo currentMedicationOverView)
{
currentMedicationOverView.setAuthoringInformation(null);
PatientMedicationVoCollection copyOfMeds = new PatientMedicationVoCollection();
for(int i = 0 ; i < currentMedicationOverView.getMedication().size() ; i++)
{
PatientMedicationVo voMed = currentMedicationOverView.getMedication().get(i);
if ( (voMed.getIsDiscontinued() == null) || (voMed.getIsDiscontinuedIsNotNull() && (voMed.getIsDiscontinued().booleanValue() == false))
&& (voMed.getPrescribedDosesIsNotNull()))
{
MedicationDoseCollection copyOfDoses = new MedicationDoseCollection();
boolean bAllDosesAreDiscontinued = true;
MedicationDose voDose = null;
//Loop thru to see if collection has any non-discontinued Doses.
for (int k = 0 ; k < voMed.getPrescribedDoses().size() ; k++)
{
voDose = voMed.getPrescribedDoses().get(k);
if ((voDose.getIsStopped() == null) || (voDose.getIsStoppedIsNotNull() && (voDose.getIsStopped().booleanValue() == false)) )
bAllDosesAreDiscontinued = false;
}
//If there is then copy valid doses and the med itself.
if (!bAllDosesAreDiscontinued)
{
for(int j = 0 ; j < voMed.getPrescribedDoses().size() ; j++)
{
voDose = voMed.getPrescribedDoses().get(j);
if ((voDose.getIsStopped() == null) || (voDose.getIsStoppedIsNotNull() && (voDose.getIsStopped().booleanValue() == false)) )
{
voDose.setID_PatientMedicationDose(null);
voDose.setAuthoringInformation(form.customControlAuthoringInfo().getValue());
voDose.setIsCopied(new Boolean(true));
copyOfDoses.add(voDose);
}
}
voMed.setPrescribedDoses(copyOfDoses);
voMed.setID_PatientMedication(null);
voMed.setAuthoringInformation(form.customControlAuthoringInfo().getValue());
voMed.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
voMed.setNoDaysSupply(null);//wdev-1462
voMed.setIsInTTO(null);//wdev-1462
voMed.setIsCopied(new Boolean(true));
copyOfMeds.add(voMed);
}
}
}
currentMedicationOverView.setMedication(copyOfMeds);
currentMedicationOverView.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
form.getLocalContext().setCurrentOverView(currentMedicationOverView);
}
项目:openMAXIMS
文件:Logic.java
private void fillDosesGridReadOnly(MedicationDoseCollection prescribedDoses)
{
form.ctnDetails().dyngrdDoses().getRows().clear();
for(int i = 0 ; i < prescribedDoses.size() ; i++)
{
DynamicGridRow childRow = form.ctnDetails().dyngrdDoses().getRows().newRow();
MedicationDose voDose = prescribedDoses.get(i);
DynamicGridCell cell1 = childRow.getCells().newCell(form.ctnDetails().dyngrdDoses().getColumns().getByIdentifier(COL_DOSE_DOSE), DynamicCellType.LABEL);
cell1.setValue(voDose.getDoseIsNotNull() ? voDose.getDose() : "");
cell1.setTooltip(voDose.getDiscontinuedTooltip());
cell1.setIdentifier(voDose.getDose());
cell1.setWidth(120);
DynamicGridCell cell2 = childRow.getCells().newCell(form.ctnDetails().dyngrdDoses().getColumns().getByIdentifier(COL_DOSE_ROUTE), DynamicCellType.LABEL);
cell2.setValue(voDose.getAdminRouteIsNotNull() ? voDose.getAdminRoute().toString() : "");
cell2.setIdentifier(voDose.getAdminRoute());
cell2.setWidth(120);
DynamicGridCell cell3 = childRow.getCells().newCell(form.ctnDetails().dyngrdDoses().getColumns().getByIdentifier(COL_DOSE_TIMES), DynamicCellType.LABEL);
cell3.setValue(voDose.getAdminTimesIsNotNull() ? createTimesString(voDose.getAdminTimes()) : "");
cell3.setTooltip(voDose.getAdminTimesIsNotNull() ? createTimesString(voDose.getAdminTimes()) : "");
cell3.setIdentifier(voDose.getAdminTimes());
cell3.setWidth(140);
DynamicGridCell cell6 = childRow.getCells().newCell(form.ctnDetails().dyngrdDoses().getColumns().getByIdentifier(COL_DOSE_COMMENCED_BY_TYPE), DynamicCellType.LABEL);
cell6.setValue(voDose.getCommencedByTypeIsNotNull() ? voDose.getCommencedByType().toString() : "");
cell6.setIdentifier(voDose.getCommencedByType());
cell6.setWidth(140);
DynamicGridCell cell4 = childRow.getCells().newCell(form.ctnDetails().dyngrdDoses().getColumns().getByIdentifier(COL_DOSE_COMMENCED_BY), DynamicCellType.LABEL);
cell4.setValue(voDose.getDoseStartHcpIsNotNull() ? voDose.getDoseStartHcp().toString() : "");
cell4.setIdentifier(voDose.getDoseStartHcp());
cell4.setWidth(160);
DynamicGridCell cell5 = childRow.getCells().newCell(form.ctnDetails().dyngrdDoses().getColumns().getByIdentifier(COL_DOSE_COMMENCED_DATE), DynamicCellType.LABEL);
cell5.setValue(voDose.getDoseStartDateIsNotNull() ? voDose.getDoseStartDate().toString() : null);
cell5.setIdentifier(voDose.getDoseStartDate());
cell5.setWidth(-1);
childRow.setValue(voDose);
childRow.setExpanded(true);
if ( (voDose.getIsStoppedIsNotNull()) && (voDose.getIsStopped().booleanValue()) )
childRow.setBold(false);
else
childRow.setBold(true);
}
}
项目:openmaxims-linux
文件:Logic.java
private void copyMedicationOverViewDropAuthoringHCPAndDiscontinuedMeds(MedicationOverViewVo currentMedicationOverView)
{
currentMedicationOverView.setAuthoringInformation(null);
PatientMedicationVoCollection copyOfMeds = new PatientMedicationVoCollection();
for(int i = 0 ; i < currentMedicationOverView.getMedication().size() ; i++)
{
PatientMedicationVo voMed = currentMedicationOverView.getMedication().get(i);
if ( (voMed.getIsDiscontinued() == null) || (voMed.getIsDiscontinuedIsNotNull() && (voMed.getIsDiscontinued().booleanValue() == false))
&& (voMed.getPrescribedDosesIsNotNull()))
{
MedicationDoseCollection copyOfDoses = new MedicationDoseCollection();
boolean bAllDosesAreDiscontinued = true;
MedicationDose voDose = null;
//Loop thru to see if collection has any non-discontinued Doses.
for (int k = 0 ; k < voMed.getPrescribedDoses().size() ; k++)
{
voDose = voMed.getPrescribedDoses().get(k);
if ((voDose.getIsStopped() == null) || (voDose.getIsStoppedIsNotNull() && (voDose.getIsStopped().booleanValue() == false)) )
bAllDosesAreDiscontinued = false;
}
//If there is then copy valid doses and the med itself.
if (!bAllDosesAreDiscontinued)
{
for(int j = 0 ; j < voMed.getPrescribedDoses().size() ; j++)
{
voDose = voMed.getPrescribedDoses().get(j);
if ((voDose.getIsStopped() == null) || (voDose.getIsStoppedIsNotNull() && (voDose.getIsStopped().booleanValue() == false)) )
{
voDose.setID_PatientMedicationDose(null);
voDose.setAuthoringInformation(form.customControlAuthoringInfo().getValue());
voDose.setIsCopied(new Boolean(true));
copyOfDoses.add(voDose);
}
}
voMed.setPrescribedDoses(copyOfDoses);
voMed.setID_PatientMedication(null);
voMed.setAuthoringInformation(form.customControlAuthoringInfo().getValue());
voMed.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
voMed.setNoDaysSupply(null);//wdev-1462
voMed.setIsInTTO(null);//wdev-1462
voMed.setIsCopied(new Boolean(true));
copyOfMeds.add(voMed);
}
}
}
currentMedicationOverView.setMedication(copyOfMeds);
currentMedicationOverView.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
form.getLocalContext().setCurrentOverView(currentMedicationOverView);
}
项目:openmaxims-linux
文件:Logic.java
private void fillDosesGridReadOnly(MedicationDoseCollection prescribedDoses)
{
form.ctnDetails().dyngrdDoses().getRows().clear();
for(int i = 0 ; i < prescribedDoses.size() ; i++)
{
DynamicGridRow childRow = form.ctnDetails().dyngrdDoses().getRows().newRow();
MedicationDose voDose = prescribedDoses.get(i);
DynamicGridCell cell1 = childRow.getCells().newCell(form.ctnDetails().dyngrdDoses().getColumns().getByIdentifier(COL_DOSE_DOSE), DynamicCellType.LABEL);
cell1.setValue(voDose.getDoseIsNotNull() ? voDose.getDose() : "");
cell1.setTooltip(voDose.getDiscontinuedTooltip());
cell1.setIdentifier(voDose.getDose());
cell1.setWidth(120);
DynamicGridCell cell2 = childRow.getCells().newCell(form.ctnDetails().dyngrdDoses().getColumns().getByIdentifier(COL_DOSE_ROUTE), DynamicCellType.LABEL);
cell2.setValue(voDose.getAdminRouteIsNotNull() ? voDose.getAdminRoute().toString() : "");
cell2.setIdentifier(voDose.getAdminRoute());
cell2.setWidth(120);
DynamicGridCell cell3 = childRow.getCells().newCell(form.ctnDetails().dyngrdDoses().getColumns().getByIdentifier(COL_DOSE_TIMES), DynamicCellType.LABEL);
cell3.setValue(voDose.getAdminTimesIsNotNull() ? createTimesString(voDose.getAdminTimes()) : "");
cell3.setTooltip(voDose.getAdminTimesIsNotNull() ? createTimesString(voDose.getAdminTimes()) : "");
cell3.setIdentifier(voDose.getAdminTimes());
cell3.setWidth(140);
DynamicGridCell cell6 = childRow.getCells().newCell(form.ctnDetails().dyngrdDoses().getColumns().getByIdentifier(COL_DOSE_COMMENCED_BY_TYPE), DynamicCellType.LABEL);
cell6.setValue(voDose.getCommencedByTypeIsNotNull() ? voDose.getCommencedByType().toString() : "");
cell6.setIdentifier(voDose.getCommencedByType());
cell6.setWidth(140);
DynamicGridCell cell4 = childRow.getCells().newCell(form.ctnDetails().dyngrdDoses().getColumns().getByIdentifier(COL_DOSE_COMMENCED_BY), DynamicCellType.LABEL);
cell4.setValue(voDose.getDoseStartHcpIsNotNull() ? voDose.getDoseStartHcp().toString() : "");
cell4.setIdentifier(voDose.getDoseStartHcp());
cell4.setWidth(160);
DynamicGridCell cell5 = childRow.getCells().newCell(form.ctnDetails().dyngrdDoses().getColumns().getByIdentifier(COL_DOSE_COMMENCED_DATE), DynamicCellType.LABEL);
cell5.setValue(voDose.getDoseStartDateIsNotNull() ? voDose.getDoseStartDate().toString() : null);
cell5.setIdentifier(voDose.getDoseStartDate());
cell5.setWidth(-1);
childRow.setValue(voDose);
childRow.setExpanded(true);
if ( (voDose.getIsStoppedIsNotNull()) && (voDose.getIsStopped().booleanValue()) )
childRow.setBold(false);
else
childRow.setBold(true);
}
}