3 namespace OpenEMR\FHIR\R4\FHIRElement
;
6 * This class was generated with the PHPFHIR library (https://github.com/dcarbone/php-fhir) using
7 * class definitions from HL7 FHIR (https://www.hl7.org/fhir/)
9 * Class creation date: June 14th, 2019
13 * Copyright 2016-2017 Daniel Carbone (daniel.p.carbone@gmail.com)
15 * Licensed under the Apache License, Version 2.0 (the "License");
16 * you may not use this file except in compliance with the License.
17 * You may obtain a copy of the License at
19 * http://www.apache.org/licenses/LICENSE-2.0
21 * Unless required by applicable law or agreed to in writing, software
22 * distributed under the License is distributed on an "AS IS" BASIS,
23 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
24 * See the License for the specific language governing permissions and
25 * limitations under the License.
28 * FHIR Copyright Notice:
30 * Copyright (c) 2011+, HL7, Inc.
31 * All rights reserved.
33 * Redistribution and use in source and binary forms, with or without modification,
34 * are permitted provided that the following conditions are met:
36 * * Redistributions of source code must retain the above copyright notice, this
37 * list of conditions and the following disclaimer.
38 * * Redistributions in binary form must reproduce the above copyright notice,
39 * this list of conditions and the following disclaimer in the documentation
40 * and/or other materials provided with the distribution.
41 * * Neither the name of HL7 nor the names of its contributors may be used to
42 * endorse or promote products derived from this software without specific
43 * prior written permission.
45 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
46 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
47 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
48 * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
49 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
50 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
51 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
52 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
53 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
54 * POSSIBILITY OF SUCH DAMAGE.
57 * Generated on Thu, Dec 27, 2018 22:37+1100 for FHIR v4.0.0
59 * Note: the schemas & schematrons do not contain all of the rules about what makes resources
60 * valid. Implementers will still need to be familiar with the content of the specification and with
61 * any profiles that apply to the resources in order to make a conformant implementation.
65 use OpenEMR\FHIR\R4\FHIRElement
;
68 * The parameters to the module. This collection specifies both the input and output parameters. Input parameters are provided by the caller as part of the $evaluate operation. Output parameters are included in the GuidanceResponse.
69 * If the element is present, it must have a value for at least one of the defined elements, an @id referenced from the Narrative, or extensions
71 class FHIRParameterDefinition
extends FHIRElement
implements \JsonSerializable
74 * The name of the parameter used to allow access to the value of the parameter in evaluation contexts.
75 * @var \OpenEMR\FHIR\R4\FHIRElement\FHIRCode
80 * Whether the parameter is input or output for the module.
81 * @var \OpenEMR\FHIR\R4\FHIRElement\FHIRCode
86 * The minimum number of times this parameter SHALL appear in the request or response.
87 * @var \OpenEMR\FHIR\R4\FHIRElement\FHIRInteger
92 * The maximum number of times this element is permitted to appear in the request or response.
93 * @var \OpenEMR\FHIR\R4\FHIRElement\FHIRString
98 * A brief discussion of what the parameter is for and how it is used by the module.
99 * @var \OpenEMR\FHIR\R4\FHIRElement\FHIRString
101 public $documentation = null;
104 * The type of the parameter.
105 * @var \OpenEMR\FHIR\R4\FHIRElement\FHIRCode
110 * If specified, this indicates a profile that the input data must conform to, or that the output data will conform to.
111 * @var \OpenEMR\FHIR\R4\FHIRElement\FHIRCanonical
113 public $profile = null;
118 private $_fhirElementName = 'ParameterDefinition';
121 * The name of the parameter used to allow access to the value of the parameter in evaluation contexts.
122 * @return \OpenEMR\FHIR\R4\FHIRElement\FHIRCode
124 public function getName()
130 * The name of the parameter used to allow access to the value of the parameter in evaluation contexts.
131 * @param \OpenEMR\FHIR\R4\FHIRElement\FHIRCode $name
134 public function setName($name)
141 * Whether the parameter is input or output for the module.
142 * @return \OpenEMR\FHIR\R4\FHIRElement\FHIRCode
144 public function getUse()
150 * Whether the parameter is input or output for the module.
151 * @param \OpenEMR\FHIR\R4\FHIRElement\FHIRCode $use
154 public function setUse($use)
161 * The minimum number of times this parameter SHALL appear in the request or response.
162 * @return \OpenEMR\FHIR\R4\FHIRElement\FHIRInteger
164 public function getMin()
170 * The minimum number of times this parameter SHALL appear in the request or response.
171 * @param \OpenEMR\FHIR\R4\FHIRElement\FHIRInteger $min
174 public function setMin($min)
181 * The maximum number of times this element is permitted to appear in the request or response.
182 * @return \OpenEMR\FHIR\R4\FHIRElement\FHIRString
184 public function getMax()
190 * The maximum number of times this element is permitted to appear in the request or response.
191 * @param \OpenEMR\FHIR\R4\FHIRElement\FHIRString $max
194 public function setMax($max)
201 * A brief discussion of what the parameter is for and how it is used by the module.
202 * @return \OpenEMR\FHIR\R4\FHIRElement\FHIRString
204 public function getDocumentation()
206 return $this->documentation
;
210 * A brief discussion of what the parameter is for and how it is used by the module.
211 * @param \OpenEMR\FHIR\R4\FHIRElement\FHIRString $documentation
214 public function setDocumentation($documentation)
216 $this->documentation
= $documentation;
221 * The type of the parameter.
222 * @return \OpenEMR\FHIR\R4\FHIRElement\FHIRCode
224 public function getType()
230 * The type of the parameter.
231 * @param \OpenEMR\FHIR\R4\FHIRElement\FHIRCode $type
234 public function setType($type)
241 * If specified, this indicates a profile that the input data must conform to, or that the output data will conform to.
242 * @return \OpenEMR\FHIR\R4\FHIRElement\FHIRCanonical
244 public function getProfile()
246 return $this->profile
;
250 * If specified, this indicates a profile that the input data must conform to, or that the output data will conform to.
251 * @param \OpenEMR\FHIR\R4\FHIRElement\FHIRCanonical $profile
254 public function setProfile($profile)
256 $this->profile
= $profile;
263 public function get_fhirElementName()
265 return $this->_fhirElementName
;
271 public function __construct($data = [])
273 if (is_array($data)) {
274 if (isset($data['name'])) {
275 $this->setName($data['name']);
277 if (isset($data['use'])) {
278 $this->setUse($data['use']);
280 if (isset($data['min'])) {
281 $this->setMin($data['min']);
283 if (isset($data['max'])) {
284 $this->setMax($data['max']);
286 if (isset($data['documentation'])) {
287 $this->setDocumentation($data['documentation']);
289 if (isset($data['type'])) {
290 $this->setType($data['type']);
292 if (isset($data['profile'])) {
293 $this->setProfile($data['profile']);
295 } elseif (null !== $data) {
296 throw new \
InvalidArgumentException('$data expected to be array of values, saw "' . gettype($data) . '"');
298 parent
::__construct($data);
304 public function __toString()
306 return $this->get_fhirElementName();
312 public function jsonSerialize(): mixed
314 $json = parent
::jsonSerialize();
315 if (isset($this->name
)) {
316 $json['name'] = $this->name
;
318 if (isset($this->use)) {
319 $json['use'] = $this->use;
321 if (isset($this->min
)) {
322 $json['min'] = $this->min
;
324 if (isset($this->max
)) {
325 $json['max'] = $this->max
;
327 if (isset($this->documentation
)) {
328 $json['documentation'] = $this->documentation
;
330 if (isset($this->type
)) {
331 $json['type'] = $this->type
;
333 if (isset($this->profile
)) {
334 $json['profile'] = $this->profile
;
340 * @param boolean $returnSXE
341 * @param \SimpleXMLElement $sxe
342 * @return string|\SimpleXMLElement
344 public function xmlSerialize($returnSXE = false, $sxe = null)
347 $sxe = new \
SimpleXMLElement('<ParameterDefinition xmlns="http://hl7.org/fhir"></ParameterDefinition>');
349 parent
::xmlSerialize(true, $sxe);
350 if (isset($this->name
)) {
351 $this->name
->xmlSerialize(true, $sxe->addChild('name'));
353 if (isset($this->use)) {
354 $this->use->xmlSerialize(true, $sxe->addChild('use'));
356 if (isset($this->min
)) {
357 $this->min
->xmlSerialize(true, $sxe->addChild('min'));
359 if (isset($this->max
)) {
360 $this->max
->xmlSerialize(true, $sxe->addChild('max'));
362 if (isset($this->documentation
)) {
363 $this->documentation
->xmlSerialize(true, $sxe->addChild('documentation'));
365 if (isset($this->type
)) {
366 $this->type
->xmlSerialize(true, $sxe->addChild('type'));
368 if (isset($this->profile
)) {
369 $this->profile
->xmlSerialize(true, $sxe->addChild('profile'));
374 return $sxe->saveXML();