/** * Adds and returns a new value for <b>part</b> () * * <p> * <b>Definition:</b> * A named part of a parameter. In many implementation context, a set of named parts is known as a \"Tuple\" * </p> */ public Parameter addPart() { Parameter newType = new Parameter(); getPart().add(newType); return newType; }
/** * Gets the first repetition for <b>part</b> (), * creating it if it does not already exist. * * <p> * <b>Definition:</b> * A named part of a parameter. In many implementation context, a set of named parts is known as a \"Tuple\" * </p> */ public Parameter getPartFirstRep() { if (getPart().isEmpty()) { return addPart(); } return getPart().get(0); }
ValidateCodeResult result = dao.validateCode(theValueSetIdentifier, theId, theCode, theSystem, theDisplay, theCoding, theCodeableConcept, theRequestDetails); Parameters retVal = new Parameters(); retVal.addParameter().setName("result").setValue(new BooleanDt(result.isResult())); if (isNotBlank(result.getMessage())) { retVal.addParameter().setName("message").setValue(new StringDt(result.getMessage())); retVal.addParameter().setName("display").setValue(new StringDt(result.getDisplay()));
retVal.addParameter().setName("name").setValue(new StringDt(result.getCodeSystemDisplayName())); if (isNotBlank(result.getCodeSystemVersion())) { retVal.addParameter().setName("version").setValue(new StringDt(result.getCodeSystemVersion())); retVal.addParameter().setName("display").setValue(new StringDt(result.getCodeDisplay())); retVal.addParameter().setName("abstract").setValue(new BooleanDt(result.isCodeIsAbstract())); return retVal; } finally {
@Operation(name = JpaConstants.OPERATION_SUGGEST_KEYWORDS, idempotent = true) public Parameters suggestKeywords( @OperationParam(name = "context", min = 1, max = 1) String theContext, @OperationParam(name = "searchParam", min = 1, max = 1) String theSearchParam, @OperationParam(name = "text", min = 1, max = 1) String theText ) { JpaSystemProviderDstu3.validateFulltextSearchEnabled(mySearchDao); if (isBlank(theContext)) { throw new InvalidRequestException("Parameter 'context' must be provided"); } if (isBlank(theSearchParam)) { throw new InvalidRequestException("Parameter 'searchParam' must be provided"); } if (isBlank(theText)) { throw new InvalidRequestException("Parameter 'text' must be provided"); } List<Suggestion> keywords = mySearchDao.suggestKeywords(theContext, theSearchParam, theText); Parameters retVal = new Parameters(); for (Suggestion next : keywords) { retVal.addParameter() .addPart(new Parameter().setName("keyword").setValue(new StringDt(next.getTerm()))) .addPart(new Parameter().setName("score").setValue(new DecimalDt(next.getScore()))); } return retVal; }
/** * Adds a given new value for <b>part</b> () * * <p> * <b>Definition:</b> * A named part of a parameter. In many implementation context, a set of named parts is known as a \"Tuple\" * </p> * @param theValue The part to add (must not be <code>null</code>) */ public Parameter addPart(Parameter theValue) { if (theValue == null) { throw new NullPointerException("theValue must not be null"); } getPart().add(theValue); return this; }
/** * Gets the value(s) for <b>name</b> (). * creating it if it does * not exist. This method may return <code>null</code>. * * <p> * <b>Definition:</b> * The name of the parameter (reference to the operation definition) * </p> */ public String getName() { return getNameElement().getValue(); }
/** * Adds and returns a new value for <b>parameter</b> () * * <p> * <b>Definition:</b> * A parameter passed to or received from the operation * </p> */ public Parameter addParameter() { Parameter newType = new Parameter(); getParameter().add(newType); return newType; }
@Operation(name = OPERATION_META, idempotent = true, returnParameters = { @OperationParam(name = "return", type = MetaDt.class) }) public Parameters meta(RequestDetails theRequestDetails) { Parameters parameters = new Parameters(); MetaDt metaGetOperation = getDao().metaGetOperation(MetaDt.class, theRequestDetails); parameters.addParameter().setName("return").setValue(metaGetOperation); return parameters; }
@Operation(name = JpaConstants.OPERATION_META, idempotent = true, returnParameters = { @OperationParam(name = "return", type = MetaDt.class) }) public Parameters meta(RequestDetails theRequestDetails) { Parameters parameters = new Parameters(); parameters.addParameter().setName("return").setValue(getDao().metaGetOperation(theRequestDetails)); return parameters; }
@Operation(name = OPERATION_META, idempotent = true, returnParameters = { @OperationParam(name = "return", type = MetaDt.class) }) public Parameters meta(@IdParam IdDt theId, RequestDetails theRequestDetails) { Parameters parameters = new Parameters(); MetaDt metaGetOperation = getDao().metaGetOperation(MetaDt.class, theId, theRequestDetails); parameters.addParameter().setName("return").setValue(metaGetOperation); return parameters; }
@Operation(name = OPERATION_META_DELETE, idempotent = true, returnParameters = { @OperationParam(name = "return", type = MetaDt.class) }) public Parameters metaDelete(@IdParam IdDt theId, @OperationParam(name = "meta") MetaDt theMeta, RequestDetails theRequestDetails) { if (theMeta == null) { throw new InvalidRequestException("Input contains no parameter with name 'meta'"); } Parameters parameters = new Parameters(); parameters.addParameter().setName("return").setValue(getDao().metaDeleteOperation(theId, theMeta, theRequestDetails)); return parameters; }
@Operation(name = OPERATION_META_ADD, idempotent = true, returnParameters = { @OperationParam(name = "return", type = MetaDt.class) }) public Parameters metaAdd(@IdParam IdDt theId, @OperationParam(name = "meta") MetaDt theMeta, RequestDetails theRequestDetails) { if (theMeta == null) { throw new InvalidRequestException("Input contains no parameter with name 'meta'"); } Parameters parameters = new Parameters(); MetaDt metaAddOperation = getDao().metaAddOperation(theId, theMeta, theRequestDetails); parameters.addParameter().setName("return").setValue(metaAddOperation); return parameters; }
ValidateCodeResult result = dao.validateCode(theValueSetIdentifier, theId, theCode, theSystem, theDisplay, theCoding, theCodeableConcept, theRequestDetails); Parameters retVal = new Parameters(); retVal.addParameter().setName("result").setValue(new BooleanDt(result.isResult())); if (isNotBlank(result.getMessage())) { retVal.addParameter().setName("message").setValue(new StringDt(result.getMessage())); retVal.addParameter().setName("display").setValue(new StringDt(result.getDisplay()));
retVal.addParameter().setName("name").setValue(new StringDt(result.getCodeSystemDisplayName())); if (isNotBlank(result.getCodeSystemVersion())) { retVal.addParameter().setName("version").setValue(new StringDt(result.getCodeSystemVersion())); retVal.addParameter().setName("display").setValue(new StringDt(result.getCodeDisplay())); retVal.addParameter().setName("abstract").setValue(new BooleanDt(result.isCodeIsAbstract())); return retVal; } finally {
inParams.addParameter().setName("start").setValue(new DateDt("2001-01-01")); inParams.addParameter().setName("end").setValue(new DateDt("2015-03-01")); Bundle responseBundle = (Bundle) outParams.getParameter().get(0).getResource();
@Operation(name = JpaConstants.OPERATION_SUGGEST_KEYWORDS, idempotent = true) public Parameters suggestKeywords( @OperationParam(name = "context", min = 1, max = 1) String theContext, @OperationParam(name = "searchParam", min = 1, max = 1) String theSearchParam, @OperationParam(name = "text", min = 1, max = 1) String theText ) { JpaSystemProviderDstu3.validateFulltextSearchEnabled(mySearchDao); if (isBlank(theContext)) { throw new InvalidRequestException("Parameter 'context' must be provided"); } if (isBlank(theSearchParam)) { throw new InvalidRequestException("Parameter 'searchParam' must be provided"); } if (isBlank(theText)) { throw new InvalidRequestException("Parameter 'text' must be provided"); } List<Suggestion> keywords = mySearchDao.suggestKeywords(theContext, theSearchParam, theText); Parameters retVal = new Parameters(); for (Suggestion next : keywords) { retVal.addParameter() .addPart(new Parameter().setName("keyword").setValue(new StringDt(next.getTerm()))) .addPart(new Parameter().setName("score").setValue(new DecimalDt(next.getScore()))); } return retVal; }