当前位置: 首页>>代码示例>>Java>>正文


Java MethodOutcome.setCreated方法代码示例

本文整理汇总了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;
}
 
开发者ID:nhsconnect,项目名称:careconnect-reference-implementation,代码行数:24,代码来源:PatientProvider.java

示例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;
}
 
开发者ID:nhsconnect,项目名称:careconnect-reference-implementation,代码行数:24,代码来源:PatientProvider.java

示例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;
}
 
开发者ID:nhsconnect,项目名称:careconnect-reference-implementation,代码行数:15,代码来源:CompositionProvider.java

示例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;
}
 
开发者ID:nhsconnect,项目名称:careconnect-reference-implementation,代码行数:15,代码来源:CompositionProvider.java

示例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;
}
 
开发者ID:nhsconnect,项目名称:careconnect-reference-implementation,代码行数:16,代码来源:ImmunizationProvider.java

示例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;
}
 
开发者ID:gajen0981,项目名称:FHIR-Server,代码行数:10,代码来源:GenericClient.java

示例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;
}
 
开发者ID:jamesagnew,项目名称:hapi-fhir,代码行数:35,代码来源:AuthorizationInterceptors.java

示例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;
}
 
开发者ID:nhsconnect,项目名称:careconnect-reference-implementation,代码行数:17,代码来源:OrganizationProvider.java

示例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;
}
 
开发者ID:nhsconnect,项目名称:careconnect-reference-implementation,代码行数:20,代码来源:CarePlanProvider.java

示例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;
}
 
开发者ID:nhsconnect,项目名称:careconnect-reference-implementation,代码行数:19,代码来源:ValueSetProvider.java

示例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;
}
 
开发者ID:nhsconnect,项目名称:careconnect-reference-implementation,代码行数:20,代码来源:LocationProvider.java

示例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;
}
 
开发者ID:nhsconnect,项目名称:careconnect-reference-implementation,代码行数:17,代码来源:LocationProvider.java

示例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;
}
 
开发者ID:nhsconnect,项目名称:careconnect-reference-implementation,代码行数:20,代码来源:EncounterProvider.java


注:本文中的ca.uhn.fhir.rest.api.MethodOutcome.setCreated方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。