if (getIdentifier().isEmpty()) { addIdentifier(); } return getIdentifier().get(0); } /** * @return {@link #status} (planned | arrived | triaged | in-progress | onleave | finished | cancelled +.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value */ public Enumeration<EncounterStatus> getStatusElement() {
copyDomainResource(src, tgt); for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(convertIdentifier(t)); tgt.setStatus(convertEncounterState(src.getStatus()));
public static void main(String[] args) { // Create an incomplete encounter (status is required) Encounter enc = new Encounter(); enc.addIdentifier().setSystem("http://acme.org/encNums").setValue("12345"); // Create a new validator FhirContext ctx = FhirContext.forDstu3(); FhirValidator validator = ctx.newValidator(); // Did we succeed? ValidationResult result = validator.validateWithResult(enc); System.out.println("Success: " + result.isSuccessful()); // What was the result OperationOutcome outcome = (OperationOutcome) result.toOperationOutcome(); IParser parser = ctx.newXmlParser().setPrettyPrint(true); System.out.println(parser.encodeResourceToString(outcome)); } }
public static void main(String[] args) { // Create an incomplete encounter (status is required) Encounter enc = new Encounter(); enc.addIdentifier().setSystem("http://acme.org/encNums").setValue("12345"); // Create a new validator FhirValidator validator = FhirContext.forDstu3().newValidator(); // Cache this object! Supplies structure definitions DefaultProfileValidationSupport support = new DefaultProfileValidationSupport(); // Create the validator FhirInstanceValidator module = new FhirInstanceValidator(support); validator.registerValidatorModule(module); // Did we succeed? IParser parser = FhirContext.forDstu3().newXmlParser().setPrettyPrint(true); System.out.println(parser.encodeResourceToString(validator.validateWithResult(enc).toOperationOutcome())); } }
case -892481550: return getStatusElement(); case -986695614: return addStatusHistory(); case 94742904: return getClass_(); case 962575356: return addClassHistory(); case 3575610: return addType(); case -1165461084: return getPriority(); case -1867885268: return getSubject(); case -1892140189: return addEpisodeOfCare(); case -1258204701: return addIncomingReferral(); case 767422259: return addParticipant(); case -1474995297: return getAppointment(); case -991726143: return getPeriod(); case -1106363674: return getLength(); case -934964668: return addReason(); case 1196993265: return addDiagnosis(); case -1177318867: return addAccount(); case 1057894634: return getHospitalization(); case 1901043637: return addLocation(); case 243182534: return getServiceProvider(); case -995410646: return getPartOf(); default: return super.makeProperty(hash, name); } } @Override public String[] getTypesForProperty(int hash, String name) throws FHIRException { switch (hash) { case -1618432855: /*identifier*/ return new String[] {"Identifier"};
copyDomainResource(src, tgt); for (org.hl7.fhir.instance.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(convertIdentifier(t)); tgt.setStatus(convertEncounterState(src.getStatus()));