@Create public abstract MethodOutcome createNewPatient(@ResourceParam Patient thePatient); //END SNIPPET: createClient
returnTypeFromAnnotation = patch.type(); } else if (create != null) { returnTypeFromAnnotation = create.type(); } else if (update != null) { returnTypeFromAnnotation = update.type();
/** A FHIR create */ @Create public MethodOutcome createPatient(@ResourceParam Patient thePatient);
returnTypeFromAnnotation = patch.type(); } else if (create != null) { returnTypeFromAnnotation = create.type(); } else if (update != null) { returnTypeFromAnnotation = update.type();
@Create public MethodOutcome create(@ResourceParam T theResource) { long idPart = myNextId++; String idPartAsString = Long.toString(idPart); Long versionIdPart = 1L; IIdType id = store(theResource, idPartAsString, versionIdPart); myCreateCount.incrementAndGet(); return new MethodOutcome() .setCreated(true) .setId(id); }
returnTypeFromAnnotation = patch.type(); } else if (create != null) { returnTypeFromAnnotation = create.type(); } else if (update != null) { returnTypeFromAnnotation = update.type();
@Create public MethodOutcome createPatient(@ResourceParam Patient patient) { patient.setId(createId(counter, 1L)); patients.put(String.valueOf(counter), patient); return new MethodOutcome(patient.getIdElement()); }
returnTypeFromAnnotation = patch.type(); } else if (create != null) { returnTypeFromAnnotation = create.type(); } else if (update != null) { returnTypeFromAnnotation = update.type();
@Create public MethodOutcome createPatientConditional( @ResourceParam Patient thePatient, @ConditionalUrlParam String theConditionalUrl) { if (theConditionalUrl != null) { // We are doing a conditional create // populate this with the ID of the existing resource which // matches the conditional URL return new MethodOutcome(); } else { // We are doing a normal create // populate this with the ID of the newly created resource return new MethodOutcome(); } } //END SNIPPET: createConditional
@Create public MethodOutcome createPatientResource(@ResourceParam Patient thePatient) { // ..save the resouce.. IdType id = new IdType("123"); // the new databse primary key for this resource // Get the tag list List<Coding> tags = thePatient.getMeta().getTag(); for (Coding tag : tags) { // process/save each tag somehow } return new MethodOutcome(id); } //END SNIPPET: createTags
@Create public MethodOutcome create(@ResourceParam final Patient patient, @ConditionalUrlParam String theConditional) { // create the patient ... return new MethodOutcome(new IdDt(1L)).setCreated(true); }
@Create public MethodOutcome create(HttpServletRequest theRequest, @ResourceParam T theResource, @ConditionalUrlParam String theConditional, RequestDetails theRequestDetails) { startRequest(theRequest); try { if (theConditional != null) { return getDao().create(theResource, theConditional, theRequestDetails); } else { return getDao().create(theResource, theRequestDetails); } } finally { endRequest(theRequest); } }
@Create public MethodOutcome create(HttpServletRequest theRequest, @ResourceParam T theResource, @ConditionalUrlParam String theConditional, RequestDetails theRequestDetails) { startRequest(theRequest); try { if (theConditional != null) { return getDao().create(theResource, theConditional, theRequestDetails); } else { return getDao().create(theResource, theRequestDetails); } } finally { endRequest(theRequest); } }
@Create public MethodOutcome create(HttpServletRequest theRequest, @ResourceParam T theResource, @ConditionalUrlParam String theConditional, RequestDetails theRequestDetails) { startRequest(theRequest); try { if (theConditional != null) { return getDao().create(theResource, theConditional, theRequestDetails); } else { return getDao().create(theResource, theRequestDetails); } } finally { endRequest(theRequest); } }
@Create public MethodOutcome createPatient(@ResourceParam Patient thePatient) {
@Create void create(@ResourceParam Patient thePatient) { // save the resource }
@Create MethodOutcome create(@ResourceParam Patient thePatient);
@Create public MethodOutcome create(@ResourceParam T theResource) { long idPart = myNextId++; String idPartAsString = Long.toString(idPart); Long versionIdPart = 1L; IIdType id = store(theResource, idPartAsString, versionIdPart); myCreateCount.incrementAndGet(); return new MethodOutcome() .setCreated(true) .setId(id); }
@Create public MethodOutcome create(HttpServletRequest theRequest, @ResourceParam T theResource, @ConditionalUrlParam String theConditional, RequestDetails theRequestDetails) { startRequest(theRequest); try { if (theConditional != null) { return getDao().create(theResource, theConditional, theRequestDetails); } else { return getDao().create(theResource, theRequestDetails); } } finally { endRequest(theRequest); } }
@Create public MethodOutcome create(HttpServletRequest theRequest, @ResourceParam T theResource, @ConditionalUrlParam String theConditional, RequestDetails theRequestDetails) { startRequest(theRequest); try { if (theConditional != null) { return getDao().create(theResource, theConditional, theRequestDetails); } else { return getDao().create(theResource, theRequestDetails); } } finally { endRequest(theRequest); } }