本文整理汇总了Java中ca.uhn.fhir.rest.api.MethodOutcome.setCreated方法的典型用法代码示例。如果您正苦于以下问题:Java MethodOutcome.setCreated方法的具体用法?Java MethodOutcome.setCreated怎么用?Java MethodOutcome.setCreated使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ca.uhn.fhir.rest.api.MethodOutcome
的用法示例。
在下文中一共展示了MethodOutcome.setCreated方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createPatient
import ca.uhn.fhir.rest.api.MethodOutcome; //导入方法依赖的package包/类
@Create
public MethodOutcome createPatient(HttpServletRequest theRequest, @ResourceParam Patient patient) {
log.debug("Update Patient Provider called");
MethodOutcome method = new MethodOutcome();
method.setCreated(true);
OperationOutcome opOutcome = new OperationOutcome();
method.setOperationOutcome(opOutcome);
Patient newPatient = null;
try {
newPatient = patientDao.update(ctx, patient, null,null);
method.setId(newPatient.getIdElement());
method.setResource(newPatient);
} catch (Exception ex) {
log.error(ex.getMessage());
}
log.debug("called create Patient method");
return method;
}
示例2: updatePatient
import ca.uhn.fhir.rest.api.MethodOutcome; //导入方法依赖的package包/类
@Update
public MethodOutcome updatePatient(HttpServletRequest theRequest, @ResourceParam Patient patient, @IdParam IdType theId,@ConditionalUrlParam String theConditional, RequestDetails theRequestDetails) {
log.debug("Update Patient Provider called");
MethodOutcome method = new MethodOutcome();
method.setCreated(true);
OperationOutcome opOutcome = new OperationOutcome();
method.setOperationOutcome(opOutcome);
Patient newPatient = null;
try {
newPatient = patientDao.update(ctx, patient, theId, theConditional);
} catch (Exception ex) {
log.error(ex.getMessage());
method.setId(newPatient.getIdElement());
method.setResource(newPatient);
}
log.debug("called update Patient method");
return method;
}
示例3: create
import ca.uhn.fhir.rest.api.MethodOutcome; //导入方法依赖的package包/类
@Create
public MethodOutcome create(HttpServletRequest theRequest, @ResourceParam DocumentReference documentReference) {
MethodOutcome method = new MethodOutcome();
method.setCreated(true);
OperationOutcome opOutcome = new OperationOutcome();
method.setOperationOutcome(opOutcome);
DocumentReference newDocumentReference = documentReferenceDao.create(ctx,documentReference, null,null);
method.setId(newDocumentReference.getIdElement());
method.setResource(newDocumentReference);
return method;
}
开发者ID:nhsconnect,项目名称:careconnect-reference-implementation,代码行数:15,代码来源:DocumentReferenceProvider.java
示例4: update
import ca.uhn.fhir.rest.api.MethodOutcome; //导入方法依赖的package包/类
@Update
public MethodOutcome update(HttpServletRequest theRequest, @ResourceParam Composition composition, @IdParam IdType theId, @ConditionalUrlParam String theConditional, RequestDetails theRequestDetails) {
MethodOutcome method = new MethodOutcome();
method.setCreated(true);
OperationOutcome opOutcome = new OperationOutcome();
method.setOperationOutcome(opOutcome);
Composition newComposition = compositionDao.create(ctx,composition, theId, theConditional);
method.setId(newComposition.getIdElement());
method.setResource(newComposition);
return method;
}
示例5: create
import ca.uhn.fhir.rest.api.MethodOutcome; //导入方法依赖的package包/类
@Create
public MethodOutcome create(HttpServletRequest theRequest, @ResourceParam Composition composition) {
MethodOutcome method = new MethodOutcome();
method.setCreated(true);
OperationOutcome opOutcome = new OperationOutcome();
method.setOperationOutcome(opOutcome);
Composition newComposition = compositionDao.create(ctx,composition, null,null);
method.setId(newComposition.getIdElement());
method.setResource(newComposition);
return method;
}
示例6: create
import ca.uhn.fhir.rest.api.MethodOutcome; //导入方法依赖的package包/类
@Create
public MethodOutcome create(HttpServletRequest theRequest, @ResourceParam Immunization immunisation) {
MethodOutcome method = new MethodOutcome();
method.setCreated(true);
OperationOutcome opOutcome = new OperationOutcome();
method.setOperationOutcome(opOutcome);
Immunization newImmunisation = immunisationDao.create(ctx,immunisation, null, null);
method.setId(newImmunisation.getIdElement());
method.setResource(newImmunisation);
return method;
}
示例7: invokeClient
import ca.uhn.fhir.rest.api.MethodOutcome; //导入方法依赖的package包/类
@Override
public MethodOutcome invokeClient(String theResponseMimeType, Reader theResponseReader, int theResponseStatusCode, Map<String, List<String>> theHeaders) throws IOException,
BaseServerResponseException {
MethodOutcome response = MethodUtil.process2xxResponse(myContext, myResourceName, theResponseStatusCode, theResponseMimeType, theResponseReader, theHeaders);
if (theResponseStatusCode == Constants.STATUS_HTTP_201_CREATED) {
response.setCreated(true);
}
return response;
}
示例8: update
import ca.uhn.fhir.rest.api.MethodOutcome; //导入方法依赖的package包/类
@Update()
public MethodOutcome update(
@IdParam IdDt theId,
@ResourceParam Patient theResource,
@ConditionalUrlParam String theConditionalUrl,
RequestDetails theRequestDetails) {
// If we're processing a conditional URL...
if (isNotBlank(theConditionalUrl)) {
// Pretend we've done the conditional processing. Now let's
// notify the interceptors that an update has been performed
// and supply the actual ID that's being updated
IdDt actual = new IdDt("Patient", "1123");
// There are a number of possible constructors for ActionRequestDetails.
// You should supply as much detail about the sub-operation as possible
IServerInterceptor.ActionRequestDetails subRequest =
new IServerInterceptor.ActionRequestDetails(theRequestDetails, actual);
// Notify the interceptors
subRequest.notifyIncomingRequestPreHandled(RestOperationTypeEnum.UPDATE);
}
// In a real server, perhaps we would process the conditional
// request differently and follow a separate path. Either way,
// let's pretend there is some storage code here.
theResource.setId(theId.withVersion("2"));
MethodOutcome retVal = new MethodOutcome();
retVal.setCreated(true);
retVal.setResource(theResource);
return retVal;
}
示例9: createOrganization
import ca.uhn.fhir.rest.api.MethodOutcome; //导入方法依赖的package包/类
@Create
public MethodOutcome createOrganization(HttpServletRequest theRequest,@ResourceParam Organization organization) {
MethodOutcome method = new MethodOutcome();
method.setCreated(true);
OperationOutcome opOutcome = new OperationOutcome();
method.setOperationOutcome(opOutcome);
Organization newOrganization = organisationDao.create(ctx, organization,null,null);
method.setId(newOrganization.getIdElement());
method.setResource(newOrganization);
return method;
}
示例10: update
import ca.uhn.fhir.rest.api.MethodOutcome; //导入方法依赖的package包/类
@Update
public MethodOutcome update(HttpServletRequest theRequest, @ResourceParam CarePlan carePlan, @IdParam IdType theId, @ConditionalUrlParam String theConditional, RequestDetails theRequestDetails) {
MethodOutcome method = new MethodOutcome();
method.setCreated(true);
OperationOutcome opOutcome = new OperationOutcome();
method.setOperationOutcome(opOutcome);
CarePlan newCarePlan = carePlanDao.create(ctx,carePlan, theId, theConditional);
method.setId(newCarePlan.getIdElement());
method.setResource(newCarePlan);
return method;
}
示例11: create
import ca.uhn.fhir.rest.api.MethodOutcome; //导入方法依赖的package包/类
@Create
public MethodOutcome create(HttpServletRequest theRequest, @ResourceParam PractitionerRole practitionerRole) {
MethodOutcome method = new MethodOutcome();
method.setCreated(true);
OperationOutcome opOutcome = new OperationOutcome();
method.setOperationOutcome(opOutcome);
PractitionerRole newPractitioner = practitionerRoleDao.create(ctx, practitionerRole,null,null);
method.setId(newPractitioner.getIdElement());
method.setResource(newPractitioner);
return method;
}
开发者ID:nhsconnect,项目名称:careconnect-reference-implementation,代码行数:17,代码来源:PractitionerRoleProvider.java
示例12: updateValueSet
import ca.uhn.fhir.rest.api.MethodOutcome; //导入方法依赖的package包/类
@Update()
public MethodOutcome updateValueSet(HttpServletRequest theRequest,@ResourceParam ValueSet valueSet) {
MethodOutcome method = new MethodOutcome();
method.setCreated(true);
OperationOutcome opOutcome = new OperationOutcome();
method.setOperationOutcome(opOutcome);
ValueSet newValueSet = valueSetDao.create(valueSet);
method.setId(newValueSet.getIdElement());
method.setResource(newValueSet);
return method;
}
示例13: updateLocation
import ca.uhn.fhir.rest.api.MethodOutcome; //导入方法依赖的package包/类
@Update
public MethodOutcome updateLocation(HttpServletRequest theRequest, @ResourceParam Location location, @IdParam IdType theId, @ConditionalUrlParam String theConditional, RequestDetails theRequestDetails) {
MethodOutcome method = new MethodOutcome();
method.setCreated(true);
OperationOutcome opOutcome = new OperationOutcome();
method.setOperationOutcome(opOutcome);
Location newLocation = locationDao.create(ctx, location, theId, theConditional);
method.setId(newLocation.getIdElement());
method.setResource(newLocation);
return method;
}
示例14: createLocation
import ca.uhn.fhir.rest.api.MethodOutcome; //导入方法依赖的package包/类
@Create
public MethodOutcome createLocation(HttpServletRequest theRequest, @ResourceParam Location location) {
MethodOutcome method = new MethodOutcome();
method.setCreated(true);
OperationOutcome opOutcome = new OperationOutcome();
method.setOperationOutcome(opOutcome);
Location newLocation = locationDao.create(ctx, location,null,null);
method.setId(newLocation.getIdElement());
method.setResource(newLocation);
return method;
}
示例15: update
import ca.uhn.fhir.rest.api.MethodOutcome; //导入方法依赖的package包/类
@Update
public MethodOutcome update(HttpServletRequest theRequest, @ResourceParam Encounter encounter, @IdParam IdType theId, @ConditionalUrlParam String theConditional, RequestDetails theRequestDetails) {
MethodOutcome method = new MethodOutcome();
method.setCreated(true);
OperationOutcome opOutcome = new OperationOutcome();
method.setOperationOutcome(opOutcome);
Encounter newEncounter = encounterDao.create(ctx, encounter, theId, theConditional);
method.setId(newEncounter.getIdElement());
method.setResource(newEncounter);
return method;
}