@headspace/protos-events 1.856.0 → 1.858.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -268103,6 +268103,1512 @@ $root.ClinicalNoteMedication = (function() {
268103
268103
  return ClinicalNoteMedication;
268104
268104
  })();
268105
268105
 
268106
+ $root.ClinicalNoteCoding = (function() {
268107
+
268108
+ /**
268109
+ * Properties of a ClinicalNoteCoding.
268110
+ * @typedef {Object} ClinicalNoteCoding.$Properties
268111
+ * @property {string|null} [system] ClinicalNoteCoding system
268112
+ * @property {string|null} [code] ClinicalNoteCoding code
268113
+ * @property {string|null} [display] ClinicalNoteCoding display
268114
+ * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
268115
+ */
268116
+
268117
+ /**
268118
+ * Properties of a ClinicalNoteCoding.
268119
+ * @name IClinicalNoteCoding
268120
+ * @interface IClinicalNoteCoding
268121
+ * @augments ClinicalNoteCoding.$Properties
268122
+ * @deprecated Use ClinicalNoteCoding.$Properties instead.
268123
+ */
268124
+
268125
+ /**
268126
+ * Shape of a ClinicalNoteCoding.
268127
+ * @typedef {ClinicalNoteCoding.$Properties} ClinicalNoteCoding.$Shape
268128
+ */
268129
+
268130
+ /**
268131
+ * Constructs a new ClinicalNoteCoding.
268132
+ * @name ClinicalNoteCoding
268133
+ * @classdesc Represents a ClinicalNoteCoding.
268134
+ * @constructor
268135
+ * @param {ClinicalNoteCoding.$Properties=} [properties] Properties to set
268136
+ * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
268137
+ */
268138
+ function ClinicalNoteCoding(properties) {
268139
+ if (properties)
268140
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
268141
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
268142
+ this[keys[i]] = properties[keys[i]];
268143
+ }
268144
+
268145
+ /**
268146
+ * ClinicalNoteCoding system.
268147
+ * @member {string} system
268148
+ * @memberof ClinicalNoteCoding
268149
+ * @instance
268150
+ */
268151
+ ClinicalNoteCoding.prototype.system = "";
268152
+
268153
+ /**
268154
+ * ClinicalNoteCoding code.
268155
+ * @member {string} code
268156
+ * @memberof ClinicalNoteCoding
268157
+ * @instance
268158
+ */
268159
+ ClinicalNoteCoding.prototype.code = "";
268160
+
268161
+ /**
268162
+ * ClinicalNoteCoding display.
268163
+ * @member {string} display
268164
+ * @memberof ClinicalNoteCoding
268165
+ * @instance
268166
+ */
268167
+ ClinicalNoteCoding.prototype.display = "";
268168
+
268169
+ /**
268170
+ * Creates a new ClinicalNoteCoding instance using the specified properties.
268171
+ * @function create
268172
+ * @memberof ClinicalNoteCoding
268173
+ * @static
268174
+ * @param {ClinicalNoteCoding.$Properties=} [properties] Properties to set
268175
+ * @returns {ClinicalNoteCoding} ClinicalNoteCoding instance
268176
+ * @type {{
268177
+ * (properties: ClinicalNoteCoding.$Shape): ClinicalNoteCoding & ClinicalNoteCoding.$Shape;
268178
+ * (properties?: ClinicalNoteCoding.$Properties): ClinicalNoteCoding;
268179
+ * }}
268180
+ */
268181
+ ClinicalNoteCoding.create = function create(properties) {
268182
+ return new ClinicalNoteCoding(properties);
268183
+ };
268184
+
268185
+ /**
268186
+ * Encodes the specified ClinicalNoteCoding message. Does not implicitly {@link ClinicalNoteCoding.verify|verify} messages.
268187
+ * @function encode
268188
+ * @memberof ClinicalNoteCoding
268189
+ * @static
268190
+ * @param {ClinicalNoteCoding.$Properties} message ClinicalNoteCoding message or plain object to encode
268191
+ * @param {$protobuf.Writer} [writer] Writer to encode to
268192
+ * @returns {$protobuf.Writer} Writer
268193
+ */
268194
+ ClinicalNoteCoding.encode = function encode(message, writer) {
268195
+ if (!writer)
268196
+ writer = $Writer.create();
268197
+ if (message.system != null && Object.hasOwnProperty.call(message, "system"))
268198
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.system);
268199
+ if (message.code != null && Object.hasOwnProperty.call(message, "code"))
268200
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.code);
268201
+ if (message.display != null && Object.hasOwnProperty.call(message, "display"))
268202
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.display);
268203
+ if (message.$unknowns != null && Object.hasOwnProperty.call(message, "$unknowns"))
268204
+ for (var i = 0; i < message.$unknowns.length; ++i)
268205
+ writer.raw(message.$unknowns[i]);
268206
+ return writer;
268207
+ };
268208
+
268209
+ /**
268210
+ * Encodes the specified ClinicalNoteCoding message, length delimited. Does not implicitly {@link ClinicalNoteCoding.verify|verify} messages.
268211
+ * @function encodeDelimited
268212
+ * @memberof ClinicalNoteCoding
268213
+ * @static
268214
+ * @param {ClinicalNoteCoding.$Properties} message ClinicalNoteCoding message or plain object to encode
268215
+ * @param {$protobuf.Writer} [writer] Writer to encode to
268216
+ * @returns {$protobuf.Writer} Writer
268217
+ */
268218
+ ClinicalNoteCoding.encodeDelimited = function encodeDelimited(message, writer) {
268219
+ return this.encode(message, writer).ldelim();
268220
+ };
268221
+
268222
+ /**
268223
+ * Decodes a ClinicalNoteCoding message from the specified reader or buffer.
268224
+ * @function decode
268225
+ * @memberof ClinicalNoteCoding
268226
+ * @static
268227
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
268228
+ * @param {number} [length] Message length if known beforehand
268229
+ * @returns {ClinicalNoteCoding & ClinicalNoteCoding.$Shape} ClinicalNoteCoding
268230
+ * @throws {Error} If the payload is not a reader or valid buffer
268231
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
268232
+ */
268233
+ ClinicalNoteCoding.decode = function decode(reader, length, _end, _depth, _target) {
268234
+ if (!(reader instanceof $Reader))
268235
+ reader = $Reader.create(reader);
268236
+ if (_depth === undefined)
268237
+ _depth = 0;
268238
+ if (_depth > $Reader.recursionLimit)
268239
+ throw Error("max depth exceeded");
268240
+ var end = length === undefined ? reader.len : reader.pos + length, message = _target || new $root.ClinicalNoteCoding(), value;
268241
+ while (reader.pos < end) {
268242
+ var start = reader.pos;
268243
+ var tag = reader.tag();
268244
+ if (tag === _end) {
268245
+ _end = undefined;
268246
+ break;
268247
+ }
268248
+ var wireType = tag & 7;
268249
+ switch (tag >>>= 3) {
268250
+ case 1: {
268251
+ if (wireType !== 2)
268252
+ break;
268253
+ if ((value = reader.string()).length)
268254
+ message.system = value;
268255
+ else
268256
+ delete message.system;
268257
+ continue;
268258
+ }
268259
+ case 2: {
268260
+ if (wireType !== 2)
268261
+ break;
268262
+ if ((value = reader.string()).length)
268263
+ message.code = value;
268264
+ else
268265
+ delete message.code;
268266
+ continue;
268267
+ }
268268
+ case 3: {
268269
+ if (wireType !== 2)
268270
+ break;
268271
+ if ((value = reader.string()).length)
268272
+ message.display = value;
268273
+ else
268274
+ delete message.display;
268275
+ continue;
268276
+ }
268277
+ }
268278
+ reader.skipType(wireType, _depth, tag);
268279
+ $util.makeProp(message, "$unknowns", false);
268280
+ (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos));
268281
+ }
268282
+ if (_end !== undefined)
268283
+ throw Error("missing end group");
268284
+ return message;
268285
+ };
268286
+
268287
+ /**
268288
+ * Decodes a ClinicalNoteCoding message from the specified reader or buffer, length delimited.
268289
+ * @function decodeDelimited
268290
+ * @memberof ClinicalNoteCoding
268291
+ * @static
268292
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
268293
+ * @returns {ClinicalNoteCoding & ClinicalNoteCoding.$Shape} ClinicalNoteCoding
268294
+ * @throws {Error} If the payload is not a reader or valid buffer
268295
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
268296
+ */
268297
+ ClinicalNoteCoding.decodeDelimited = function decodeDelimited(reader) {
268298
+ if (!(reader instanceof $Reader))
268299
+ reader = new $Reader(reader);
268300
+ return this.decode(reader, reader.uint32());
268301
+ };
268302
+
268303
+ /**
268304
+ * Verifies a ClinicalNoteCoding message.
268305
+ * @function verify
268306
+ * @memberof ClinicalNoteCoding
268307
+ * @static
268308
+ * @param {Object.<string,*>} message Plain object to verify
268309
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
268310
+ */
268311
+ ClinicalNoteCoding.verify = function verify(message, _depth) {
268312
+ if (typeof message !== "object" || message === null)
268313
+ return "object expected";
268314
+ if (_depth === undefined)
268315
+ _depth = 0;
268316
+ if (_depth > $util.recursionLimit)
268317
+ return "max depth exceeded";
268318
+ if (message.system != null && message.hasOwnProperty("system"))
268319
+ if (!$util.isString(message.system))
268320
+ return "system: string expected";
268321
+ if (message.code != null && message.hasOwnProperty("code"))
268322
+ if (!$util.isString(message.code))
268323
+ return "code: string expected";
268324
+ if (message.display != null && message.hasOwnProperty("display"))
268325
+ if (!$util.isString(message.display))
268326
+ return "display: string expected";
268327
+ return null;
268328
+ };
268329
+
268330
+ /**
268331
+ * Creates a ClinicalNoteCoding message from a plain object. Also converts values to their respective internal types.
268332
+ * @function fromObject
268333
+ * @memberof ClinicalNoteCoding
268334
+ * @static
268335
+ * @param {Object.<string,*>} object Plain object
268336
+ * @returns {ClinicalNoteCoding} ClinicalNoteCoding
268337
+ */
268338
+ ClinicalNoteCoding.fromObject = function fromObject(object, _depth) {
268339
+ if (object instanceof $root.ClinicalNoteCoding)
268340
+ return object;
268341
+ if (_depth === undefined)
268342
+ _depth = 0;
268343
+ if (_depth > $util.recursionLimit)
268344
+ throw Error("max depth exceeded");
268345
+ var message = new $root.ClinicalNoteCoding();
268346
+ if (object.system != null)
268347
+ if (typeof object.system !== "string" || object.system.length)
268348
+ message.system = String(object.system);
268349
+ if (object.code != null)
268350
+ if (typeof object.code !== "string" || object.code.length)
268351
+ message.code = String(object.code);
268352
+ if (object.display != null)
268353
+ if (typeof object.display !== "string" || object.display.length)
268354
+ message.display = String(object.display);
268355
+ return message;
268356
+ };
268357
+
268358
+ /**
268359
+ * Creates a plain object from a ClinicalNoteCoding message. Also converts values to other types if specified.
268360
+ * @function toObject
268361
+ * @memberof ClinicalNoteCoding
268362
+ * @static
268363
+ * @param {ClinicalNoteCoding} message ClinicalNoteCoding
268364
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
268365
+ * @returns {Object.<string,*>} Plain object
268366
+ */
268367
+ ClinicalNoteCoding.toObject = function toObject(message, options) {
268368
+ if (!options)
268369
+ options = {};
268370
+ var object = {};
268371
+ if (options.defaults) {
268372
+ object.system = "";
268373
+ object.code = "";
268374
+ object.display = "";
268375
+ }
268376
+ if (message.system != null && message.hasOwnProperty("system"))
268377
+ object.system = message.system;
268378
+ if (message.code != null && message.hasOwnProperty("code"))
268379
+ object.code = message.code;
268380
+ if (message.display != null && message.hasOwnProperty("display"))
268381
+ object.display = message.display;
268382
+ return object;
268383
+ };
268384
+
268385
+ /**
268386
+ * Converts this ClinicalNoteCoding to JSON.
268387
+ * @function toJSON
268388
+ * @memberof ClinicalNoteCoding
268389
+ * @instance
268390
+ * @returns {Object.<string,*>} JSON object
268391
+ */
268392
+ ClinicalNoteCoding.prototype.toJSON = function toJSON() {
268393
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
268394
+ };
268395
+
268396
+ /**
268397
+ * Gets the type url for ClinicalNoteCoding
268398
+ * @function getTypeUrl
268399
+ * @memberof ClinicalNoteCoding
268400
+ * @static
268401
+ * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"`
268402
+ * @returns {string} The type url
268403
+ */
268404
+ ClinicalNoteCoding.getTypeUrl = function getTypeUrl(prefix) {
268405
+ if (prefix === undefined)
268406
+ prefix = "type.googleapis.com";
268407
+ return prefix + "/ClinicalNoteCoding";
268408
+ };
268409
+
268410
+ return ClinicalNoteCoding;
268411
+ })();
268412
+
268413
+ $root.ClinicalNoteCodeableConcept = (function() {
268414
+
268415
+ /**
268416
+ * Properties of a ClinicalNoteCodeableConcept.
268417
+ * @typedef {Object} ClinicalNoteCodeableConcept.$Properties
268418
+ * @property {Array.<ClinicalNoteCoding.$Properties>|null} [codings] ClinicalNoteCodeableConcept codings
268419
+ * @property {string|null} [text] ClinicalNoteCodeableConcept text
268420
+ * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
268421
+ */
268422
+
268423
+ /**
268424
+ * Properties of a ClinicalNoteCodeableConcept.
268425
+ * @name IClinicalNoteCodeableConcept
268426
+ * @interface IClinicalNoteCodeableConcept
268427
+ * @augments ClinicalNoteCodeableConcept.$Properties
268428
+ * @deprecated Use ClinicalNoteCodeableConcept.$Properties instead.
268429
+ */
268430
+
268431
+ /**
268432
+ * Shape of a ClinicalNoteCodeableConcept.
268433
+ * @typedef {ClinicalNoteCodeableConcept.$Properties} ClinicalNoteCodeableConcept.$Shape
268434
+ */
268435
+
268436
+ /**
268437
+ * Constructs a new ClinicalNoteCodeableConcept.
268438
+ * @name ClinicalNoteCodeableConcept
268439
+ * @classdesc Represents a ClinicalNoteCodeableConcept.
268440
+ * @constructor
268441
+ * @param {ClinicalNoteCodeableConcept.$Properties=} [properties] Properties to set
268442
+ * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
268443
+ */
268444
+ function ClinicalNoteCodeableConcept(properties) {
268445
+ this.codings = [];
268446
+ if (properties)
268447
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
268448
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
268449
+ this[keys[i]] = properties[keys[i]];
268450
+ }
268451
+
268452
+ /**
268453
+ * ClinicalNoteCodeableConcept codings.
268454
+ * @member {Array.<ClinicalNoteCoding.$Properties>} codings
268455
+ * @memberof ClinicalNoteCodeableConcept
268456
+ * @instance
268457
+ */
268458
+ ClinicalNoteCodeableConcept.prototype.codings = $util.emptyArray;
268459
+
268460
+ /**
268461
+ * ClinicalNoteCodeableConcept text.
268462
+ * @member {string} text
268463
+ * @memberof ClinicalNoteCodeableConcept
268464
+ * @instance
268465
+ */
268466
+ ClinicalNoteCodeableConcept.prototype.text = "";
268467
+
268468
+ /**
268469
+ * Creates a new ClinicalNoteCodeableConcept instance using the specified properties.
268470
+ * @function create
268471
+ * @memberof ClinicalNoteCodeableConcept
268472
+ * @static
268473
+ * @param {ClinicalNoteCodeableConcept.$Properties=} [properties] Properties to set
268474
+ * @returns {ClinicalNoteCodeableConcept} ClinicalNoteCodeableConcept instance
268475
+ * @type {{
268476
+ * (properties: ClinicalNoteCodeableConcept.$Shape): ClinicalNoteCodeableConcept & ClinicalNoteCodeableConcept.$Shape;
268477
+ * (properties?: ClinicalNoteCodeableConcept.$Properties): ClinicalNoteCodeableConcept;
268478
+ * }}
268479
+ */
268480
+ ClinicalNoteCodeableConcept.create = function create(properties) {
268481
+ return new ClinicalNoteCodeableConcept(properties);
268482
+ };
268483
+
268484
+ /**
268485
+ * Encodes the specified ClinicalNoteCodeableConcept message. Does not implicitly {@link ClinicalNoteCodeableConcept.verify|verify} messages.
268486
+ * @function encode
268487
+ * @memberof ClinicalNoteCodeableConcept
268488
+ * @static
268489
+ * @param {ClinicalNoteCodeableConcept.$Properties} message ClinicalNoteCodeableConcept message or plain object to encode
268490
+ * @param {$protobuf.Writer} [writer] Writer to encode to
268491
+ * @returns {$protobuf.Writer} Writer
268492
+ */
268493
+ ClinicalNoteCodeableConcept.encode = function encode(message, writer) {
268494
+ if (!writer)
268495
+ writer = $Writer.create();
268496
+ if (message.codings != null && message.codings.length)
268497
+ for (var i = 0; i < message.codings.length; ++i)
268498
+ $root.ClinicalNoteCoding.encode(message.codings[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
268499
+ if (message.text != null && Object.hasOwnProperty.call(message, "text"))
268500
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.text);
268501
+ if (message.$unknowns != null && Object.hasOwnProperty.call(message, "$unknowns"))
268502
+ for (var i = 0; i < message.$unknowns.length; ++i)
268503
+ writer.raw(message.$unknowns[i]);
268504
+ return writer;
268505
+ };
268506
+
268507
+ /**
268508
+ * Encodes the specified ClinicalNoteCodeableConcept message, length delimited. Does not implicitly {@link ClinicalNoteCodeableConcept.verify|verify} messages.
268509
+ * @function encodeDelimited
268510
+ * @memberof ClinicalNoteCodeableConcept
268511
+ * @static
268512
+ * @param {ClinicalNoteCodeableConcept.$Properties} message ClinicalNoteCodeableConcept message or plain object to encode
268513
+ * @param {$protobuf.Writer} [writer] Writer to encode to
268514
+ * @returns {$protobuf.Writer} Writer
268515
+ */
268516
+ ClinicalNoteCodeableConcept.encodeDelimited = function encodeDelimited(message, writer) {
268517
+ return this.encode(message, writer).ldelim();
268518
+ };
268519
+
268520
+ /**
268521
+ * Decodes a ClinicalNoteCodeableConcept message from the specified reader or buffer.
268522
+ * @function decode
268523
+ * @memberof ClinicalNoteCodeableConcept
268524
+ * @static
268525
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
268526
+ * @param {number} [length] Message length if known beforehand
268527
+ * @returns {ClinicalNoteCodeableConcept & ClinicalNoteCodeableConcept.$Shape} ClinicalNoteCodeableConcept
268528
+ * @throws {Error} If the payload is not a reader or valid buffer
268529
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
268530
+ */
268531
+ ClinicalNoteCodeableConcept.decode = function decode(reader, length, _end, _depth, _target) {
268532
+ if (!(reader instanceof $Reader))
268533
+ reader = $Reader.create(reader);
268534
+ if (_depth === undefined)
268535
+ _depth = 0;
268536
+ if (_depth > $Reader.recursionLimit)
268537
+ throw Error("max depth exceeded");
268538
+ var end = length === undefined ? reader.len : reader.pos + length, message = _target || new $root.ClinicalNoteCodeableConcept(), value;
268539
+ while (reader.pos < end) {
268540
+ var start = reader.pos;
268541
+ var tag = reader.tag();
268542
+ if (tag === _end) {
268543
+ _end = undefined;
268544
+ break;
268545
+ }
268546
+ var wireType = tag & 7;
268547
+ switch (tag >>>= 3) {
268548
+ case 1: {
268549
+ if (wireType !== 2)
268550
+ break;
268551
+ if (!(message.codings && message.codings.length))
268552
+ message.codings = [];
268553
+ message.codings.push($root.ClinicalNoteCoding.decode(reader, reader.uint32(), undefined, _depth + 1));
268554
+ continue;
268555
+ }
268556
+ case 2: {
268557
+ if (wireType !== 2)
268558
+ break;
268559
+ if ((value = reader.string()).length)
268560
+ message.text = value;
268561
+ else
268562
+ delete message.text;
268563
+ continue;
268564
+ }
268565
+ }
268566
+ reader.skipType(wireType, _depth, tag);
268567
+ $util.makeProp(message, "$unknowns", false);
268568
+ (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos));
268569
+ }
268570
+ if (_end !== undefined)
268571
+ throw Error("missing end group");
268572
+ return message;
268573
+ };
268574
+
268575
+ /**
268576
+ * Decodes a ClinicalNoteCodeableConcept message from the specified reader or buffer, length delimited.
268577
+ * @function decodeDelimited
268578
+ * @memberof ClinicalNoteCodeableConcept
268579
+ * @static
268580
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
268581
+ * @returns {ClinicalNoteCodeableConcept & ClinicalNoteCodeableConcept.$Shape} ClinicalNoteCodeableConcept
268582
+ * @throws {Error} If the payload is not a reader or valid buffer
268583
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
268584
+ */
268585
+ ClinicalNoteCodeableConcept.decodeDelimited = function decodeDelimited(reader) {
268586
+ if (!(reader instanceof $Reader))
268587
+ reader = new $Reader(reader);
268588
+ return this.decode(reader, reader.uint32());
268589
+ };
268590
+
268591
+ /**
268592
+ * Verifies a ClinicalNoteCodeableConcept message.
268593
+ * @function verify
268594
+ * @memberof ClinicalNoteCodeableConcept
268595
+ * @static
268596
+ * @param {Object.<string,*>} message Plain object to verify
268597
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
268598
+ */
268599
+ ClinicalNoteCodeableConcept.verify = function verify(message, _depth) {
268600
+ if (typeof message !== "object" || message === null)
268601
+ return "object expected";
268602
+ if (_depth === undefined)
268603
+ _depth = 0;
268604
+ if (_depth > $util.recursionLimit)
268605
+ return "max depth exceeded";
268606
+ if (message.codings != null && message.hasOwnProperty("codings")) {
268607
+ if (!Array.isArray(message.codings))
268608
+ return "codings: array expected";
268609
+ for (var i = 0; i < message.codings.length; ++i) {
268610
+ var error = $root.ClinicalNoteCoding.verify(message.codings[i], _depth + 1);
268611
+ if (error)
268612
+ return "codings." + error;
268613
+ }
268614
+ }
268615
+ if (message.text != null && message.hasOwnProperty("text"))
268616
+ if (!$util.isString(message.text))
268617
+ return "text: string expected";
268618
+ return null;
268619
+ };
268620
+
268621
+ /**
268622
+ * Creates a ClinicalNoteCodeableConcept message from a plain object. Also converts values to their respective internal types.
268623
+ * @function fromObject
268624
+ * @memberof ClinicalNoteCodeableConcept
268625
+ * @static
268626
+ * @param {Object.<string,*>} object Plain object
268627
+ * @returns {ClinicalNoteCodeableConcept} ClinicalNoteCodeableConcept
268628
+ */
268629
+ ClinicalNoteCodeableConcept.fromObject = function fromObject(object, _depth) {
268630
+ if (object instanceof $root.ClinicalNoteCodeableConcept)
268631
+ return object;
268632
+ if (_depth === undefined)
268633
+ _depth = 0;
268634
+ if (_depth > $util.recursionLimit)
268635
+ throw Error("max depth exceeded");
268636
+ var message = new $root.ClinicalNoteCodeableConcept();
268637
+ if (object.codings) {
268638
+ if (!Array.isArray(object.codings))
268639
+ throw TypeError(".ClinicalNoteCodeableConcept.codings: array expected");
268640
+ message.codings = Array(object.codings.length);
268641
+ for (var i = 0; i < object.codings.length; ++i) {
268642
+ if (typeof object.codings[i] !== "object")
268643
+ throw TypeError(".ClinicalNoteCodeableConcept.codings: object expected");
268644
+ message.codings[i] = $root.ClinicalNoteCoding.fromObject(object.codings[i], _depth + 1);
268645
+ }
268646
+ }
268647
+ if (object.text != null)
268648
+ if (typeof object.text !== "string" || object.text.length)
268649
+ message.text = String(object.text);
268650
+ return message;
268651
+ };
268652
+
268653
+ /**
268654
+ * Creates a plain object from a ClinicalNoteCodeableConcept message. Also converts values to other types if specified.
268655
+ * @function toObject
268656
+ * @memberof ClinicalNoteCodeableConcept
268657
+ * @static
268658
+ * @param {ClinicalNoteCodeableConcept} message ClinicalNoteCodeableConcept
268659
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
268660
+ * @returns {Object.<string,*>} Plain object
268661
+ */
268662
+ ClinicalNoteCodeableConcept.toObject = function toObject(message, options) {
268663
+ if (!options)
268664
+ options = {};
268665
+ var object = {};
268666
+ if (options.arrays || options.defaults)
268667
+ object.codings = [];
268668
+ if (options.defaults)
268669
+ object.text = "";
268670
+ if (message.codings && message.codings.length) {
268671
+ object.codings = Array(message.codings.length);
268672
+ for (var j = 0; j < message.codings.length; ++j)
268673
+ object.codings[j] = $root.ClinicalNoteCoding.toObject(message.codings[j], options);
268674
+ }
268675
+ if (message.text != null && message.hasOwnProperty("text"))
268676
+ object.text = message.text;
268677
+ return object;
268678
+ };
268679
+
268680
+ /**
268681
+ * Converts this ClinicalNoteCodeableConcept to JSON.
268682
+ * @function toJSON
268683
+ * @memberof ClinicalNoteCodeableConcept
268684
+ * @instance
268685
+ * @returns {Object.<string,*>} JSON object
268686
+ */
268687
+ ClinicalNoteCodeableConcept.prototype.toJSON = function toJSON() {
268688
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
268689
+ };
268690
+
268691
+ /**
268692
+ * Gets the type url for ClinicalNoteCodeableConcept
268693
+ * @function getTypeUrl
268694
+ * @memberof ClinicalNoteCodeableConcept
268695
+ * @static
268696
+ * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"`
268697
+ * @returns {string} The type url
268698
+ */
268699
+ ClinicalNoteCodeableConcept.getTypeUrl = function getTypeUrl(prefix) {
268700
+ if (prefix === undefined)
268701
+ prefix = "type.googleapis.com";
268702
+ return prefix + "/ClinicalNoteCodeableConcept";
268703
+ };
268704
+
268705
+ return ClinicalNoteCodeableConcept;
268706
+ })();
268707
+
268708
+ /**
268709
+ * ClinicalNoteObservationCategory enum.
268710
+ * @name ClinicalNoteObservationCategory
268711
+ * @enum {number}
268712
+ * @property {number} CLINICAL_NOTE_OBSERVATION_CATEGORY_UNKNOWN=0 CLINICAL_NOTE_OBSERVATION_CATEGORY_UNKNOWN value
268713
+ * @property {number} CLINICAL_NOTE_OBSERVATION_CATEGORY_EXAM=1 CLINICAL_NOTE_OBSERVATION_CATEGORY_EXAM value
268714
+ * @property {number} CLINICAL_NOTE_OBSERVATION_CATEGORY_SOCIAL_HISTORY=2 CLINICAL_NOTE_OBSERVATION_CATEGORY_SOCIAL_HISTORY value
268715
+ * @property {number} CLINICAL_NOTE_OBSERVATION_CATEGORY_THERAPY=3 CLINICAL_NOTE_OBSERVATION_CATEGORY_THERAPY value
268716
+ */
268717
+ $root.ClinicalNoteObservationCategory = (function() {
268718
+ var valuesById = {}, values = Object.create(valuesById);
268719
+ values[valuesById[0] = "CLINICAL_NOTE_OBSERVATION_CATEGORY_UNKNOWN"] = 0;
268720
+ values[valuesById[1] = "CLINICAL_NOTE_OBSERVATION_CATEGORY_EXAM"] = 1;
268721
+ values[valuesById[2] = "CLINICAL_NOTE_OBSERVATION_CATEGORY_SOCIAL_HISTORY"] = 2;
268722
+ values[valuesById[3] = "CLINICAL_NOTE_OBSERVATION_CATEGORY_THERAPY"] = 3;
268723
+ return values;
268724
+ })();
268725
+
268726
+ $root.ClinicalNoteObservation = (function() {
268727
+
268728
+ /**
268729
+ * Properties of a ClinicalNoteObservation.
268730
+ * @typedef {Object} ClinicalNoteObservation.$Properties
268731
+ * @property {string|null} [key] ClinicalNoteObservation key
268732
+ * @property {string|null} [panelKey] ClinicalNoteObservation panelKey
268733
+ * @property {ClinicalNoteObservationCategory|null} [category] ClinicalNoteObservation category
268734
+ * @property {ClinicalNoteCodeableConcept.$Properties|null} [code] ClinicalNoteObservation code
268735
+ * @property {ClinicalNoteCodeableConcept.$Properties|null} [valueConcept] ClinicalNoteObservation valueConcept
268736
+ * @property {string|null} [valueString] ClinicalNoteObservation valueString
268737
+ * @property {boolean|null} [valueBoolean] ClinicalNoteObservation valueBoolean
268738
+ * @property {string|null} [note] ClinicalNoteObservation note
268739
+ * @property {Array.<string>|null} [ds4pCodes] ClinicalNoteObservation ds4pCodes
268740
+ * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
268741
+ */
268742
+
268743
+ /**
268744
+ * Properties of a ClinicalNoteObservation.
268745
+ * @name IClinicalNoteObservation
268746
+ * @interface IClinicalNoteObservation
268747
+ * @augments ClinicalNoteObservation.$Properties
268748
+ * @deprecated Use ClinicalNoteObservation.$Properties instead.
268749
+ */
268750
+
268751
+ /**
268752
+ * Shape of a ClinicalNoteObservation.
268753
+ * @typedef {ClinicalNoteObservation.$Properties} ClinicalNoteObservation.$Shape
268754
+ */
268755
+
268756
+ /**
268757
+ * Constructs a new ClinicalNoteObservation.
268758
+ * @name ClinicalNoteObservation
268759
+ * @classdesc Represents a ClinicalNoteObservation.
268760
+ * @constructor
268761
+ * @param {ClinicalNoteObservation.$Properties=} [properties] Properties to set
268762
+ * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
268763
+ */
268764
+ function ClinicalNoteObservation(properties) {
268765
+ this.ds4pCodes = [];
268766
+ if (properties)
268767
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
268768
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
268769
+ this[keys[i]] = properties[keys[i]];
268770
+ }
268771
+
268772
+ /**
268773
+ * ClinicalNoteObservation key.
268774
+ * @member {string} key
268775
+ * @memberof ClinicalNoteObservation
268776
+ * @instance
268777
+ */
268778
+ ClinicalNoteObservation.prototype.key = "";
268779
+
268780
+ /**
268781
+ * ClinicalNoteObservation panelKey.
268782
+ * @member {string} panelKey
268783
+ * @memberof ClinicalNoteObservation
268784
+ * @instance
268785
+ */
268786
+ ClinicalNoteObservation.prototype.panelKey = "";
268787
+
268788
+ /**
268789
+ * ClinicalNoteObservation category.
268790
+ * @member {ClinicalNoteObservationCategory} category
268791
+ * @memberof ClinicalNoteObservation
268792
+ * @instance
268793
+ */
268794
+ ClinicalNoteObservation.prototype.category = 0;
268795
+
268796
+ /**
268797
+ * ClinicalNoteObservation code.
268798
+ * @member {ClinicalNoteCodeableConcept.$Properties|null|undefined} code
268799
+ * @memberof ClinicalNoteObservation
268800
+ * @instance
268801
+ */
268802
+ ClinicalNoteObservation.prototype.code = null;
268803
+
268804
+ /**
268805
+ * ClinicalNoteObservation valueConcept.
268806
+ * @member {ClinicalNoteCodeableConcept.$Properties|null|undefined} valueConcept
268807
+ * @memberof ClinicalNoteObservation
268808
+ * @instance
268809
+ */
268810
+ ClinicalNoteObservation.prototype.valueConcept = null;
268811
+
268812
+ /**
268813
+ * ClinicalNoteObservation valueString.
268814
+ * @member {string} valueString
268815
+ * @memberof ClinicalNoteObservation
268816
+ * @instance
268817
+ */
268818
+ ClinicalNoteObservation.prototype.valueString = "";
268819
+
268820
+ /**
268821
+ * ClinicalNoteObservation valueBoolean.
268822
+ * @member {boolean|null|undefined} valueBoolean
268823
+ * @memberof ClinicalNoteObservation
268824
+ * @instance
268825
+ */
268826
+ ClinicalNoteObservation.prototype.valueBoolean = null;
268827
+
268828
+ /**
268829
+ * ClinicalNoteObservation note.
268830
+ * @member {string} note
268831
+ * @memberof ClinicalNoteObservation
268832
+ * @instance
268833
+ */
268834
+ ClinicalNoteObservation.prototype.note = "";
268835
+
268836
+ /**
268837
+ * ClinicalNoteObservation ds4pCodes.
268838
+ * @member {Array.<string>} ds4pCodes
268839
+ * @memberof ClinicalNoteObservation
268840
+ * @instance
268841
+ */
268842
+ ClinicalNoteObservation.prototype.ds4pCodes = $util.emptyArray;
268843
+
268844
+ // OneOf field names bound to virtual getters and setters
268845
+ var $oneOfFields;
268846
+
268847
+ // Virtual OneOf for proto3 optional field
268848
+ Object.defineProperty(ClinicalNoteObservation.prototype, "_valueBoolean", {
268849
+ get: $util.oneOfGetter($oneOfFields = ["valueBoolean"]),
268850
+ set: $util.oneOfSetter($oneOfFields)
268851
+ });
268852
+
268853
+ /**
268854
+ * Creates a new ClinicalNoteObservation instance using the specified properties.
268855
+ * @function create
268856
+ * @memberof ClinicalNoteObservation
268857
+ * @static
268858
+ * @param {ClinicalNoteObservation.$Properties=} [properties] Properties to set
268859
+ * @returns {ClinicalNoteObservation} ClinicalNoteObservation instance
268860
+ * @type {{
268861
+ * (properties: ClinicalNoteObservation.$Shape): ClinicalNoteObservation & ClinicalNoteObservation.$Shape;
268862
+ * (properties?: ClinicalNoteObservation.$Properties): ClinicalNoteObservation;
268863
+ * }}
268864
+ */
268865
+ ClinicalNoteObservation.create = function create(properties) {
268866
+ return new ClinicalNoteObservation(properties);
268867
+ };
268868
+
268869
+ /**
268870
+ * Encodes the specified ClinicalNoteObservation message. Does not implicitly {@link ClinicalNoteObservation.verify|verify} messages.
268871
+ * @function encode
268872
+ * @memberof ClinicalNoteObservation
268873
+ * @static
268874
+ * @param {ClinicalNoteObservation.$Properties} message ClinicalNoteObservation message or plain object to encode
268875
+ * @param {$protobuf.Writer} [writer] Writer to encode to
268876
+ * @returns {$protobuf.Writer} Writer
268877
+ */
268878
+ ClinicalNoteObservation.encode = function encode(message, writer) {
268879
+ if (!writer)
268880
+ writer = $Writer.create();
268881
+ if (message.key != null && Object.hasOwnProperty.call(message, "key"))
268882
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.key);
268883
+ if (message.panelKey != null && Object.hasOwnProperty.call(message, "panelKey"))
268884
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.panelKey);
268885
+ if (message.category != null && Object.hasOwnProperty.call(message, "category"))
268886
+ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.category);
268887
+ if (message.code != null && Object.hasOwnProperty.call(message, "code"))
268888
+ $root.ClinicalNoteCodeableConcept.encode(message.code, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
268889
+ if (message.valueConcept != null && Object.hasOwnProperty.call(message, "valueConcept"))
268890
+ $root.ClinicalNoteCodeableConcept.encode(message.valueConcept, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
268891
+ if (message.valueString != null && Object.hasOwnProperty.call(message, "valueString"))
268892
+ writer.uint32(/* id 6, wireType 2 =*/50).string(message.valueString);
268893
+ if (message.valueBoolean != null && Object.hasOwnProperty.call(message, "valueBoolean"))
268894
+ writer.uint32(/* id 7, wireType 0 =*/56).bool(message.valueBoolean);
268895
+ if (message.note != null && Object.hasOwnProperty.call(message, "note"))
268896
+ writer.uint32(/* id 8, wireType 2 =*/66).string(message.note);
268897
+ if (message.ds4pCodes != null && message.ds4pCodes.length)
268898
+ for (var i = 0; i < message.ds4pCodes.length; ++i)
268899
+ writer.uint32(/* id 9, wireType 2 =*/74).string(message.ds4pCodes[i]);
268900
+ if (message.$unknowns != null && Object.hasOwnProperty.call(message, "$unknowns"))
268901
+ for (var i = 0; i < message.$unknowns.length; ++i)
268902
+ writer.raw(message.$unknowns[i]);
268903
+ return writer;
268904
+ };
268905
+
268906
+ /**
268907
+ * Encodes the specified ClinicalNoteObservation message, length delimited. Does not implicitly {@link ClinicalNoteObservation.verify|verify} messages.
268908
+ * @function encodeDelimited
268909
+ * @memberof ClinicalNoteObservation
268910
+ * @static
268911
+ * @param {ClinicalNoteObservation.$Properties} message ClinicalNoteObservation message or plain object to encode
268912
+ * @param {$protobuf.Writer} [writer] Writer to encode to
268913
+ * @returns {$protobuf.Writer} Writer
268914
+ */
268915
+ ClinicalNoteObservation.encodeDelimited = function encodeDelimited(message, writer) {
268916
+ return this.encode(message, writer).ldelim();
268917
+ };
268918
+
268919
+ /**
268920
+ * Decodes a ClinicalNoteObservation message from the specified reader or buffer.
268921
+ * @function decode
268922
+ * @memberof ClinicalNoteObservation
268923
+ * @static
268924
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
268925
+ * @param {number} [length] Message length if known beforehand
268926
+ * @returns {ClinicalNoteObservation & ClinicalNoteObservation.$Shape} ClinicalNoteObservation
268927
+ * @throws {Error} If the payload is not a reader or valid buffer
268928
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
268929
+ */
268930
+ ClinicalNoteObservation.decode = function decode(reader, length, _end, _depth, _target) {
268931
+ if (!(reader instanceof $Reader))
268932
+ reader = $Reader.create(reader);
268933
+ if (_depth === undefined)
268934
+ _depth = 0;
268935
+ if (_depth > $Reader.recursionLimit)
268936
+ throw Error("max depth exceeded");
268937
+ var end = length === undefined ? reader.len : reader.pos + length, message = _target || new $root.ClinicalNoteObservation(), value;
268938
+ while (reader.pos < end) {
268939
+ var start = reader.pos;
268940
+ var tag = reader.tag();
268941
+ if (tag === _end) {
268942
+ _end = undefined;
268943
+ break;
268944
+ }
268945
+ var wireType = tag & 7;
268946
+ switch (tag >>>= 3) {
268947
+ case 1: {
268948
+ if (wireType !== 2)
268949
+ break;
268950
+ if ((value = reader.string()).length)
268951
+ message.key = value;
268952
+ else
268953
+ delete message.key;
268954
+ continue;
268955
+ }
268956
+ case 2: {
268957
+ if (wireType !== 2)
268958
+ break;
268959
+ if ((value = reader.string()).length)
268960
+ message.panelKey = value;
268961
+ else
268962
+ delete message.panelKey;
268963
+ continue;
268964
+ }
268965
+ case 3: {
268966
+ if (wireType !== 0)
268967
+ break;
268968
+ if (value = reader.int32())
268969
+ message.category = value;
268970
+ else
268971
+ delete message.category;
268972
+ continue;
268973
+ }
268974
+ case 4: {
268975
+ if (wireType !== 2)
268976
+ break;
268977
+ message.code = $root.ClinicalNoteCodeableConcept.decode(reader, reader.uint32(), undefined, _depth + 1, message.code);
268978
+ continue;
268979
+ }
268980
+ case 5: {
268981
+ if (wireType !== 2)
268982
+ break;
268983
+ message.valueConcept = $root.ClinicalNoteCodeableConcept.decode(reader, reader.uint32(), undefined, _depth + 1, message.valueConcept);
268984
+ continue;
268985
+ }
268986
+ case 6: {
268987
+ if (wireType !== 2)
268988
+ break;
268989
+ if ((value = reader.string()).length)
268990
+ message.valueString = value;
268991
+ else
268992
+ delete message.valueString;
268993
+ continue;
268994
+ }
268995
+ case 7: {
268996
+ if (wireType !== 0)
268997
+ break;
268998
+ message.valueBoolean = reader.bool();
268999
+ message._valueBoolean = "valueBoolean";
269000
+ continue;
269001
+ }
269002
+ case 8: {
269003
+ if (wireType !== 2)
269004
+ break;
269005
+ if ((value = reader.string()).length)
269006
+ message.note = value;
269007
+ else
269008
+ delete message.note;
269009
+ continue;
269010
+ }
269011
+ case 9: {
269012
+ if (wireType !== 2)
269013
+ break;
269014
+ if (!(message.ds4pCodes && message.ds4pCodes.length))
269015
+ message.ds4pCodes = [];
269016
+ message.ds4pCodes.push(reader.string());
269017
+ continue;
269018
+ }
269019
+ }
269020
+ reader.skipType(wireType, _depth, tag);
269021
+ $util.makeProp(message, "$unknowns", false);
269022
+ (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos));
269023
+ }
269024
+ if (_end !== undefined)
269025
+ throw Error("missing end group");
269026
+ return message;
269027
+ };
269028
+
269029
+ /**
269030
+ * Decodes a ClinicalNoteObservation message from the specified reader or buffer, length delimited.
269031
+ * @function decodeDelimited
269032
+ * @memberof ClinicalNoteObservation
269033
+ * @static
269034
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
269035
+ * @returns {ClinicalNoteObservation & ClinicalNoteObservation.$Shape} ClinicalNoteObservation
269036
+ * @throws {Error} If the payload is not a reader or valid buffer
269037
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
269038
+ */
269039
+ ClinicalNoteObservation.decodeDelimited = function decodeDelimited(reader) {
269040
+ if (!(reader instanceof $Reader))
269041
+ reader = new $Reader(reader);
269042
+ return this.decode(reader, reader.uint32());
269043
+ };
269044
+
269045
+ /**
269046
+ * Verifies a ClinicalNoteObservation message.
269047
+ * @function verify
269048
+ * @memberof ClinicalNoteObservation
269049
+ * @static
269050
+ * @param {Object.<string,*>} message Plain object to verify
269051
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
269052
+ */
269053
+ ClinicalNoteObservation.verify = function verify(message, _depth) {
269054
+ if (typeof message !== "object" || message === null)
269055
+ return "object expected";
269056
+ if (_depth === undefined)
269057
+ _depth = 0;
269058
+ if (_depth > $util.recursionLimit)
269059
+ return "max depth exceeded";
269060
+ var properties = {};
269061
+ if (message.key != null && message.hasOwnProperty("key"))
269062
+ if (!$util.isString(message.key))
269063
+ return "key: string expected";
269064
+ if (message.panelKey != null && message.hasOwnProperty("panelKey"))
269065
+ if (!$util.isString(message.panelKey))
269066
+ return "panelKey: string expected";
269067
+ if (message.category != null && message.hasOwnProperty("category"))
269068
+ switch (message.category) {
269069
+ default:
269070
+ return "category: enum value expected";
269071
+ case 0:
269072
+ case 1:
269073
+ case 2:
269074
+ case 3:
269075
+ break;
269076
+ }
269077
+ if (message.code != null && message.hasOwnProperty("code")) {
269078
+ var error = $root.ClinicalNoteCodeableConcept.verify(message.code, _depth + 1);
269079
+ if (error)
269080
+ return "code." + error;
269081
+ }
269082
+ if (message.valueConcept != null && message.hasOwnProperty("valueConcept")) {
269083
+ var error = $root.ClinicalNoteCodeableConcept.verify(message.valueConcept, _depth + 1);
269084
+ if (error)
269085
+ return "valueConcept." + error;
269086
+ }
269087
+ if (message.valueString != null && message.hasOwnProperty("valueString"))
269088
+ if (!$util.isString(message.valueString))
269089
+ return "valueString: string expected";
269090
+ if (message.valueBoolean != null && message.hasOwnProperty("valueBoolean")) {
269091
+ properties._valueBoolean = 1;
269092
+ if (typeof message.valueBoolean !== "boolean")
269093
+ return "valueBoolean: boolean expected";
269094
+ }
269095
+ if (message.note != null && message.hasOwnProperty("note"))
269096
+ if (!$util.isString(message.note))
269097
+ return "note: string expected";
269098
+ if (message.ds4pCodes != null && message.hasOwnProperty("ds4pCodes")) {
269099
+ if (!Array.isArray(message.ds4pCodes))
269100
+ return "ds4pCodes: array expected";
269101
+ for (var i = 0; i < message.ds4pCodes.length; ++i)
269102
+ if (!$util.isString(message.ds4pCodes[i]))
269103
+ return "ds4pCodes: string[] expected";
269104
+ }
269105
+ return null;
269106
+ };
269107
+
269108
+ /**
269109
+ * Creates a ClinicalNoteObservation message from a plain object. Also converts values to their respective internal types.
269110
+ * @function fromObject
269111
+ * @memberof ClinicalNoteObservation
269112
+ * @static
269113
+ * @param {Object.<string,*>} object Plain object
269114
+ * @returns {ClinicalNoteObservation} ClinicalNoteObservation
269115
+ */
269116
+ ClinicalNoteObservation.fromObject = function fromObject(object, _depth) {
269117
+ if (object instanceof $root.ClinicalNoteObservation)
269118
+ return object;
269119
+ if (_depth === undefined)
269120
+ _depth = 0;
269121
+ if (_depth > $util.recursionLimit)
269122
+ throw Error("max depth exceeded");
269123
+ var message = new $root.ClinicalNoteObservation();
269124
+ if (object.key != null)
269125
+ if (typeof object.key !== "string" || object.key.length)
269126
+ message.key = String(object.key);
269127
+ if (object.panelKey != null)
269128
+ if (typeof object.panelKey !== "string" || object.panelKey.length)
269129
+ message.panelKey = String(object.panelKey);
269130
+ if (object.category !== 0 && (typeof object.category !== "string" || $root.ClinicalNoteObservationCategory[object.category] !== 0))
269131
+ switch (object.category) {
269132
+ default:
269133
+ if (typeof object.category === "number") {
269134
+ message.category = object.category;
269135
+ break;
269136
+ }
269137
+ break;
269138
+ case "CLINICAL_NOTE_OBSERVATION_CATEGORY_UNKNOWN":
269139
+ case 0:
269140
+ message.category = 0;
269141
+ break;
269142
+ case "CLINICAL_NOTE_OBSERVATION_CATEGORY_EXAM":
269143
+ case 1:
269144
+ message.category = 1;
269145
+ break;
269146
+ case "CLINICAL_NOTE_OBSERVATION_CATEGORY_SOCIAL_HISTORY":
269147
+ case 2:
269148
+ message.category = 2;
269149
+ break;
269150
+ case "CLINICAL_NOTE_OBSERVATION_CATEGORY_THERAPY":
269151
+ case 3:
269152
+ message.category = 3;
269153
+ break;
269154
+ }
269155
+ if (object.code != null) {
269156
+ if (typeof object.code !== "object")
269157
+ throw TypeError(".ClinicalNoteObservation.code: object expected");
269158
+ message.code = $root.ClinicalNoteCodeableConcept.fromObject(object.code, _depth + 1);
269159
+ }
269160
+ if (object.valueConcept != null) {
269161
+ if (typeof object.valueConcept !== "object")
269162
+ throw TypeError(".ClinicalNoteObservation.valueConcept: object expected");
269163
+ message.valueConcept = $root.ClinicalNoteCodeableConcept.fromObject(object.valueConcept, _depth + 1);
269164
+ }
269165
+ if (object.valueString != null)
269166
+ if (typeof object.valueString !== "string" || object.valueString.length)
269167
+ message.valueString = String(object.valueString);
269168
+ if (object.valueBoolean != null)
269169
+ message.valueBoolean = Boolean(object.valueBoolean);
269170
+ if (object.note != null)
269171
+ if (typeof object.note !== "string" || object.note.length)
269172
+ message.note = String(object.note);
269173
+ if (object.ds4pCodes) {
269174
+ if (!Array.isArray(object.ds4pCodes))
269175
+ throw TypeError(".ClinicalNoteObservation.ds4pCodes: array expected");
269176
+ message.ds4pCodes = Array(object.ds4pCodes.length);
269177
+ for (var i = 0; i < object.ds4pCodes.length; ++i)
269178
+ message.ds4pCodes[i] = String(object.ds4pCodes[i]);
269179
+ }
269180
+ return message;
269181
+ };
269182
+
269183
+ /**
269184
+ * Creates a plain object from a ClinicalNoteObservation message. Also converts values to other types if specified.
269185
+ * @function toObject
269186
+ * @memberof ClinicalNoteObservation
269187
+ * @static
269188
+ * @param {ClinicalNoteObservation} message ClinicalNoteObservation
269189
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
269190
+ * @returns {Object.<string,*>} Plain object
269191
+ */
269192
+ ClinicalNoteObservation.toObject = function toObject(message, options) {
269193
+ if (!options)
269194
+ options = {};
269195
+ var object = {};
269196
+ if (options.arrays || options.defaults)
269197
+ object.ds4pCodes = [];
269198
+ if (options.defaults) {
269199
+ object.key = "";
269200
+ object.panelKey = "";
269201
+ object.category = options.enums === String ? "CLINICAL_NOTE_OBSERVATION_CATEGORY_UNKNOWN" : 0;
269202
+ object.code = null;
269203
+ object.valueConcept = null;
269204
+ object.valueString = "";
269205
+ object.note = "";
269206
+ }
269207
+ if (message.key != null && message.hasOwnProperty("key"))
269208
+ object.key = message.key;
269209
+ if (message.panelKey != null && message.hasOwnProperty("panelKey"))
269210
+ object.panelKey = message.panelKey;
269211
+ if (message.category != null && message.hasOwnProperty("category"))
269212
+ object.category = options.enums === String ? $root.ClinicalNoteObservationCategory[message.category] === undefined ? message.category : $root.ClinicalNoteObservationCategory[message.category] : message.category;
269213
+ if (message.code != null && message.hasOwnProperty("code"))
269214
+ object.code = $root.ClinicalNoteCodeableConcept.toObject(message.code, options);
269215
+ if (message.valueConcept != null && message.hasOwnProperty("valueConcept"))
269216
+ object.valueConcept = $root.ClinicalNoteCodeableConcept.toObject(message.valueConcept, options);
269217
+ if (message.valueString != null && message.hasOwnProperty("valueString"))
269218
+ object.valueString = message.valueString;
269219
+ if (message.valueBoolean != null && message.hasOwnProperty("valueBoolean")) {
269220
+ object.valueBoolean = message.valueBoolean;
269221
+ if (options.oneofs)
269222
+ object._valueBoolean = "valueBoolean";
269223
+ }
269224
+ if (message.note != null && message.hasOwnProperty("note"))
269225
+ object.note = message.note;
269226
+ if (message.ds4pCodes && message.ds4pCodes.length) {
269227
+ object.ds4pCodes = Array(message.ds4pCodes.length);
269228
+ for (var j = 0; j < message.ds4pCodes.length; ++j)
269229
+ object.ds4pCodes[j] = message.ds4pCodes[j];
269230
+ }
269231
+ return object;
269232
+ };
269233
+
269234
+ /**
269235
+ * Converts this ClinicalNoteObservation to JSON.
269236
+ * @function toJSON
269237
+ * @memberof ClinicalNoteObservation
269238
+ * @instance
269239
+ * @returns {Object.<string,*>} JSON object
269240
+ */
269241
+ ClinicalNoteObservation.prototype.toJSON = function toJSON() {
269242
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
269243
+ };
269244
+
269245
+ /**
269246
+ * Gets the type url for ClinicalNoteObservation
269247
+ * @function getTypeUrl
269248
+ * @memberof ClinicalNoteObservation
269249
+ * @static
269250
+ * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"`
269251
+ * @returns {string} The type url
269252
+ */
269253
+ ClinicalNoteObservation.getTypeUrl = function getTypeUrl(prefix) {
269254
+ if (prefix === undefined)
269255
+ prefix = "type.googleapis.com";
269256
+ return prefix + "/ClinicalNoteObservation";
269257
+ };
269258
+
269259
+ return ClinicalNoteObservation;
269260
+ })();
269261
+
269262
+ $root.ClinicalNoteFamilyHistory = (function() {
269263
+
269264
+ /**
269265
+ * Properties of a ClinicalNoteFamilyHistory.
269266
+ * @typedef {Object} ClinicalNoteFamilyHistory.$Properties
269267
+ * @property {string|null} [key] ClinicalNoteFamilyHistory key
269268
+ * @property {ClinicalNoteCodeableConcept.$Properties|null} [relationship] ClinicalNoteFamilyHistory relationship
269269
+ * @property {string|null} [note] ClinicalNoteFamilyHistory note
269270
+ * @property {Array.<string>|null} [ds4pCodes] ClinicalNoteFamilyHistory ds4pCodes
269271
+ * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
269272
+ */
269273
+
269274
+ /**
269275
+ * Properties of a ClinicalNoteFamilyHistory.
269276
+ * @name IClinicalNoteFamilyHistory
269277
+ * @interface IClinicalNoteFamilyHistory
269278
+ * @augments ClinicalNoteFamilyHistory.$Properties
269279
+ * @deprecated Use ClinicalNoteFamilyHistory.$Properties instead.
269280
+ */
269281
+
269282
+ /**
269283
+ * Shape of a ClinicalNoteFamilyHistory.
269284
+ * @typedef {ClinicalNoteFamilyHistory.$Properties} ClinicalNoteFamilyHistory.$Shape
269285
+ */
269286
+
269287
+ /**
269288
+ * Constructs a new ClinicalNoteFamilyHistory.
269289
+ * @name ClinicalNoteFamilyHistory
269290
+ * @classdesc Represents a ClinicalNoteFamilyHistory.
269291
+ * @constructor
269292
+ * @param {ClinicalNoteFamilyHistory.$Properties=} [properties] Properties to set
269293
+ * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
269294
+ */
269295
+ function ClinicalNoteFamilyHistory(properties) {
269296
+ this.ds4pCodes = [];
269297
+ if (properties)
269298
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
269299
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
269300
+ this[keys[i]] = properties[keys[i]];
269301
+ }
269302
+
269303
+ /**
269304
+ * ClinicalNoteFamilyHistory key.
269305
+ * @member {string} key
269306
+ * @memberof ClinicalNoteFamilyHistory
269307
+ * @instance
269308
+ */
269309
+ ClinicalNoteFamilyHistory.prototype.key = "";
269310
+
269311
+ /**
269312
+ * ClinicalNoteFamilyHistory relationship.
269313
+ * @member {ClinicalNoteCodeableConcept.$Properties|null|undefined} relationship
269314
+ * @memberof ClinicalNoteFamilyHistory
269315
+ * @instance
269316
+ */
269317
+ ClinicalNoteFamilyHistory.prototype.relationship = null;
269318
+
269319
+ /**
269320
+ * ClinicalNoteFamilyHistory note.
269321
+ * @member {string} note
269322
+ * @memberof ClinicalNoteFamilyHistory
269323
+ * @instance
269324
+ */
269325
+ ClinicalNoteFamilyHistory.prototype.note = "";
269326
+
269327
+ /**
269328
+ * ClinicalNoteFamilyHistory ds4pCodes.
269329
+ * @member {Array.<string>} ds4pCodes
269330
+ * @memberof ClinicalNoteFamilyHistory
269331
+ * @instance
269332
+ */
269333
+ ClinicalNoteFamilyHistory.prototype.ds4pCodes = $util.emptyArray;
269334
+
269335
+ /**
269336
+ * Creates a new ClinicalNoteFamilyHistory instance using the specified properties.
269337
+ * @function create
269338
+ * @memberof ClinicalNoteFamilyHistory
269339
+ * @static
269340
+ * @param {ClinicalNoteFamilyHistory.$Properties=} [properties] Properties to set
269341
+ * @returns {ClinicalNoteFamilyHistory} ClinicalNoteFamilyHistory instance
269342
+ * @type {{
269343
+ * (properties: ClinicalNoteFamilyHistory.$Shape): ClinicalNoteFamilyHistory & ClinicalNoteFamilyHistory.$Shape;
269344
+ * (properties?: ClinicalNoteFamilyHistory.$Properties): ClinicalNoteFamilyHistory;
269345
+ * }}
269346
+ */
269347
+ ClinicalNoteFamilyHistory.create = function create(properties) {
269348
+ return new ClinicalNoteFamilyHistory(properties);
269349
+ };
269350
+
269351
+ /**
269352
+ * Encodes the specified ClinicalNoteFamilyHistory message. Does not implicitly {@link ClinicalNoteFamilyHistory.verify|verify} messages.
269353
+ * @function encode
269354
+ * @memberof ClinicalNoteFamilyHistory
269355
+ * @static
269356
+ * @param {ClinicalNoteFamilyHistory.$Properties} message ClinicalNoteFamilyHistory message or plain object to encode
269357
+ * @param {$protobuf.Writer} [writer] Writer to encode to
269358
+ * @returns {$protobuf.Writer} Writer
269359
+ */
269360
+ ClinicalNoteFamilyHistory.encode = function encode(message, writer) {
269361
+ if (!writer)
269362
+ writer = $Writer.create();
269363
+ if (message.key != null && Object.hasOwnProperty.call(message, "key"))
269364
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.key);
269365
+ if (message.relationship != null && Object.hasOwnProperty.call(message, "relationship"))
269366
+ $root.ClinicalNoteCodeableConcept.encode(message.relationship, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
269367
+ if (message.note != null && Object.hasOwnProperty.call(message, "note"))
269368
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.note);
269369
+ if (message.ds4pCodes != null && message.ds4pCodes.length)
269370
+ for (var i = 0; i < message.ds4pCodes.length; ++i)
269371
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.ds4pCodes[i]);
269372
+ if (message.$unknowns != null && Object.hasOwnProperty.call(message, "$unknowns"))
269373
+ for (var i = 0; i < message.$unknowns.length; ++i)
269374
+ writer.raw(message.$unknowns[i]);
269375
+ return writer;
269376
+ };
269377
+
269378
+ /**
269379
+ * Encodes the specified ClinicalNoteFamilyHistory message, length delimited. Does not implicitly {@link ClinicalNoteFamilyHistory.verify|verify} messages.
269380
+ * @function encodeDelimited
269381
+ * @memberof ClinicalNoteFamilyHistory
269382
+ * @static
269383
+ * @param {ClinicalNoteFamilyHistory.$Properties} message ClinicalNoteFamilyHistory message or plain object to encode
269384
+ * @param {$protobuf.Writer} [writer] Writer to encode to
269385
+ * @returns {$protobuf.Writer} Writer
269386
+ */
269387
+ ClinicalNoteFamilyHistory.encodeDelimited = function encodeDelimited(message, writer) {
269388
+ return this.encode(message, writer).ldelim();
269389
+ };
269390
+
269391
+ /**
269392
+ * Decodes a ClinicalNoteFamilyHistory message from the specified reader or buffer.
269393
+ * @function decode
269394
+ * @memberof ClinicalNoteFamilyHistory
269395
+ * @static
269396
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
269397
+ * @param {number} [length] Message length if known beforehand
269398
+ * @returns {ClinicalNoteFamilyHistory & ClinicalNoteFamilyHistory.$Shape} ClinicalNoteFamilyHistory
269399
+ * @throws {Error} If the payload is not a reader or valid buffer
269400
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
269401
+ */
269402
+ ClinicalNoteFamilyHistory.decode = function decode(reader, length, _end, _depth, _target) {
269403
+ if (!(reader instanceof $Reader))
269404
+ reader = $Reader.create(reader);
269405
+ if (_depth === undefined)
269406
+ _depth = 0;
269407
+ if (_depth > $Reader.recursionLimit)
269408
+ throw Error("max depth exceeded");
269409
+ var end = length === undefined ? reader.len : reader.pos + length, message = _target || new $root.ClinicalNoteFamilyHistory(), value;
269410
+ while (reader.pos < end) {
269411
+ var start = reader.pos;
269412
+ var tag = reader.tag();
269413
+ if (tag === _end) {
269414
+ _end = undefined;
269415
+ break;
269416
+ }
269417
+ var wireType = tag & 7;
269418
+ switch (tag >>>= 3) {
269419
+ case 1: {
269420
+ if (wireType !== 2)
269421
+ break;
269422
+ if ((value = reader.string()).length)
269423
+ message.key = value;
269424
+ else
269425
+ delete message.key;
269426
+ continue;
269427
+ }
269428
+ case 2: {
269429
+ if (wireType !== 2)
269430
+ break;
269431
+ message.relationship = $root.ClinicalNoteCodeableConcept.decode(reader, reader.uint32(), undefined, _depth + 1, message.relationship);
269432
+ continue;
269433
+ }
269434
+ case 3: {
269435
+ if (wireType !== 2)
269436
+ break;
269437
+ if ((value = reader.string()).length)
269438
+ message.note = value;
269439
+ else
269440
+ delete message.note;
269441
+ continue;
269442
+ }
269443
+ case 4: {
269444
+ if (wireType !== 2)
269445
+ break;
269446
+ if (!(message.ds4pCodes && message.ds4pCodes.length))
269447
+ message.ds4pCodes = [];
269448
+ message.ds4pCodes.push(reader.string());
269449
+ continue;
269450
+ }
269451
+ }
269452
+ reader.skipType(wireType, _depth, tag);
269453
+ $util.makeProp(message, "$unknowns", false);
269454
+ (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos));
269455
+ }
269456
+ if (_end !== undefined)
269457
+ throw Error("missing end group");
269458
+ return message;
269459
+ };
269460
+
269461
+ /**
269462
+ * Decodes a ClinicalNoteFamilyHistory message from the specified reader or buffer, length delimited.
269463
+ * @function decodeDelimited
269464
+ * @memberof ClinicalNoteFamilyHistory
269465
+ * @static
269466
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
269467
+ * @returns {ClinicalNoteFamilyHistory & ClinicalNoteFamilyHistory.$Shape} ClinicalNoteFamilyHistory
269468
+ * @throws {Error} If the payload is not a reader or valid buffer
269469
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
269470
+ */
269471
+ ClinicalNoteFamilyHistory.decodeDelimited = function decodeDelimited(reader) {
269472
+ if (!(reader instanceof $Reader))
269473
+ reader = new $Reader(reader);
269474
+ return this.decode(reader, reader.uint32());
269475
+ };
269476
+
269477
+ /**
269478
+ * Verifies a ClinicalNoteFamilyHistory message.
269479
+ * @function verify
269480
+ * @memberof ClinicalNoteFamilyHistory
269481
+ * @static
269482
+ * @param {Object.<string,*>} message Plain object to verify
269483
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
269484
+ */
269485
+ ClinicalNoteFamilyHistory.verify = function verify(message, _depth) {
269486
+ if (typeof message !== "object" || message === null)
269487
+ return "object expected";
269488
+ if (_depth === undefined)
269489
+ _depth = 0;
269490
+ if (_depth > $util.recursionLimit)
269491
+ return "max depth exceeded";
269492
+ if (message.key != null && message.hasOwnProperty("key"))
269493
+ if (!$util.isString(message.key))
269494
+ return "key: string expected";
269495
+ if (message.relationship != null && message.hasOwnProperty("relationship")) {
269496
+ var error = $root.ClinicalNoteCodeableConcept.verify(message.relationship, _depth + 1);
269497
+ if (error)
269498
+ return "relationship." + error;
269499
+ }
269500
+ if (message.note != null && message.hasOwnProperty("note"))
269501
+ if (!$util.isString(message.note))
269502
+ return "note: string expected";
269503
+ if (message.ds4pCodes != null && message.hasOwnProperty("ds4pCodes")) {
269504
+ if (!Array.isArray(message.ds4pCodes))
269505
+ return "ds4pCodes: array expected";
269506
+ for (var i = 0; i < message.ds4pCodes.length; ++i)
269507
+ if (!$util.isString(message.ds4pCodes[i]))
269508
+ return "ds4pCodes: string[] expected";
269509
+ }
269510
+ return null;
269511
+ };
269512
+
269513
+ /**
269514
+ * Creates a ClinicalNoteFamilyHistory message from a plain object. Also converts values to their respective internal types.
269515
+ * @function fromObject
269516
+ * @memberof ClinicalNoteFamilyHistory
269517
+ * @static
269518
+ * @param {Object.<string,*>} object Plain object
269519
+ * @returns {ClinicalNoteFamilyHistory} ClinicalNoteFamilyHistory
269520
+ */
269521
+ ClinicalNoteFamilyHistory.fromObject = function fromObject(object, _depth) {
269522
+ if (object instanceof $root.ClinicalNoteFamilyHistory)
269523
+ return object;
269524
+ if (_depth === undefined)
269525
+ _depth = 0;
269526
+ if (_depth > $util.recursionLimit)
269527
+ throw Error("max depth exceeded");
269528
+ var message = new $root.ClinicalNoteFamilyHistory();
269529
+ if (object.key != null)
269530
+ if (typeof object.key !== "string" || object.key.length)
269531
+ message.key = String(object.key);
269532
+ if (object.relationship != null) {
269533
+ if (typeof object.relationship !== "object")
269534
+ throw TypeError(".ClinicalNoteFamilyHistory.relationship: object expected");
269535
+ message.relationship = $root.ClinicalNoteCodeableConcept.fromObject(object.relationship, _depth + 1);
269536
+ }
269537
+ if (object.note != null)
269538
+ if (typeof object.note !== "string" || object.note.length)
269539
+ message.note = String(object.note);
269540
+ if (object.ds4pCodes) {
269541
+ if (!Array.isArray(object.ds4pCodes))
269542
+ throw TypeError(".ClinicalNoteFamilyHistory.ds4pCodes: array expected");
269543
+ message.ds4pCodes = Array(object.ds4pCodes.length);
269544
+ for (var i = 0; i < object.ds4pCodes.length; ++i)
269545
+ message.ds4pCodes[i] = String(object.ds4pCodes[i]);
269546
+ }
269547
+ return message;
269548
+ };
269549
+
269550
+ /**
269551
+ * Creates a plain object from a ClinicalNoteFamilyHistory message. Also converts values to other types if specified.
269552
+ * @function toObject
269553
+ * @memberof ClinicalNoteFamilyHistory
269554
+ * @static
269555
+ * @param {ClinicalNoteFamilyHistory} message ClinicalNoteFamilyHistory
269556
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
269557
+ * @returns {Object.<string,*>} Plain object
269558
+ */
269559
+ ClinicalNoteFamilyHistory.toObject = function toObject(message, options) {
269560
+ if (!options)
269561
+ options = {};
269562
+ var object = {};
269563
+ if (options.arrays || options.defaults)
269564
+ object.ds4pCodes = [];
269565
+ if (options.defaults) {
269566
+ object.key = "";
269567
+ object.relationship = null;
269568
+ object.note = "";
269569
+ }
269570
+ if (message.key != null && message.hasOwnProperty("key"))
269571
+ object.key = message.key;
269572
+ if (message.relationship != null && message.hasOwnProperty("relationship"))
269573
+ object.relationship = $root.ClinicalNoteCodeableConcept.toObject(message.relationship, options);
269574
+ if (message.note != null && message.hasOwnProperty("note"))
269575
+ object.note = message.note;
269576
+ if (message.ds4pCodes && message.ds4pCodes.length) {
269577
+ object.ds4pCodes = Array(message.ds4pCodes.length);
269578
+ for (var j = 0; j < message.ds4pCodes.length; ++j)
269579
+ object.ds4pCodes[j] = message.ds4pCodes[j];
269580
+ }
269581
+ return object;
269582
+ };
269583
+
269584
+ /**
269585
+ * Converts this ClinicalNoteFamilyHistory to JSON.
269586
+ * @function toJSON
269587
+ * @memberof ClinicalNoteFamilyHistory
269588
+ * @instance
269589
+ * @returns {Object.<string,*>} JSON object
269590
+ */
269591
+ ClinicalNoteFamilyHistory.prototype.toJSON = function toJSON() {
269592
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
269593
+ };
269594
+
269595
+ /**
269596
+ * Gets the type url for ClinicalNoteFamilyHistory
269597
+ * @function getTypeUrl
269598
+ * @memberof ClinicalNoteFamilyHistory
269599
+ * @static
269600
+ * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"`
269601
+ * @returns {string} The type url
269602
+ */
269603
+ ClinicalNoteFamilyHistory.getTypeUrl = function getTypeUrl(prefix) {
269604
+ if (prefix === undefined)
269605
+ prefix = "type.googleapis.com";
269606
+ return prefix + "/ClinicalNoteFamilyHistory";
269607
+ };
269608
+
269609
+ return ClinicalNoteFamilyHistory;
269610
+ })();
269611
+
268106
269612
  $root.GingerClinicalNotePayload = (function() {
268107
269613
 
268108
269614
  /**
@@ -268120,6 +269626,8 @@ $root.GingerClinicalNotePayload = (function() {
268120
269626
  * @property {Array.<string>|null} [ds4pCodes] GingerClinicalNotePayload ds4pCodes
268121
269627
  * @property {Array.<ClinicalNoteAllergy.$Properties>|null} [allergies] GingerClinicalNotePayload allergies
268122
269628
  * @property {Array.<ClinicalNoteMedication.$Properties>|null} [medications] GingerClinicalNotePayload medications
269629
+ * @property {Array.<ClinicalNoteObservation.$Properties>|null} [observations] GingerClinicalNotePayload observations
269630
+ * @property {Array.<ClinicalNoteFamilyHistory.$Properties>|null} [familyHistories] GingerClinicalNotePayload familyHistories
268123
269631
  * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
268124
269632
  */
268125
269633
 
@@ -268149,6 +269657,8 @@ $root.GingerClinicalNotePayload = (function() {
268149
269657
  this.ds4pCodes = [];
268150
269658
  this.allergies = [];
268151
269659
  this.medications = [];
269660
+ this.observations = [];
269661
+ this.familyHistories = [];
268152
269662
  if (properties)
268153
269663
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
268154
269664
  if (properties[keys[i]] != null && keys[i] !== "__proto__")
@@ -268251,6 +269761,22 @@ $root.GingerClinicalNotePayload = (function() {
268251
269761
  */
268252
269762
  GingerClinicalNotePayload.prototype.medications = $util.emptyArray;
268253
269763
 
269764
+ /**
269765
+ * GingerClinicalNotePayload observations.
269766
+ * @member {Array.<ClinicalNoteObservation.$Properties>} observations
269767
+ * @memberof GingerClinicalNotePayload
269768
+ * @instance
269769
+ */
269770
+ GingerClinicalNotePayload.prototype.observations = $util.emptyArray;
269771
+
269772
+ /**
269773
+ * GingerClinicalNotePayload familyHistories.
269774
+ * @member {Array.<ClinicalNoteFamilyHistory.$Properties>} familyHistories
269775
+ * @memberof GingerClinicalNotePayload
269776
+ * @instance
269777
+ */
269778
+ GingerClinicalNotePayload.prototype.familyHistories = $util.emptyArray;
269779
+
268254
269780
  /**
268255
269781
  * Creates a new GingerClinicalNotePayload instance using the specified properties.
268256
269782
  * @function create
@@ -268307,6 +269833,12 @@ $root.GingerClinicalNotePayload = (function() {
268307
269833
  if (message.medications != null && message.medications.length)
268308
269834
  for (var i = 0; i < message.medications.length; ++i)
268309
269835
  $root.ClinicalNoteMedication.encode(message.medications[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
269836
+ if (message.observations != null && message.observations.length)
269837
+ for (var i = 0; i < message.observations.length; ++i)
269838
+ $root.ClinicalNoteObservation.encode(message.observations[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim();
269839
+ if (message.familyHistories != null && message.familyHistories.length)
269840
+ for (var i = 0; i < message.familyHistories.length; ++i)
269841
+ $root.ClinicalNoteFamilyHistory.encode(message.familyHistories[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim();
268310
269842
  if (message.$unknowns != null && Object.hasOwnProperty.call(message, "$unknowns"))
268311
269843
  for (var i = 0; i < message.$unknowns.length; ++i)
268312
269844
  writer.raw(message.$unknowns[i]);
@@ -268446,6 +269978,22 @@ $root.GingerClinicalNotePayload = (function() {
268446
269978
  message.medications.push($root.ClinicalNoteMedication.decode(reader, reader.uint32(), undefined, _depth + 1));
268447
269979
  continue;
268448
269980
  }
269981
+ case 13: {
269982
+ if (wireType !== 2)
269983
+ break;
269984
+ if (!(message.observations && message.observations.length))
269985
+ message.observations = [];
269986
+ message.observations.push($root.ClinicalNoteObservation.decode(reader, reader.uint32(), undefined, _depth + 1));
269987
+ continue;
269988
+ }
269989
+ case 14: {
269990
+ if (wireType !== 2)
269991
+ break;
269992
+ if (!(message.familyHistories && message.familyHistories.length))
269993
+ message.familyHistories = [];
269994
+ message.familyHistories.push($root.ClinicalNoteFamilyHistory.decode(reader, reader.uint32(), undefined, _depth + 1));
269995
+ continue;
269996
+ }
268449
269997
  }
268450
269998
  reader.skipType(wireType, _depth, tag);
268451
269999
  $util.makeProp(message, "$unknowns", false);
@@ -268559,6 +270107,24 @@ $root.GingerClinicalNotePayload = (function() {
268559
270107
  return "medications." + error;
268560
270108
  }
268561
270109
  }
270110
+ if (message.observations != null && message.hasOwnProperty("observations")) {
270111
+ if (!Array.isArray(message.observations))
270112
+ return "observations: array expected";
270113
+ for (var i = 0; i < message.observations.length; ++i) {
270114
+ var error = $root.ClinicalNoteObservation.verify(message.observations[i], _depth + 1);
270115
+ if (error)
270116
+ return "observations." + error;
270117
+ }
270118
+ }
270119
+ if (message.familyHistories != null && message.hasOwnProperty("familyHistories")) {
270120
+ if (!Array.isArray(message.familyHistories))
270121
+ return "familyHistories: array expected";
270122
+ for (var i = 0; i < message.familyHistories.length; ++i) {
270123
+ var error = $root.ClinicalNoteFamilyHistory.verify(message.familyHistories[i], _depth + 1);
270124
+ if (error)
270125
+ return "familyHistories." + error;
270126
+ }
270127
+ }
268562
270128
  return null;
268563
270129
  };
268564
270130
 
@@ -268670,6 +270236,26 @@ $root.GingerClinicalNotePayload = (function() {
268670
270236
  message.medications[i] = $root.ClinicalNoteMedication.fromObject(object.medications[i], _depth + 1);
268671
270237
  }
268672
270238
  }
270239
+ if (object.observations) {
270240
+ if (!Array.isArray(object.observations))
270241
+ throw TypeError(".GingerClinicalNotePayload.observations: array expected");
270242
+ message.observations = Array(object.observations.length);
270243
+ for (var i = 0; i < object.observations.length; ++i) {
270244
+ if (typeof object.observations[i] !== "object")
270245
+ throw TypeError(".GingerClinicalNotePayload.observations: object expected");
270246
+ message.observations[i] = $root.ClinicalNoteObservation.fromObject(object.observations[i], _depth + 1);
270247
+ }
270248
+ }
270249
+ if (object.familyHistories) {
270250
+ if (!Array.isArray(object.familyHistories))
270251
+ throw TypeError(".GingerClinicalNotePayload.familyHistories: array expected");
270252
+ message.familyHistories = Array(object.familyHistories.length);
270253
+ for (var i = 0; i < object.familyHistories.length; ++i) {
270254
+ if (typeof object.familyHistories[i] !== "object")
270255
+ throw TypeError(".GingerClinicalNotePayload.familyHistories: object expected");
270256
+ message.familyHistories[i] = $root.ClinicalNoteFamilyHistory.fromObject(object.familyHistories[i], _depth + 1);
270257
+ }
270258
+ }
268673
270259
  return message;
268674
270260
  };
268675
270261
 
@@ -268691,6 +270277,8 @@ $root.GingerClinicalNotePayload = (function() {
268691
270277
  object.ds4pCodes = [];
268692
270278
  object.allergies = [];
268693
270279
  object.medications = [];
270280
+ object.observations = [];
270281
+ object.familyHistories = [];
268694
270282
  }
268695
270283
  if (options.defaults) {
268696
270284
  object.noteId = "";
@@ -268738,6 +270326,16 @@ $root.GingerClinicalNotePayload = (function() {
268738
270326
  for (var j = 0; j < message.medications.length; ++j)
268739
270327
  object.medications[j] = $root.ClinicalNoteMedication.toObject(message.medications[j], options);
268740
270328
  }
270329
+ if (message.observations && message.observations.length) {
270330
+ object.observations = Array(message.observations.length);
270331
+ for (var j = 0; j < message.observations.length; ++j)
270332
+ object.observations[j] = $root.ClinicalNoteObservation.toObject(message.observations[j], options);
270333
+ }
270334
+ if (message.familyHistories && message.familyHistories.length) {
270335
+ object.familyHistories = Array(message.familyHistories.length);
270336
+ for (var j = 0; j < message.familyHistories.length; ++j)
270337
+ object.familyHistories[j] = $root.ClinicalNoteFamilyHistory.toObject(message.familyHistories[j], options);
270338
+ }
268741
270339
  return object;
268742
270340
  };
268743
270341