本文整理汇总了Java中ca.uhn.fhir.rest.api.MethodOutcome.setResource方法的典型用法代码示例。如果您正苦于以下问题:Java MethodOutcome.setResource方法的具体用法?Java MethodOutcome.setResource怎么用?Java MethodOutcome.setResource使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ca.uhn.fhir.rest.api.MethodOutcome
的用法示例。
在下文中一共展示了MethodOutcome.setResource方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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;
}
示例2: update
import ca.uhn.fhir.rest.api.MethodOutcome; //导入方法依赖的package包/类
@Update
public MethodOutcome update(HttpServletRequest theRequest, @ResourceParam DocumentReference documentReference, @IdParam IdType theId, @ConditionalUrlParam String theConditional, RequestDetails theRequestDetails) {
MethodOutcome method = new MethodOutcome();
method.setCreated(true);
OperationOutcome opOutcome = new OperationOutcome();
method.setOperationOutcome(opOutcome);
DocumentReference newDocumentReference = documentReferenceDao.create(ctx,documentReference, theId, theConditional);
method.setId(newDocumentReference.getIdElement());
method.setResource(newDocumentReference);
return method;
}
开发者ID:nhsconnect,项目名称:careconnect-reference-implementation,代码行数:15,代码来源:DocumentReferenceProvider.java
示例3: 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;
}
示例4: create
import ca.uhn.fhir.rest.api.MethodOutcome; //导入方法依赖的package包/类
@Create
public MethodOutcome create(HttpServletRequest theRequest, @ResourceParam DiagnosticReport diagnosticReport) {
MethodOutcome method = new MethodOutcome();
method.setCreated(true);
OperationOutcome opOutcome = new OperationOutcome();
method.setOperationOutcome(opOutcome);
DiagnosticReport newDiagnosticReport = diagnosticReportDao.create(ctx,diagnosticReport, null,null);
method.setId(newDiagnosticReport.getIdElement());
method.setResource(newDiagnosticReport);
return method;
}
开发者ID:nhsconnect,项目名称:careconnect-reference-implementation,代码行数:15,代码来源:DiagnosticReportProvider.java
示例5: 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;
}
示例6: updatePatient
import ca.uhn.fhir.rest.api.MethodOutcome; //导入方法依赖的package包/类
@Update()
public MethodOutcome updatePatient(@ResourceParam Patient thePatient, @ConditionalUrlParam String theConditional, @IdParam IdDt theIdParam) {
ourLastConditionalUrl = theConditional;
ourLastId = thePatient.getId();
ourLastIdParam = theIdParam;
MethodOutcome retVal = new MethodOutcome(new IdDt("Patient/001/_history/002"));
ResourceMetadataKeyEnum.UPDATED.put(thePatient, ourSetLastUpdated);
retVal.setResource(thePatient);
return retVal;
}
示例7: createPatient
import ca.uhn.fhir.rest.api.MethodOutcome; //导入方法依赖的package包/类
@Create()
public MethodOutcome createPatient(@ResourceParam Patient thePatient) {
IdDt id = new IdDt("Patient/001/_history/002");
MethodOutcome retVal = new MethodOutcome(id);
Patient pt = new Patient();
pt.setId(id);
retVal.setResource(pt);
retVal.setOperationOutcome(ourReturnOperationOutcome);
return retVal;
}
示例8: updatePatient
import ca.uhn.fhir.rest.api.MethodOutcome; //导入方法依赖的package包/类
@Update()
public MethodOutcome updatePatient(@ResourceParam Patient thePatient, @IdParam IdDt theIdParam) {
IdDt id = new IdDt("Patient/001/_history/002");
MethodOutcome retVal = new MethodOutcome(id);
Patient pt = new Patient();
pt.setId(id);
retVal.setResource(pt);
return retVal;
}
示例9: update
import ca.uhn.fhir.rest.api.MethodOutcome; //导入方法依赖的package包/类
@Update
public MethodOutcome update(HttpServletRequest theRequest, @ResourceParam MedicationStatement statement, @IdParam IdType theId, @ConditionalUrlParam String theConditional, RequestDetails theRequestDetails) {
MethodOutcome method = new MethodOutcome();
method.setCreated(true);
OperationOutcome opOutcome = new OperationOutcome();
method.setOperationOutcome(opOutcome);
MedicationStatement newMedicationStatement = statementDao.create(ctx,statement, theId, theConditional);
method.setId(newMedicationStatement.getIdElement());
method.setResource(newMedicationStatement);
return method;
}
开发者ID:nhsconnect,项目名称:careconnect-reference-implementation,代码行数:20,代码来源:MedicationStatementProvider.java
示例10: 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
示例11: updatePractitioner
import ca.uhn.fhir.rest.api.MethodOutcome; //导入方法依赖的package包/类
@Update
public MethodOutcome updatePractitioner(HttpServletRequest theRequest, @ResourceParam PractitionerRole practitionerRole, @IdParam IdType theId, @ConditionalUrlParam String theConditional, RequestDetails theRequestDetails) {
MethodOutcome method = new MethodOutcome();
method.setCreated(true);
OperationOutcome opOutcome = new OperationOutcome();
method.setOperationOutcome(opOutcome);
PractitionerRole newPractitioner = practitionerRoleDao.create(ctx, practitionerRole, theId, theConditional);
method.setId(newPractitioner.getIdElement());
method.setResource(newPractitioner);
return method;
}
开发者ID:nhsconnect,项目名称:careconnect-reference-implementation,代码行数:20,代码来源:PractitionerRoleProvider.java
示例12: updatePractitioner
import ca.uhn.fhir.rest.api.MethodOutcome; //导入方法依赖的package包/类
@Update
public MethodOutcome updatePractitioner(HttpServletRequest theRequest, @ResourceParam Practitioner practitioner, @IdParam IdType theId, @ConditionalUrlParam String theConditional, RequestDetails theRequestDetails) {
MethodOutcome method = new MethodOutcome();
method.setCreated(true);
OperationOutcome opOutcome = new OperationOutcome();
method.setOperationOutcome(opOutcome);
Practitioner newPractitioner = practitionerDao.create(ctx,practitioner, theId, theConditional);
method.setId(newPractitioner.getIdElement());
method.setResource(newPractitioner);
return method;
}
示例13: update
import ca.uhn.fhir.rest.api.MethodOutcome; //导入方法依赖的package包/类
@Update
public MethodOutcome update(HttpServletRequest theRequest, @ResourceParam Procedure procedure, @IdParam IdType theId, @ConditionalUrlParam String theConditional, RequestDetails theRequestDetails) {
MethodOutcome method = new MethodOutcome();
method.setCreated(true);
OperationOutcome opOutcome = new OperationOutcome();
method.setOperationOutcome(opOutcome);
Procedure newProcedure = procedureDao.create(ctx,procedure, theId, theConditional);
method.setId(newProcedure.getIdElement());
method.setResource(newProcedure);
return method;
}
示例14: 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;
}
示例15: 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;
}