forked from Raxa/raxacore
-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from johnstoecker/master
Merging drug info from diegodayan
- Loading branch information
Showing
28 changed files
with
3,428 additions
and
1,386 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
target/ | ||
.DS_Store |
206 changes: 103 additions & 103 deletions
206
api/src/main/java/org/raxa/module/raxacore/DrugGroup.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,103 +1,103 @@ | ||
package org.raxa.module.raxacore; | ||
|
||
/** | ||
* Copyright 2012, Raxa | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
* use this file except in compliance with the License. You may obtain a copy of | ||
* the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations under | ||
* the License. | ||
*/ | ||
import java.io.Serializable; | ||
import java.util.Set; | ||
import java.util.HashSet; | ||
import org.openmrs.BaseOpenmrsMetadata; | ||
import org.openmrs.Drug; | ||
|
||
/** | ||
* PatientList stores the data needed to lists patients for registration, | ||
* screener, etc. | ||
*/ | ||
public class DrugGroup extends BaseOpenmrsMetadata implements Serializable { | ||
|
||
private Integer drugGroupId; | ||
|
||
public DrugGroup() { | ||
} | ||
|
||
/** | ||
* Sets id | ||
* | ||
* @param id: id to set | ||
*/ | ||
@Override | ||
public void setId(Integer id) { | ||
setDrugGroupId(id); | ||
} | ||
|
||
/** | ||
* Gets id | ||
* | ||
* @return the patientListId | ||
*/ | ||
@Override | ||
public Integer getId() { | ||
return getDrugGroupId(); | ||
} | ||
|
||
/** | ||
* Compares two PatientList objects for similarity | ||
* | ||
* @param obj PatientList object to compare to | ||
* @return boolean true/false whether or not they are the same objects | ||
* @see java.lang.Object#equals(java.lang.Object) @should equal PatientList | ||
* with same patientListId @should not equal PatientList with different | ||
* patientListId @should not equal on null @should have equal patientList | ||
* objects with no patientListIds @should not have equal PatientList objects | ||
* when one has null patientListId | ||
*/ | ||
@Override | ||
public boolean equals(Object obj) { | ||
if (obj instanceof DrugGroup) { | ||
DrugGroup pList = (DrugGroup) obj; | ||
if (this.getDrugGroupId() != null && pList.getDrugGroupId() != null) { | ||
return (this.getDrugGroupId().equals(pList.getDrugGroupId())); | ||
} | ||
} | ||
return this == obj; | ||
} | ||
|
||
/** | ||
* @see java.lang.Object#hashCode() @should have same hashcode when equal | ||
* @should have different hash code when not equal @should get hash code | ||
* with null attributes | ||
*/ | ||
@Override | ||
public int hashCode() { | ||
if (this.getDrugGroupId() == null) { | ||
return super.hashCode(); | ||
} | ||
return this.getDrugGroupId().hashCode(); | ||
} | ||
|
||
/** | ||
* @return the patientListId | ||
*/ | ||
public Integer getDrugGroupId() { | ||
return drugGroupId; | ||
} | ||
|
||
/** | ||
* @param patientListId the patientListId to set | ||
*/ | ||
public void setDrugGroupId(Integer patientListId) { | ||
this.drugGroupId = patientListId; | ||
} | ||
} | ||
package org.raxa.module.raxacore; | ||
|
||
/** | ||
* Copyright 2012, Raxa | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
* use this file except in compliance with the License. You may obtain a copy of | ||
* the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations under | ||
* the License. | ||
*/ | ||
import java.io.Serializable; | ||
import java.util.Set; | ||
import java.util.HashSet; | ||
import org.openmrs.BaseOpenmrsMetadata; | ||
import org.openmrs.Drug; | ||
|
||
/** | ||
* PatientList stores the data needed to lists patients for registration, | ||
* screener, etc. | ||
*/ | ||
public class DrugGroup extends BaseOpenmrsMetadata implements Serializable { | ||
|
||
private Integer drugGroupId; | ||
|
||
public DrugGroup() { | ||
} | ||
|
||
/** | ||
* Sets id | ||
* | ||
* @param id: id to set | ||
*/ | ||
@Override | ||
public void setId(Integer id) { | ||
setDrugGroupId(id); | ||
} | ||
|
||
/** | ||
* Gets id | ||
* | ||
* @return the patientListId | ||
*/ | ||
@Override | ||
public Integer getId() { | ||
return getDrugGroupId(); | ||
} | ||
|
||
/** | ||
* Compares two PatientList objects for similarity | ||
* | ||
* @param obj PatientList object to compare to | ||
* @return boolean true/false whether or not they are the same objects | ||
* @see java.lang.Object#equals(java.lang.Object) @should equal PatientList | ||
* with same patientListId @should not equal PatientList with different | ||
* patientListId @should not equal on null @should have equal patientList | ||
* objects with no patientListIds @should not have equal PatientList objects | ||
* when one has null patientListId | ||
*/ | ||
@Override | ||
public boolean equals(Object obj) { | ||
if (obj instanceof DrugGroup) { | ||
DrugGroup pList = (DrugGroup) obj; | ||
if (this.getDrugGroupId() != null && pList.getDrugGroupId() != null) { | ||
return (this.getDrugGroupId().equals(pList.getDrugGroupId())); | ||
} | ||
} | ||
return this == obj; | ||
} | ||
|
||
/** | ||
* @see java.lang.Object#hashCode() @should have same hashcode when equal | ||
* @should have different hash code when not equal @should get hash code | ||
* with null attributes | ||
*/ | ||
@Override | ||
public int hashCode() { | ||
if (this.getDrugGroupId() == null) { | ||
return super.hashCode(); | ||
} | ||
return this.getDrugGroupId().hashCode(); | ||
} | ||
|
||
/** | ||
* @return the patientListId | ||
*/ | ||
public Integer getDrugGroupId() { | ||
return drugGroupId; | ||
} | ||
|
||
/** | ||
* @param patientListId the patientListId to set | ||
*/ | ||
public void setDrugGroupId(Integer patientListId) { | ||
this.drugGroupId = patientListId; | ||
} | ||
} |
Oops, something went wrong.