Commit 00758962 authored by luc chatty's avatar luc chatty
Browse files

Merge branch 'feature/PATREG-45' into 'develop'

PATREG-45 | add patient model

See merge request !1
parents e32e499f d0b462dd
package net.ihe.gazelle.app.patientregistryapi.business;
import java.util.ArrayList;
import java.util.List;
/**
* Address of the patient
*/
public class Address {
private String city;
private String countryIso3;
private String postalCode;
private String state;
private List<String> lines = new ArrayList<>();
private AddressUse use;
/**
* default constructor
*/
public Address() {
}
/**
* Complete constructor
* @param city address city
* @param countryIso3 address country code
* @param postalCode address postal code
* @param state address state
* @param use address patient use
*/
public Address(String city, String countryIso3, String postalCode, String state, AddressUse use) {
this.setCity(city);
this.setCountryIso3(countryIso3);
this.setPostalCode(postalCode);
this.setState(state);
this.setUse(use);
}
/**
* get address city
*
* @return
* possible object is
* {@link String }
*
*/
public String getCity() {
return city;
}
/**
* set address city
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setCity(String value) {
this.city = value;
}
/**
* get country iso code.
*
* @return
* possible object is
* {@link String }
*
*/
public String getCountryIso3() {
return countryIso3;
}
/**
* Set country iso Code
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setCountryIso3(String value) {
this.countryIso3 = value;
}
/**
* get address postal code
*
* @return
* possible object is
* {@link String }
*
*/
public String getPostalCode() {
return postalCode;
}
/**
* set address postal code
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setPostalCode(String value) {
this.postalCode = value;
}
/**
* get address state
*
* @return
* possible object is
* {@link String }
*
*/
public String getState() {
return state;
}
/**
* set address state
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setState(String value) {
this.state = value;
}
/**
* Gets the value of the lines property.
*
* <p>
* This accessor method returns a snapshot to the live list.
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link String }
*
*
*/
public List<String> getLines() {
return new ArrayList<>(this.lines);
}
/**
* add a line to an address
* @param line the line to add
*/
public void addLine(String line){
lines.add(line);
}
/**
* add a line to an address
* @param line the line to add
* @param index the index to insert the line
*/
public void addLine(String line, int index){
this.lines.add(index, line);
}
/**
* remove a line to an address
* @param line the line to remove
*/
public void removeLine(String line){
this.lines.remove(line);
}
/**
* get address use
*
* @return
* possible object is
* {@link AddressUse }
*
*/
public AddressUse getUse() {
return use;
}
/**
* set address use
*
* @param value
* allowed object is
* {@link AddressUse }
*
*/
public void setUse(AddressUse value) {
this.use = value;
}
}
package net.ihe.gazelle.app.patientregistryapi.business;
/**
* Possible address use for the patient
*/
public enum AddressUse {
BIRTH_PLACE,
BIRTH_DELIVERY,
HOME,
PRIMARY_HOME,
WORK,
TEMPORARY,
VACATION_HOME,
BAD,
BILLING,
DIRECT,
PUBLIC,
COUNTRY_OF_ORIGIN,
LEGAL,
MAILING,
BIRTH_RESIDENCE,
SERVICE,
SHIPPING;
/**
* get enum member name
* @return enum member name
*/
public String value() {
return name();
}
}
package net.ihe.gazelle.app.patientregistryapi.business;
/**
* Patient contact point
*/
public class ContactPoint {
protected ContactPointType type;
protected ContactPointUse use;
protected String value;
/**
* default constructor
*/
public ContactPoint() {
}
/**
* complete constructor
* @param type contact point type
* @param use contact point use
* @param value contact point value
*/
public ContactPoint(ContactPointType type, ContactPointUse use, String value) {
this.setType(type);
this.setUse(use);
this.setValue(value);
}
/**
* get contact type
*
* @return
* possible object is
* {@link ContactPointType }
*
*/
public ContactPointType getType() {
return type;
}
/**
* set contact type
*
* @param value
* allowed object is
* {@link ContactPointType }
*
*/
public void setType(ContactPointType value) {
this.type = value;
}
/**
* get contact use
*
* @return
* possible object is
* {@link ContactPointUse }
*
*/
public ContactPointUse getUse() {
return use;
}
/**
* set contact use
*
* @param value
* allowed object is
* {@link ContactPointUse }
*
*/
public void setUse(ContactPointUse value) {
this.use = value;
}
/**
* get contact value
*
* @return
* possible object is
* {@link String }
*
*/
public String getValue() {
return value;
}
/**
* set contact value
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setValue(String value) {
this.value = value;
}
}
package net.ihe.gazelle.app.patientregistryapi.business;
/**
* Possible contact points type for the patient
*/
public enum ContactPointType {
PHONE,
FAX,
MODEM,
MOBILE,
BEEPER,
EMAIL,
DEAF_DEVICE,
URL,
OTHER,
SMS;
/**
* get enum member name
* @return enum member name
*/
public String value() {
return name();
}
}
package net.ihe.gazelle.app.patientregistryapi.business;
/**
* Possible contact points use for the patient
*/
public enum ContactPointUse {
HOME,
PRIMARY_HOME,
WORK,
TEMPORARY,
EMERGENCY,
MOBILE,
BEEPER,
EMAIL,
OTHER,
ANSWERING_SERVICE,
DIRECT,
PUBLIC,
BAD;
/**
* get enum member name
* @return enum member name
*/
public String value() {
return name();
}
}
package net.ihe.gazelle.app.patientregistryapi.business;
/**
* Patient Identifier model
*/
public class EntityIdentifier {
protected String systemIdentifier;
protected String systemName;
protected String type;
protected String value;
/**
* complete constructor
* @param systemIdentifier identifier system id
* @param systemName identifier system name
* @param type identifier type
* @param value identifier value
*/
public EntityIdentifier(String systemIdentifier, String systemName, String type, String value) {
this.setSystemIdentifier(systemIdentifier);
this.setSystemName(systemName);
this.setType(type);
this.setValue(value);
}
/**
* default constructor
*/
public EntityIdentifier() {
}
/**
* get the system identifier associated with the identifier
*
* @return
* possible object is
* {@link String }
*
*/
public String getSystemIdentifier() {
return systemIdentifier;
}
/**
* set the system identifier associated with the identifier
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setSystemIdentifier(String value) {
this.systemIdentifier = value;
}
/**
* get the system name associated with the identifier
*
* @return
* possible object is
* {@link String }
*
*/
public String getSystemName() {
return systemName;
}
/**
* set the system name associated with the identifier
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setSystemName(String value) {
this.systemName = value;
}
/**
* get the identifier type
*
* @return
* possible object is
* {@link String }
*
*/
public String getType() {
return type;
}
/**
* set the identifier type
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setType(String value) {
this.type = value;
}
/**
* get the identifier value
*
* @return
* possible object is
* {@link String }
*
*/
public String getValue() {
return value;
}
/**
* set the identifier value
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setValue(String value) {
this.value = value;
}
}
package net.ihe.gazelle.app.patientregistryapi.business;
/**
* Possible gender codes for the patient
*/
public enum GenderCode {
MALE,
FEMALE,
UNDEFINED,