@Override protected DateProperty create() { return new DateProperty(); } },
@Override public Model getUPDATEModel(Representation rep) { return new ModelImpl() .property("dateEnrolled", new DateProperty()) .property("dateCompleted", new DateProperty()); //FIXME missing props }
@Override public Model getUPDATEModel(Representation rep) { return new ModelImpl() .property("startDate", new DateProperty()) .property("endDate", new DateProperty()); }
@Override public Model getUPDATEModel(Representation rep) { return new ModelImpl() .property("startDate", new DateProperty()) .property("endDate", new DateProperty()) .property("voided", new BooleanProperty()); } }
@Override public Model getCREATEModel(Representation rep) { return new ModelImpl() .property("patientUuid", new StringProperty()) .property("startDate", new DateProperty()) .property("endDate", new DateProperty()); }
@Override public Model getGETModel(Representation rep) { ModelImpl model = (ModelImpl) super.getGETModel(rep); if (rep instanceof DefaultRepresentation || rep instanceof FullRepresentation) { model .property("uuid", new StringProperty()) .property("display", new StringProperty()) .property("startDate", new DateProperty()) .property("endDate", new DateProperty()) .property("patientUuid", new StringProperty()); } //FIXME missing props return model; }
@Override public Model getUPDATEModel(Representation rep) { return new ModelImpl() //FIXME use super. .property("dateEnrolled", new DateProperty()) .property("states", new ArrayProperty(new RefProperty("#/definitions/ProgramenrollmentStateCreate"))) .property("outcome", new RefProperty("#/definitions/ConceptCreate")) .property("location", new RefProperty("#/definitions/LocationCreate")) .property("voided", new BooleanProperty()) .property("dateCompleted", new DateProperty()) .required("dateEnrolled"); }
@Override public Model getUPDATEModel(Representation rep) { return new ModelImpl().property("visitType", new RefProperty("#/definitions/VisittypeCreate")) .property("startDatetime", new DateProperty()) .property("location", new RefProperty("#/definitions/LocationCreate")) .property("indication", new RefProperty("#/definitions/ConceptCreate")) .property("stopDatetime", new DateProperty()) .property("encounters", new ArrayProperty(new RefProperty("#/definitions/EncounterCreate"))) .property("attributes", new ArrayProperty(new StringProperty())); //FIXME type }
@Override public Model getCREATEModel(Representation rep) { ModelImpl model = new ModelImpl() .property("personA", new StringProperty().example("uuid")) .property("relationshipType", new StringProperty().example("uuid")) .property("personB", new StringProperty().example("uuid")) .property("startDate", new DateProperty()) .property("endDate", new DateProperty()) .required("personA").required("relationshipType").required("personB"); if (rep instanceof FullRepresentation) { model .property("personA", new RefProperty("#/definitions/PersonCreate")) .property("relationshipType", new RefProperty("#/definitions/RelationshiptypeCreate")) .property("personB", new RefProperty("#/definitions/PersonCreate")); } return model; }
@Override public Model getCREATEModel(Representation representation) { ModelImpl model = new ModelImpl() .property("names", new ArrayProperty(new RefProperty("#/definitions/PersonNameCreate"))) .property("gender", new StringProperty()._enum("M")._enum("F")) .property("age", new IntegerProperty()) .property("birthdate", new DateProperty()) .property("birthdateEstimated", new BooleanProperty()._default(false)) .property("dead", new BooleanProperty()._default(false)) .property("deathDate", new DateProperty()) .property("causeOfDeath", new StringProperty()) .property("addresses", new ArrayProperty(new RefProperty("#/definitions/PersonAddressCreate"))) .property("attributes", new ArrayProperty(new RefProperty("#/definitions/PersonAttributeCreate"))); model.setRequired(Arrays.asList("names", "gender")); return model; }
@Override public Model getCREATEModel(Representation rep) { ModelImpl model = new ModelImpl() .property("patient", new StringProperty().example("uuid")) .property("program", new StringProperty().example("uuid")) .property("dateEnrolled", new DateProperty()) .property("dateCompleted", new DateProperty()) .property("location", new StringProperty().example("uuid")) .property("voided", new BooleanProperty()) .required("patient").required("program").required("dateEnrolled"); if (rep instanceof FullRepresentation) { model .property("patient", new RefProperty("#/definitions/PatientCreate")) .property("program", new RefProperty("#/definitions/ProgramCreate")) .property("location", new RefProperty("#/definitions/LocationCreate")); } return model; }
@Override public Model getUPDATEModel(Representation representation) { return new ModelImpl() .property("dead", new BooleanProperty()) .property("causeOfDeath", new StringProperty()) .property("deathDate", new DateProperty()) .property("age", new IntegerProperty()) .property("gender", new StringProperty()._enum("M")._enum("F")) .property("birthdate", new DateProperty()) .property("birthdateEstimated", new BooleanProperty()._default(false)) .property("preferredName", new StringProperty().example("uuid")) .property("preferredAddress", new StringProperty().example("uuid")) .property("attributes", new ArrayProperty(new RefProperty("#/definitions/PersonAttributeCreate"))) .required("dead").required("causeOfDeath"); }
@Override public Model getCREATEModel(Representation rep) { return new ModelImpl() .property("patient", new StringProperty().example("uuid")) .property("concept", new StringProperty().example("uuid")) .property("startDate", new DateProperty()) .property("autoExpireDate", new DateProperty()) .property("standardRegimenCode", new StringProperty()) .property("instructions", new StringProperty()) .required("patient").required("concept"); }
@Override public Model getGETModel(Representation rep) { ModelImpl model = new ModelImpl(); if (rep instanceof DefaultRepresentation || rep instanceof FullRepresentation) { model .property("startDate", new DateProperty()) .property("autoExpireDate", new DateProperty()) .property("standardRegimenCode", new StringProperty()); } if (rep instanceof DefaultRepresentation) { model .property("patient", new RefProperty("#/definitions/PatientGetRef")) .property("concept", new RefProperty("#/definitions/ConceptGetRef")); } else if (rep instanceof FullRepresentation) { model .property("patient", new RefProperty("#/definitions/PatientGet")) .property("concept", new RefProperty("#/definitions/ConceptGet")); } return model; }
public Model getGETModel(Representation rep) { ModelImpl model = ((ModelImpl) super.getGETModel(rep)) .property("uuid", new StringProperty()) .property("display", new StringProperty()) .property("startDate", new DateProperty()) .property("endDate", new DateProperty()) .property("comments", new StringProperty()) .property("voided", new BooleanProperty()); if (rep instanceof DefaultRepresentation) { model .property("person", new RefProperty("#/definitions/PersonGet")) .property("activeListType", new StringProperty()) //FIXME type .property("startObs", new RefProperty("#/definitions/ObsGet")) .property("stopObs", new RefProperty("#/definitions/ObsGetRef")); } else if (rep instanceof FullRepresentation) { model .property("person", new RefProperty("#/definitions/PersonGetRef")) .property("activeListType", new StringProperty()) //FIXME type .property("startObs", new RefProperty("#/definitions/ObsGetRef")) .property("stopObs", new RefProperty("#/definitions/ObsGetRef")); } return model; }
@Override public Model getCREATEModel(Representation rep) { return new ModelImpl() .property("preferred", new BooleanProperty()._default(false)) .property("address1", new StringProperty()) .property("address2", new StringProperty()) .property("cityVillage", new StringProperty()) .property("stateProvince", new StringProperty()) .property("country", new StringProperty()) .property("postalCode", new StringProperty()) .property("countyDistrict", new StringProperty()) .property("address3", new StringProperty()) .property("address4", new StringProperty()) .property("address5", new StringProperty()) .property("address6", new StringProperty()) .property("startDate", new DateProperty()) .property("endDate", new DateProperty()) .property("latitude", new StringProperty()) .property("longitude", new StringProperty()); }
@Override public Model getCREATEModel(Representation rep) { ModelImpl model = new ModelImpl() .property("person", new StringProperty()) .property("startDate", new DateProperty()) .property("comments", new StringProperty()) .property("startObs", new StringProperty()) .property("stopObs", new StringProperty()) .required("person").required("startDate"); if (rep instanceof FullRepresentation) { model .property("person", new RefProperty("#/definitions/PersonCreate")) .property("startObs", new RefProperty("#/definitions/ObsCreate")) .property("stopObs", new RefProperty("#/definitions/ObsCreate")); } return model; }
@Override public Model getCREATEModel(Representation rep) { ModelImpl model = new ModelImpl().property("patient", new StringProperty().example("uuid")) .property("visitType", new StringProperty().example("uuid")).property("startDatetime", new DateProperty()) .property("location", new StringProperty().example("uuid")).property("indication", new StringProperty()) .property("stopDatetime", new DateProperty()) .property("encounters", new ArrayProperty(new StringProperty().example("uuid"))) .property("attributes", new ArrayProperty(new RefProperty("#/definitions/VisitAttributeCreate"))) .required("patient").required("visitType"); if (rep instanceof FullRepresentation) { model.property("patient", new RefProperty("#/definitions/PatientCreate")) .property("visitType", new RefProperty("#/definitions/VisittypeCreate")) .property("location", new RefProperty("#/definitions/LocationCreate")) .property("indication", new RefProperty("#/definitions/ConceptCreate")) .property("encounters", new ArrayProperty(new RefProperty("#/definitions/EncounterCreate"))); } return model; }
@Override public Model getCREATEModel(Representation rep) { return new ModelImpl() .property("patient", new RefProperty("#/definitions/PatientCreate")) .property("encounterType", new RefProperty("#/definitions/EncountertypeCreate")) .property("encounterDatetime", new DateProperty()) .property("location", new RefProperty("#/definitions/LocationCreate")) .property("form", new RefProperty("#/definitions/FormCreate")) .property("provider", new StringProperty()) .property("orders", new ArrayProperty(new RefProperty("#/definitions/OrderCreate"))) .property("obs", new ArrayProperty(new RefProperty("#/definitions/ObsCreate"))) .required("patient").required("encounterType"); }
@Override public Model getGETModel(Representation rep) { ModelImpl modelImpl = (ModelImpl) super.getGETModel(rep); if (rep instanceof DefaultRepresentation || rep instanceof FullRepresentation) { modelImpl.property("uuid", new StringProperty()).property("display", new StringProperty()) .property("startDatetime", new DateProperty()).property("stopDatetime", new DateProperty()) .property("attributes", new ArrayProperty(new StringProperty())) //FIXME type .property("voided", new BooleanProperty()); } if (rep instanceof DefaultRepresentation) { modelImpl.property("patient", new RefProperty("#/definitions/PatientGetRef")) .property("visitType", new RefProperty("#/definitions/VisittypeGetRef")) .property("indication", new RefProperty("#/definitions/ConceptGetRef")) .property("location", new RefProperty("#/definitions/LocationGetRef")) .property("encounters", new ArrayProperty(new RefProperty("#/definitions/EncounterGetRef"))); } else if (rep instanceof FullRepresentation) { modelImpl.property("patient", new RefProperty("#/definitions/PatientGet")) .property("visitType", new RefProperty("#/definitions/VisittypeGet")) .property("indication", new RefProperty("#/definitions/ConceptGet")) .property("location", new RefProperty("#/definitions/LocationGet")) .property("encounters", new ArrayProperty(new RefProperty("#/definitions/EncounterGet"))); } return modelImpl; }