@headspace/protos-events 1.857.0 → 1.859.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
@@ -266577,6 +266577,7 @@ $root.ClinicalNoteEncounter = (function() {
266577
266577
  * @property {number|Long|null} [encounterStart] ClinicalNoteEncounter encounterStart
266578
266578
  * @property {number|Long|null} [encounterEnd] ClinicalNoteEncounter encounterEnd
266579
266579
  * @property {string|null} [appointmentId] ClinicalNoteEncounter appointmentId
266580
+ * @property {Array.<ClinicalNoteCodeableConcept.$Properties>|null} [reasons] ClinicalNoteEncounter reasons
266580
266581
  * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
266581
266582
  */
266582
266583
 
@@ -266603,6 +266604,7 @@ $root.ClinicalNoteEncounter = (function() {
266603
266604
  */
266604
266605
  function ClinicalNoteEncounter(properties) {
266605
266606
  this.cptCodes = [];
266607
+ this.reasons = [];
266606
266608
  if (properties)
266607
266609
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
266608
266610
  if (properties[keys[i]] != null && keys[i] !== "__proto__")
@@ -266649,6 +266651,14 @@ $root.ClinicalNoteEncounter = (function() {
266649
266651
  */
266650
266652
  ClinicalNoteEncounter.prototype.appointmentId = "";
266651
266653
 
266654
+ /**
266655
+ * ClinicalNoteEncounter reasons.
266656
+ * @member {Array.<ClinicalNoteCodeableConcept.$Properties>} reasons
266657
+ * @memberof ClinicalNoteEncounter
266658
+ * @instance
266659
+ */
266660
+ ClinicalNoteEncounter.prototype.reasons = $util.emptyArray;
266661
+
266652
266662
  /**
266653
266663
  * Creates a new ClinicalNoteEncounter instance using the specified properties.
266654
266664
  * @function create
@@ -266688,6 +266698,9 @@ $root.ClinicalNoteEncounter = (function() {
266688
266698
  writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.encounterEnd);
266689
266699
  if (message.appointmentId != null && Object.hasOwnProperty.call(message, "appointmentId"))
266690
266700
  writer.uint32(/* id 5, wireType 2 =*/42).string(message.appointmentId);
266701
+ if (message.reasons != null && message.reasons.length)
266702
+ for (var i = 0; i < message.reasons.length; ++i)
266703
+ $root.ClinicalNoteCodeableConcept.encode(message.reasons[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
266691
266704
  if (message.$unknowns != null && Object.hasOwnProperty.call(message, "$unknowns"))
266692
266705
  for (var i = 0; i < message.$unknowns.length; ++i)
266693
266706
  writer.raw(message.$unknowns[i]);
@@ -266779,6 +266792,14 @@ $root.ClinicalNoteEncounter = (function() {
266779
266792
  delete message.appointmentId;
266780
266793
  continue;
266781
266794
  }
266795
+ case 6: {
266796
+ if (wireType !== 2)
266797
+ break;
266798
+ if (!(message.reasons && message.reasons.length))
266799
+ message.reasons = [];
266800
+ message.reasons.push($root.ClinicalNoteCodeableConcept.decode(reader, reader.uint32(), undefined, _depth + 1));
266801
+ continue;
266802
+ }
266782
266803
  }
266783
266804
  reader.skipType(wireType, _depth, tag);
266784
266805
  $util.makeProp(message, "$unknowns", false);
@@ -266839,6 +266860,15 @@ $root.ClinicalNoteEncounter = (function() {
266839
266860
  if (message.appointmentId != null && message.hasOwnProperty("appointmentId"))
266840
266861
  if (!$util.isString(message.appointmentId))
266841
266862
  return "appointmentId: string expected";
266863
+ if (message.reasons != null && message.hasOwnProperty("reasons")) {
266864
+ if (!Array.isArray(message.reasons))
266865
+ return "reasons: array expected";
266866
+ for (var i = 0; i < message.reasons.length; ++i) {
266867
+ var error = $root.ClinicalNoteCodeableConcept.verify(message.reasons[i], _depth + 1);
266868
+ if (error)
266869
+ return "reasons." + error;
266870
+ }
266871
+ }
266842
266872
  return null;
266843
266873
  };
266844
266874
 
@@ -266891,6 +266921,16 @@ $root.ClinicalNoteEncounter = (function() {
266891
266921
  if (object.appointmentId != null)
266892
266922
  if (typeof object.appointmentId !== "string" || object.appointmentId.length)
266893
266923
  message.appointmentId = String(object.appointmentId);
266924
+ if (object.reasons) {
266925
+ if (!Array.isArray(object.reasons))
266926
+ throw TypeError(".ClinicalNoteEncounter.reasons: array expected");
266927
+ message.reasons = Array(object.reasons.length);
266928
+ for (var i = 0; i < object.reasons.length; ++i) {
266929
+ if (typeof object.reasons[i] !== "object")
266930
+ throw TypeError(".ClinicalNoteEncounter.reasons: object expected");
266931
+ message.reasons[i] = $root.ClinicalNoteCodeableConcept.fromObject(object.reasons[i], _depth + 1);
266932
+ }
266933
+ }
266894
266934
  return message;
266895
266935
  };
266896
266936
 
@@ -266907,8 +266947,10 @@ $root.ClinicalNoteEncounter = (function() {
266907
266947
  if (!options)
266908
266948
  options = {};
266909
266949
  var object = {};
266910
- if (options.arrays || options.defaults)
266950
+ if (options.arrays || options.defaults) {
266911
266951
  object.cptCodes = [];
266952
+ object.reasons = [];
266953
+ }
266912
266954
  if (options.defaults) {
266913
266955
  object.encounterStatus = "";
266914
266956
  if ($util.Long) {
@@ -266946,6 +266988,11 @@ $root.ClinicalNoteEncounter = (function() {
266946
266988
  object.encounterEnd = options.longs === String ? $util.Long.prototype.toString.call(message.encounterEnd) : options.longs === Number ? new $util.LongBits(message.encounterEnd.low >>> 0, message.encounterEnd.high >>> 0).toNumber(true) : message.encounterEnd;
266947
266989
  if (message.appointmentId != null && message.hasOwnProperty("appointmentId"))
266948
266990
  object.appointmentId = message.appointmentId;
266991
+ if (message.reasons && message.reasons.length) {
266992
+ object.reasons = Array(message.reasons.length);
266993
+ for (var j = 0; j < message.reasons.length; ++j)
266994
+ object.reasons[j] = $root.ClinicalNoteCodeableConcept.toObject(message.reasons[j], options);
266995
+ }
266949
266996
  return object;
266950
266997
  };
266951
266998
 
@@ -268103,52 +268150,39 @@ $root.ClinicalNoteMedication = (function() {
268103
268150
  return ClinicalNoteMedication;
268104
268151
  })();
268105
268152
 
268106
- $root.GingerClinicalNotePayload = (function() {
268153
+ $root.ClinicalNoteCoding = (function() {
268107
268154
 
268108
268155
  /**
268109
- * Properties of a GingerClinicalNotePayload.
268110
- * @typedef {Object} GingerClinicalNotePayload.$Properties
268111
- * @property {string|null} [noteId] GingerClinicalNotePayload noteId
268112
- * @property {string|null} [hsUserId] GingerClinicalNotePayload hsUserId
268113
- * @property {GingerClinicalNoteType|null} [noteType] GingerClinicalNotePayload noteType
268114
- * @property {ClinicalNotePatient.$Properties|null} [patient] GingerClinicalNotePayload patient
268115
- * @property {ClinicalNotePractitioner.$Properties|null} [practitioner] GingerClinicalNotePayload practitioner
268116
- * @property {ClinicalNoteOrganization.$Properties|null} [organization] GingerClinicalNotePayload organization
268117
- * @property {ClinicalNoteEncounter.$Properties|null} [encounter] GingerClinicalNotePayload encounter
268118
- * @property {string|null} [content] GingerClinicalNotePayload content
268119
- * @property {Array.<string>|null} [icd10Codes] GingerClinicalNotePayload icd10Codes
268120
- * @property {Array.<string>|null} [ds4pCodes] GingerClinicalNotePayload ds4pCodes
268121
- * @property {Array.<ClinicalNoteAllergy.$Properties>|null} [allergies] GingerClinicalNotePayload allergies
268122
- * @property {Array.<ClinicalNoteMedication.$Properties>|null} [medications] GingerClinicalNotePayload medications
268156
+ * Properties of a ClinicalNoteCoding.
268157
+ * @typedef {Object} ClinicalNoteCoding.$Properties
268158
+ * @property {string|null} [system] ClinicalNoteCoding system
268159
+ * @property {string|null} [code] ClinicalNoteCoding code
268160
+ * @property {string|null} [display] ClinicalNoteCoding display
268123
268161
  * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
268124
268162
  */
268125
268163
 
268126
268164
  /**
268127
- * Properties of a GingerClinicalNotePayload.
268128
- * @name IGingerClinicalNotePayload
268129
- * @interface IGingerClinicalNotePayload
268130
- * @augments GingerClinicalNotePayload.$Properties
268131
- * @deprecated Use GingerClinicalNotePayload.$Properties instead.
268165
+ * Properties of a ClinicalNoteCoding.
268166
+ * @name IClinicalNoteCoding
268167
+ * @interface IClinicalNoteCoding
268168
+ * @augments ClinicalNoteCoding.$Properties
268169
+ * @deprecated Use ClinicalNoteCoding.$Properties instead.
268132
268170
  */
268133
268171
 
268134
268172
  /**
268135
- * Shape of a GingerClinicalNotePayload.
268136
- * @typedef {GingerClinicalNotePayload.$Properties} GingerClinicalNotePayload.$Shape
268173
+ * Shape of a ClinicalNoteCoding.
268174
+ * @typedef {ClinicalNoteCoding.$Properties} ClinicalNoteCoding.$Shape
268137
268175
  */
268138
268176
 
268139
268177
  /**
268140
- * Constructs a new GingerClinicalNotePayload.
268141
- * @name GingerClinicalNotePayload
268142
- * @classdesc Represents a GingerClinicalNotePayload.
268178
+ * Constructs a new ClinicalNoteCoding.
268179
+ * @name ClinicalNoteCoding
268180
+ * @classdesc Represents a ClinicalNoteCoding.
268143
268181
  * @constructor
268144
- * @param {GingerClinicalNotePayload.$Properties=} [properties] Properties to set
268182
+ * @param {ClinicalNoteCoding.$Properties=} [properties] Properties to set
268145
268183
  * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
268146
268184
  */
268147
- function GingerClinicalNotePayload(properties) {
268148
- this.icd10Codes = [];
268149
- this.ds4pCodes = [];
268150
- this.allergies = [];
268151
- this.medications = [];
268185
+ function ClinicalNoteCoding(properties) {
268152
268186
  if (properties)
268153
268187
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
268154
268188
  if (properties[keys[i]] != null && keys[i] !== "__proto__")
@@ -268156,157 +268190,63 @@ $root.GingerClinicalNotePayload = (function() {
268156
268190
  }
268157
268191
 
268158
268192
  /**
268159
- * GingerClinicalNotePayload noteId.
268160
- * @member {string} noteId
268161
- * @memberof GingerClinicalNotePayload
268162
- * @instance
268163
- */
268164
- GingerClinicalNotePayload.prototype.noteId = "";
268165
-
268166
- /**
268167
- * GingerClinicalNotePayload hsUserId.
268168
- * @member {string} hsUserId
268169
- * @memberof GingerClinicalNotePayload
268170
- * @instance
268171
- */
268172
- GingerClinicalNotePayload.prototype.hsUserId = "";
268173
-
268174
- /**
268175
- * GingerClinicalNotePayload noteType.
268176
- * @member {GingerClinicalNoteType} noteType
268177
- * @memberof GingerClinicalNotePayload
268178
- * @instance
268179
- */
268180
- GingerClinicalNotePayload.prototype.noteType = 0;
268181
-
268182
- /**
268183
- * GingerClinicalNotePayload patient.
268184
- * @member {ClinicalNotePatient.$Properties|null|undefined} patient
268185
- * @memberof GingerClinicalNotePayload
268186
- * @instance
268187
- */
268188
- GingerClinicalNotePayload.prototype.patient = null;
268189
-
268190
- /**
268191
- * GingerClinicalNotePayload practitioner.
268192
- * @member {ClinicalNotePractitioner.$Properties|null|undefined} practitioner
268193
- * @memberof GingerClinicalNotePayload
268194
- * @instance
268195
- */
268196
- GingerClinicalNotePayload.prototype.practitioner = null;
268197
-
268198
- /**
268199
- * GingerClinicalNotePayload organization.
268200
- * @member {ClinicalNoteOrganization.$Properties|null|undefined} organization
268201
- * @memberof GingerClinicalNotePayload
268202
- * @instance
268203
- */
268204
- GingerClinicalNotePayload.prototype.organization = null;
268205
-
268206
- /**
268207
- * GingerClinicalNotePayload encounter.
268208
- * @member {ClinicalNoteEncounter.$Properties|null|undefined} encounter
268209
- * @memberof GingerClinicalNotePayload
268210
- * @instance
268211
- */
268212
- GingerClinicalNotePayload.prototype.encounter = null;
268213
-
268214
- /**
268215
- * GingerClinicalNotePayload content.
268216
- * @member {string} content
268217
- * @memberof GingerClinicalNotePayload
268218
- * @instance
268219
- */
268220
- GingerClinicalNotePayload.prototype.content = "";
268221
-
268222
- /**
268223
- * GingerClinicalNotePayload icd10Codes.
268224
- * @member {Array.<string>} icd10Codes
268225
- * @memberof GingerClinicalNotePayload
268226
- * @instance
268227
- */
268228
- GingerClinicalNotePayload.prototype.icd10Codes = $util.emptyArray;
268229
-
268230
- /**
268231
- * GingerClinicalNotePayload ds4pCodes.
268232
- * @member {Array.<string>} ds4pCodes
268233
- * @memberof GingerClinicalNotePayload
268193
+ * ClinicalNoteCoding system.
268194
+ * @member {string} system
268195
+ * @memberof ClinicalNoteCoding
268234
268196
  * @instance
268235
268197
  */
268236
- GingerClinicalNotePayload.prototype.ds4pCodes = $util.emptyArray;
268198
+ ClinicalNoteCoding.prototype.system = "";
268237
268199
 
268238
268200
  /**
268239
- * GingerClinicalNotePayload allergies.
268240
- * @member {Array.<ClinicalNoteAllergy.$Properties>} allergies
268241
- * @memberof GingerClinicalNotePayload
268201
+ * ClinicalNoteCoding code.
268202
+ * @member {string} code
268203
+ * @memberof ClinicalNoteCoding
268242
268204
  * @instance
268243
268205
  */
268244
- GingerClinicalNotePayload.prototype.allergies = $util.emptyArray;
268206
+ ClinicalNoteCoding.prototype.code = "";
268245
268207
 
268246
268208
  /**
268247
- * GingerClinicalNotePayload medications.
268248
- * @member {Array.<ClinicalNoteMedication.$Properties>} medications
268249
- * @memberof GingerClinicalNotePayload
268209
+ * ClinicalNoteCoding display.
268210
+ * @member {string} display
268211
+ * @memberof ClinicalNoteCoding
268250
268212
  * @instance
268251
268213
  */
268252
- GingerClinicalNotePayload.prototype.medications = $util.emptyArray;
268214
+ ClinicalNoteCoding.prototype.display = "";
268253
268215
 
268254
268216
  /**
268255
- * Creates a new GingerClinicalNotePayload instance using the specified properties.
268217
+ * Creates a new ClinicalNoteCoding instance using the specified properties.
268256
268218
  * @function create
268257
- * @memberof GingerClinicalNotePayload
268219
+ * @memberof ClinicalNoteCoding
268258
268220
  * @static
268259
- * @param {GingerClinicalNotePayload.$Properties=} [properties] Properties to set
268260
- * @returns {GingerClinicalNotePayload} GingerClinicalNotePayload instance
268221
+ * @param {ClinicalNoteCoding.$Properties=} [properties] Properties to set
268222
+ * @returns {ClinicalNoteCoding} ClinicalNoteCoding instance
268261
268223
  * @type {{
268262
- * (properties: GingerClinicalNotePayload.$Shape): GingerClinicalNotePayload & GingerClinicalNotePayload.$Shape;
268263
- * (properties?: GingerClinicalNotePayload.$Properties): GingerClinicalNotePayload;
268224
+ * (properties: ClinicalNoteCoding.$Shape): ClinicalNoteCoding & ClinicalNoteCoding.$Shape;
268225
+ * (properties?: ClinicalNoteCoding.$Properties): ClinicalNoteCoding;
268264
268226
  * }}
268265
268227
  */
268266
- GingerClinicalNotePayload.create = function create(properties) {
268267
- return new GingerClinicalNotePayload(properties);
268228
+ ClinicalNoteCoding.create = function create(properties) {
268229
+ return new ClinicalNoteCoding(properties);
268268
268230
  };
268269
268231
 
268270
268232
  /**
268271
- * Encodes the specified GingerClinicalNotePayload message. Does not implicitly {@link GingerClinicalNotePayload.verify|verify} messages.
268233
+ * Encodes the specified ClinicalNoteCoding message. Does not implicitly {@link ClinicalNoteCoding.verify|verify} messages.
268272
268234
  * @function encode
268273
- * @memberof GingerClinicalNotePayload
268235
+ * @memberof ClinicalNoteCoding
268274
268236
  * @static
268275
- * @param {GingerClinicalNotePayload.$Properties} message GingerClinicalNotePayload message or plain object to encode
268237
+ * @param {ClinicalNoteCoding.$Properties} message ClinicalNoteCoding message or plain object to encode
268276
268238
  * @param {$protobuf.Writer} [writer] Writer to encode to
268277
268239
  * @returns {$protobuf.Writer} Writer
268278
268240
  */
268279
- GingerClinicalNotePayload.encode = function encode(message, writer) {
268241
+ ClinicalNoteCoding.encode = function encode(message, writer) {
268280
268242
  if (!writer)
268281
268243
  writer = $Writer.create();
268282
- if (message.noteId != null && Object.hasOwnProperty.call(message, "noteId"))
268283
- writer.uint32(/* id 1, wireType 2 =*/10).string(message.noteId);
268284
- if (message.hsUserId != null && Object.hasOwnProperty.call(message, "hsUserId"))
268285
- writer.uint32(/* id 2, wireType 2 =*/18).string(message.hsUserId);
268286
- if (message.noteType != null && Object.hasOwnProperty.call(message, "noteType"))
268287
- writer.uint32(/* id 3, wireType 0 =*/24).int32(message.noteType);
268288
- if (message.patient != null && Object.hasOwnProperty.call(message, "patient"))
268289
- $root.ClinicalNotePatient.encode(message.patient, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
268290
- if (message.practitioner != null && Object.hasOwnProperty.call(message, "practitioner"))
268291
- $root.ClinicalNotePractitioner.encode(message.practitioner, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
268292
- if (message.organization != null && Object.hasOwnProperty.call(message, "organization"))
268293
- $root.ClinicalNoteOrganization.encode(message.organization, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
268294
- if (message.encounter != null && Object.hasOwnProperty.call(message, "encounter"))
268295
- $root.ClinicalNoteEncounter.encode(message.encounter, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
268296
- if (message.content != null && Object.hasOwnProperty.call(message, "content"))
268297
- writer.uint32(/* id 8, wireType 2 =*/66).string(message.content);
268298
- if (message.icd10Codes != null && message.icd10Codes.length)
268299
- for (var i = 0; i < message.icd10Codes.length; ++i)
268300
- writer.uint32(/* id 9, wireType 2 =*/74).string(message.icd10Codes[i]);
268301
- if (message.ds4pCodes != null && message.ds4pCodes.length)
268302
- for (var i = 0; i < message.ds4pCodes.length; ++i)
268303
- writer.uint32(/* id 10, wireType 2 =*/82).string(message.ds4pCodes[i]);
268304
- if (message.allergies != null && message.allergies.length)
268305
- for (var i = 0; i < message.allergies.length; ++i)
268306
- $root.ClinicalNoteAllergy.encode(message.allergies[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
268307
- if (message.medications != null && message.medications.length)
268308
- for (var i = 0; i < message.medications.length; ++i)
268309
- $root.ClinicalNoteMedication.encode(message.medications[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
268244
+ if (message.system != null && Object.hasOwnProperty.call(message, "system"))
268245
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.system);
268246
+ if (message.code != null && Object.hasOwnProperty.call(message, "code"))
268247
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.code);
268248
+ if (message.display != null && Object.hasOwnProperty.call(message, "display"))
268249
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.display);
268310
268250
  if (message.$unknowns != null && Object.hasOwnProperty.call(message, "$unknowns"))
268311
268251
  for (var i = 0; i < message.$unknowns.length; ++i)
268312
268252
  writer.raw(message.$unknowns[i]);
@@ -268314,37 +268254,37 @@ $root.GingerClinicalNotePayload = (function() {
268314
268254
  };
268315
268255
 
268316
268256
  /**
268317
- * Encodes the specified GingerClinicalNotePayload message, length delimited. Does not implicitly {@link GingerClinicalNotePayload.verify|verify} messages.
268257
+ * Encodes the specified ClinicalNoteCoding message, length delimited. Does not implicitly {@link ClinicalNoteCoding.verify|verify} messages.
268318
268258
  * @function encodeDelimited
268319
- * @memberof GingerClinicalNotePayload
268259
+ * @memberof ClinicalNoteCoding
268320
268260
  * @static
268321
- * @param {GingerClinicalNotePayload.$Properties} message GingerClinicalNotePayload message or plain object to encode
268261
+ * @param {ClinicalNoteCoding.$Properties} message ClinicalNoteCoding message or plain object to encode
268322
268262
  * @param {$protobuf.Writer} [writer] Writer to encode to
268323
268263
  * @returns {$protobuf.Writer} Writer
268324
268264
  */
268325
- GingerClinicalNotePayload.encodeDelimited = function encodeDelimited(message, writer) {
268265
+ ClinicalNoteCoding.encodeDelimited = function encodeDelimited(message, writer) {
268326
268266
  return this.encode(message, writer).ldelim();
268327
268267
  };
268328
268268
 
268329
268269
  /**
268330
- * Decodes a GingerClinicalNotePayload message from the specified reader or buffer.
268270
+ * Decodes a ClinicalNoteCoding message from the specified reader or buffer.
268331
268271
  * @function decode
268332
- * @memberof GingerClinicalNotePayload
268272
+ * @memberof ClinicalNoteCoding
268333
268273
  * @static
268334
268274
  * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
268335
268275
  * @param {number} [length] Message length if known beforehand
268336
- * @returns {GingerClinicalNotePayload & GingerClinicalNotePayload.$Shape} GingerClinicalNotePayload
268276
+ * @returns {ClinicalNoteCoding & ClinicalNoteCoding.$Shape} ClinicalNoteCoding
268337
268277
  * @throws {Error} If the payload is not a reader or valid buffer
268338
268278
  * @throws {$protobuf.util.ProtocolError} If required fields are missing
268339
268279
  */
268340
- GingerClinicalNotePayload.decode = function decode(reader, length, _end, _depth, _target) {
268280
+ ClinicalNoteCoding.decode = function decode(reader, length, _end, _depth, _target) {
268341
268281
  if (!(reader instanceof $Reader))
268342
268282
  reader = $Reader.create(reader);
268343
268283
  if (_depth === undefined)
268344
268284
  _depth = 0;
268345
268285
  if (_depth > $Reader.recursionLimit)
268346
268286
  throw Error("max depth exceeded");
268347
- var end = length === undefined ? reader.len : reader.pos + length, message = _target || new $root.GingerClinicalNotePayload(), value;
268287
+ var end = length === undefined ? reader.len : reader.pos + length, message = _target || new $root.ClinicalNoteCoding(), value;
268348
268288
  while (reader.pos < end) {
268349
268289
  var start = reader.pos;
268350
268290
  var tag = reader.tag();
@@ -268358,94 +268298,1749 @@ $root.GingerClinicalNotePayload = (function() {
268358
268298
  if (wireType !== 2)
268359
268299
  break;
268360
268300
  if ((value = reader.string()).length)
268361
- message.noteId = value;
268301
+ message.system = value;
268362
268302
  else
268363
- delete message.noteId;
268303
+ delete message.system;
268364
268304
  continue;
268365
268305
  }
268366
268306
  case 2: {
268367
268307
  if (wireType !== 2)
268368
268308
  break;
268369
268309
  if ((value = reader.string()).length)
268370
- message.hsUserId = value;
268310
+ message.code = value;
268371
268311
  else
268372
- delete message.hsUserId;
268312
+ delete message.code;
268373
268313
  continue;
268374
268314
  }
268375
268315
  case 3: {
268376
- if (wireType !== 0)
268377
- break;
268378
- if (value = reader.int32())
268379
- message.noteType = value;
268380
- else
268381
- delete message.noteType;
268382
- continue;
268383
- }
268384
- case 4: {
268385
- if (wireType !== 2)
268386
- break;
268387
- message.patient = $root.ClinicalNotePatient.decode(reader, reader.uint32(), undefined, _depth + 1, message.patient);
268388
- continue;
268389
- }
268390
- case 5: {
268391
- if (wireType !== 2)
268392
- break;
268393
- message.practitioner = $root.ClinicalNotePractitioner.decode(reader, reader.uint32(), undefined, _depth + 1, message.practitioner);
268394
- continue;
268395
- }
268396
- case 6: {
268397
- if (wireType !== 2)
268398
- break;
268399
- message.organization = $root.ClinicalNoteOrganization.decode(reader, reader.uint32(), undefined, _depth + 1, message.organization);
268400
- continue;
268401
- }
268402
- case 7: {
268403
- if (wireType !== 2)
268404
- break;
268405
- message.encounter = $root.ClinicalNoteEncounter.decode(reader, reader.uint32(), undefined, _depth + 1, message.encounter);
268406
- continue;
268407
- }
268408
- case 8: {
268409
268316
  if (wireType !== 2)
268410
268317
  break;
268411
268318
  if ((value = reader.string()).length)
268412
- message.content = value;
268319
+ message.display = value;
268413
268320
  else
268414
- delete message.content;
268415
- continue;
268416
- }
268417
- case 9: {
268418
- if (wireType !== 2)
268419
- break;
268420
- if (!(message.icd10Codes && message.icd10Codes.length))
268421
- message.icd10Codes = [];
268422
- message.icd10Codes.push(reader.string());
268423
- continue;
268424
- }
268425
- case 10: {
268426
- if (wireType !== 2)
268427
- break;
268428
- if (!(message.ds4pCodes && message.ds4pCodes.length))
268429
- message.ds4pCodes = [];
268430
- message.ds4pCodes.push(reader.string());
268431
- continue;
268432
- }
268433
- case 11: {
268434
- if (wireType !== 2)
268435
- break;
268436
- if (!(message.allergies && message.allergies.length))
268437
- message.allergies = [];
268438
- message.allergies.push($root.ClinicalNoteAllergy.decode(reader, reader.uint32(), undefined, _depth + 1));
268321
+ delete message.display;
268439
268322
  continue;
268440
268323
  }
268441
- case 12: {
268442
- if (wireType !== 2)
268443
- break;
268444
- if (!(message.medications && message.medications.length))
268445
- message.medications = [];
268324
+ }
268325
+ reader.skipType(wireType, _depth, tag);
268326
+ $util.makeProp(message, "$unknowns", false);
268327
+ (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos));
268328
+ }
268329
+ if (_end !== undefined)
268330
+ throw Error("missing end group");
268331
+ return message;
268332
+ };
268333
+
268334
+ /**
268335
+ * Decodes a ClinicalNoteCoding message from the specified reader or buffer, length delimited.
268336
+ * @function decodeDelimited
268337
+ * @memberof ClinicalNoteCoding
268338
+ * @static
268339
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
268340
+ * @returns {ClinicalNoteCoding & ClinicalNoteCoding.$Shape} ClinicalNoteCoding
268341
+ * @throws {Error} If the payload is not a reader or valid buffer
268342
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
268343
+ */
268344
+ ClinicalNoteCoding.decodeDelimited = function decodeDelimited(reader) {
268345
+ if (!(reader instanceof $Reader))
268346
+ reader = new $Reader(reader);
268347
+ return this.decode(reader, reader.uint32());
268348
+ };
268349
+
268350
+ /**
268351
+ * Verifies a ClinicalNoteCoding message.
268352
+ * @function verify
268353
+ * @memberof ClinicalNoteCoding
268354
+ * @static
268355
+ * @param {Object.<string,*>} message Plain object to verify
268356
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
268357
+ */
268358
+ ClinicalNoteCoding.verify = function verify(message, _depth) {
268359
+ if (typeof message !== "object" || message === null)
268360
+ return "object expected";
268361
+ if (_depth === undefined)
268362
+ _depth = 0;
268363
+ if (_depth > $util.recursionLimit)
268364
+ return "max depth exceeded";
268365
+ if (message.system != null && message.hasOwnProperty("system"))
268366
+ if (!$util.isString(message.system))
268367
+ return "system: string expected";
268368
+ if (message.code != null && message.hasOwnProperty("code"))
268369
+ if (!$util.isString(message.code))
268370
+ return "code: string expected";
268371
+ if (message.display != null && message.hasOwnProperty("display"))
268372
+ if (!$util.isString(message.display))
268373
+ return "display: string expected";
268374
+ return null;
268375
+ };
268376
+
268377
+ /**
268378
+ * Creates a ClinicalNoteCoding message from a plain object. Also converts values to their respective internal types.
268379
+ * @function fromObject
268380
+ * @memberof ClinicalNoteCoding
268381
+ * @static
268382
+ * @param {Object.<string,*>} object Plain object
268383
+ * @returns {ClinicalNoteCoding} ClinicalNoteCoding
268384
+ */
268385
+ ClinicalNoteCoding.fromObject = function fromObject(object, _depth) {
268386
+ if (object instanceof $root.ClinicalNoteCoding)
268387
+ return object;
268388
+ if (_depth === undefined)
268389
+ _depth = 0;
268390
+ if (_depth > $util.recursionLimit)
268391
+ throw Error("max depth exceeded");
268392
+ var message = new $root.ClinicalNoteCoding();
268393
+ if (object.system != null)
268394
+ if (typeof object.system !== "string" || object.system.length)
268395
+ message.system = String(object.system);
268396
+ if (object.code != null)
268397
+ if (typeof object.code !== "string" || object.code.length)
268398
+ message.code = String(object.code);
268399
+ if (object.display != null)
268400
+ if (typeof object.display !== "string" || object.display.length)
268401
+ message.display = String(object.display);
268402
+ return message;
268403
+ };
268404
+
268405
+ /**
268406
+ * Creates a plain object from a ClinicalNoteCoding message. Also converts values to other types if specified.
268407
+ * @function toObject
268408
+ * @memberof ClinicalNoteCoding
268409
+ * @static
268410
+ * @param {ClinicalNoteCoding} message ClinicalNoteCoding
268411
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
268412
+ * @returns {Object.<string,*>} Plain object
268413
+ */
268414
+ ClinicalNoteCoding.toObject = function toObject(message, options) {
268415
+ if (!options)
268416
+ options = {};
268417
+ var object = {};
268418
+ if (options.defaults) {
268419
+ object.system = "";
268420
+ object.code = "";
268421
+ object.display = "";
268422
+ }
268423
+ if (message.system != null && message.hasOwnProperty("system"))
268424
+ object.system = message.system;
268425
+ if (message.code != null && message.hasOwnProperty("code"))
268426
+ object.code = message.code;
268427
+ if (message.display != null && message.hasOwnProperty("display"))
268428
+ object.display = message.display;
268429
+ return object;
268430
+ };
268431
+
268432
+ /**
268433
+ * Converts this ClinicalNoteCoding to JSON.
268434
+ * @function toJSON
268435
+ * @memberof ClinicalNoteCoding
268436
+ * @instance
268437
+ * @returns {Object.<string,*>} JSON object
268438
+ */
268439
+ ClinicalNoteCoding.prototype.toJSON = function toJSON() {
268440
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
268441
+ };
268442
+
268443
+ /**
268444
+ * Gets the type url for ClinicalNoteCoding
268445
+ * @function getTypeUrl
268446
+ * @memberof ClinicalNoteCoding
268447
+ * @static
268448
+ * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"`
268449
+ * @returns {string} The type url
268450
+ */
268451
+ ClinicalNoteCoding.getTypeUrl = function getTypeUrl(prefix) {
268452
+ if (prefix === undefined)
268453
+ prefix = "type.googleapis.com";
268454
+ return prefix + "/ClinicalNoteCoding";
268455
+ };
268456
+
268457
+ return ClinicalNoteCoding;
268458
+ })();
268459
+
268460
+ $root.ClinicalNoteCodeableConcept = (function() {
268461
+
268462
+ /**
268463
+ * Properties of a ClinicalNoteCodeableConcept.
268464
+ * @typedef {Object} ClinicalNoteCodeableConcept.$Properties
268465
+ * @property {Array.<ClinicalNoteCoding.$Properties>|null} [codings] ClinicalNoteCodeableConcept codings
268466
+ * @property {string|null} [text] ClinicalNoteCodeableConcept text
268467
+ * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
268468
+ */
268469
+
268470
+ /**
268471
+ * Properties of a ClinicalNoteCodeableConcept.
268472
+ * @name IClinicalNoteCodeableConcept
268473
+ * @interface IClinicalNoteCodeableConcept
268474
+ * @augments ClinicalNoteCodeableConcept.$Properties
268475
+ * @deprecated Use ClinicalNoteCodeableConcept.$Properties instead.
268476
+ */
268477
+
268478
+ /**
268479
+ * Shape of a ClinicalNoteCodeableConcept.
268480
+ * @typedef {ClinicalNoteCodeableConcept.$Properties} ClinicalNoteCodeableConcept.$Shape
268481
+ */
268482
+
268483
+ /**
268484
+ * Constructs a new ClinicalNoteCodeableConcept.
268485
+ * @name ClinicalNoteCodeableConcept
268486
+ * @classdesc Represents a ClinicalNoteCodeableConcept.
268487
+ * @constructor
268488
+ * @param {ClinicalNoteCodeableConcept.$Properties=} [properties] Properties to set
268489
+ * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
268490
+ */
268491
+ function ClinicalNoteCodeableConcept(properties) {
268492
+ this.codings = [];
268493
+ if (properties)
268494
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
268495
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
268496
+ this[keys[i]] = properties[keys[i]];
268497
+ }
268498
+
268499
+ /**
268500
+ * ClinicalNoteCodeableConcept codings.
268501
+ * @member {Array.<ClinicalNoteCoding.$Properties>} codings
268502
+ * @memberof ClinicalNoteCodeableConcept
268503
+ * @instance
268504
+ */
268505
+ ClinicalNoteCodeableConcept.prototype.codings = $util.emptyArray;
268506
+
268507
+ /**
268508
+ * ClinicalNoteCodeableConcept text.
268509
+ * @member {string} text
268510
+ * @memberof ClinicalNoteCodeableConcept
268511
+ * @instance
268512
+ */
268513
+ ClinicalNoteCodeableConcept.prototype.text = "";
268514
+
268515
+ /**
268516
+ * Creates a new ClinicalNoteCodeableConcept instance using the specified properties.
268517
+ * @function create
268518
+ * @memberof ClinicalNoteCodeableConcept
268519
+ * @static
268520
+ * @param {ClinicalNoteCodeableConcept.$Properties=} [properties] Properties to set
268521
+ * @returns {ClinicalNoteCodeableConcept} ClinicalNoteCodeableConcept instance
268522
+ * @type {{
268523
+ * (properties: ClinicalNoteCodeableConcept.$Shape): ClinicalNoteCodeableConcept & ClinicalNoteCodeableConcept.$Shape;
268524
+ * (properties?: ClinicalNoteCodeableConcept.$Properties): ClinicalNoteCodeableConcept;
268525
+ * }}
268526
+ */
268527
+ ClinicalNoteCodeableConcept.create = function create(properties) {
268528
+ return new ClinicalNoteCodeableConcept(properties);
268529
+ };
268530
+
268531
+ /**
268532
+ * Encodes the specified ClinicalNoteCodeableConcept message. Does not implicitly {@link ClinicalNoteCodeableConcept.verify|verify} messages.
268533
+ * @function encode
268534
+ * @memberof ClinicalNoteCodeableConcept
268535
+ * @static
268536
+ * @param {ClinicalNoteCodeableConcept.$Properties} message ClinicalNoteCodeableConcept message or plain object to encode
268537
+ * @param {$protobuf.Writer} [writer] Writer to encode to
268538
+ * @returns {$protobuf.Writer} Writer
268539
+ */
268540
+ ClinicalNoteCodeableConcept.encode = function encode(message, writer) {
268541
+ if (!writer)
268542
+ writer = $Writer.create();
268543
+ if (message.codings != null && message.codings.length)
268544
+ for (var i = 0; i < message.codings.length; ++i)
268545
+ $root.ClinicalNoteCoding.encode(message.codings[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
268546
+ if (message.text != null && Object.hasOwnProperty.call(message, "text"))
268547
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.text);
268548
+ if (message.$unknowns != null && Object.hasOwnProperty.call(message, "$unknowns"))
268549
+ for (var i = 0; i < message.$unknowns.length; ++i)
268550
+ writer.raw(message.$unknowns[i]);
268551
+ return writer;
268552
+ };
268553
+
268554
+ /**
268555
+ * Encodes the specified ClinicalNoteCodeableConcept message, length delimited. Does not implicitly {@link ClinicalNoteCodeableConcept.verify|verify} messages.
268556
+ * @function encodeDelimited
268557
+ * @memberof ClinicalNoteCodeableConcept
268558
+ * @static
268559
+ * @param {ClinicalNoteCodeableConcept.$Properties} message ClinicalNoteCodeableConcept message or plain object to encode
268560
+ * @param {$protobuf.Writer} [writer] Writer to encode to
268561
+ * @returns {$protobuf.Writer} Writer
268562
+ */
268563
+ ClinicalNoteCodeableConcept.encodeDelimited = function encodeDelimited(message, writer) {
268564
+ return this.encode(message, writer).ldelim();
268565
+ };
268566
+
268567
+ /**
268568
+ * Decodes a ClinicalNoteCodeableConcept message from the specified reader or buffer.
268569
+ * @function decode
268570
+ * @memberof ClinicalNoteCodeableConcept
268571
+ * @static
268572
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
268573
+ * @param {number} [length] Message length if known beforehand
268574
+ * @returns {ClinicalNoteCodeableConcept & ClinicalNoteCodeableConcept.$Shape} ClinicalNoteCodeableConcept
268575
+ * @throws {Error} If the payload is not a reader or valid buffer
268576
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
268577
+ */
268578
+ ClinicalNoteCodeableConcept.decode = function decode(reader, length, _end, _depth, _target) {
268579
+ if (!(reader instanceof $Reader))
268580
+ reader = $Reader.create(reader);
268581
+ if (_depth === undefined)
268582
+ _depth = 0;
268583
+ if (_depth > $Reader.recursionLimit)
268584
+ throw Error("max depth exceeded");
268585
+ var end = length === undefined ? reader.len : reader.pos + length, message = _target || new $root.ClinicalNoteCodeableConcept(), value;
268586
+ while (reader.pos < end) {
268587
+ var start = reader.pos;
268588
+ var tag = reader.tag();
268589
+ if (tag === _end) {
268590
+ _end = undefined;
268591
+ break;
268592
+ }
268593
+ var wireType = tag & 7;
268594
+ switch (tag >>>= 3) {
268595
+ case 1: {
268596
+ if (wireType !== 2)
268597
+ break;
268598
+ if (!(message.codings && message.codings.length))
268599
+ message.codings = [];
268600
+ message.codings.push($root.ClinicalNoteCoding.decode(reader, reader.uint32(), undefined, _depth + 1));
268601
+ continue;
268602
+ }
268603
+ case 2: {
268604
+ if (wireType !== 2)
268605
+ break;
268606
+ if ((value = reader.string()).length)
268607
+ message.text = value;
268608
+ else
268609
+ delete message.text;
268610
+ continue;
268611
+ }
268612
+ }
268613
+ reader.skipType(wireType, _depth, tag);
268614
+ $util.makeProp(message, "$unknowns", false);
268615
+ (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos));
268616
+ }
268617
+ if (_end !== undefined)
268618
+ throw Error("missing end group");
268619
+ return message;
268620
+ };
268621
+
268622
+ /**
268623
+ * Decodes a ClinicalNoteCodeableConcept message from the specified reader or buffer, length delimited.
268624
+ * @function decodeDelimited
268625
+ * @memberof ClinicalNoteCodeableConcept
268626
+ * @static
268627
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
268628
+ * @returns {ClinicalNoteCodeableConcept & ClinicalNoteCodeableConcept.$Shape} ClinicalNoteCodeableConcept
268629
+ * @throws {Error} If the payload is not a reader or valid buffer
268630
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
268631
+ */
268632
+ ClinicalNoteCodeableConcept.decodeDelimited = function decodeDelimited(reader) {
268633
+ if (!(reader instanceof $Reader))
268634
+ reader = new $Reader(reader);
268635
+ return this.decode(reader, reader.uint32());
268636
+ };
268637
+
268638
+ /**
268639
+ * Verifies a ClinicalNoteCodeableConcept message.
268640
+ * @function verify
268641
+ * @memberof ClinicalNoteCodeableConcept
268642
+ * @static
268643
+ * @param {Object.<string,*>} message Plain object to verify
268644
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
268645
+ */
268646
+ ClinicalNoteCodeableConcept.verify = function verify(message, _depth) {
268647
+ if (typeof message !== "object" || message === null)
268648
+ return "object expected";
268649
+ if (_depth === undefined)
268650
+ _depth = 0;
268651
+ if (_depth > $util.recursionLimit)
268652
+ return "max depth exceeded";
268653
+ if (message.codings != null && message.hasOwnProperty("codings")) {
268654
+ if (!Array.isArray(message.codings))
268655
+ return "codings: array expected";
268656
+ for (var i = 0; i < message.codings.length; ++i) {
268657
+ var error = $root.ClinicalNoteCoding.verify(message.codings[i], _depth + 1);
268658
+ if (error)
268659
+ return "codings." + error;
268660
+ }
268661
+ }
268662
+ if (message.text != null && message.hasOwnProperty("text"))
268663
+ if (!$util.isString(message.text))
268664
+ return "text: string expected";
268665
+ return null;
268666
+ };
268667
+
268668
+ /**
268669
+ * Creates a ClinicalNoteCodeableConcept message from a plain object. Also converts values to their respective internal types.
268670
+ * @function fromObject
268671
+ * @memberof ClinicalNoteCodeableConcept
268672
+ * @static
268673
+ * @param {Object.<string,*>} object Plain object
268674
+ * @returns {ClinicalNoteCodeableConcept} ClinicalNoteCodeableConcept
268675
+ */
268676
+ ClinicalNoteCodeableConcept.fromObject = function fromObject(object, _depth) {
268677
+ if (object instanceof $root.ClinicalNoteCodeableConcept)
268678
+ return object;
268679
+ if (_depth === undefined)
268680
+ _depth = 0;
268681
+ if (_depth > $util.recursionLimit)
268682
+ throw Error("max depth exceeded");
268683
+ var message = new $root.ClinicalNoteCodeableConcept();
268684
+ if (object.codings) {
268685
+ if (!Array.isArray(object.codings))
268686
+ throw TypeError(".ClinicalNoteCodeableConcept.codings: array expected");
268687
+ message.codings = Array(object.codings.length);
268688
+ for (var i = 0; i < object.codings.length; ++i) {
268689
+ if (typeof object.codings[i] !== "object")
268690
+ throw TypeError(".ClinicalNoteCodeableConcept.codings: object expected");
268691
+ message.codings[i] = $root.ClinicalNoteCoding.fromObject(object.codings[i], _depth + 1);
268692
+ }
268693
+ }
268694
+ if (object.text != null)
268695
+ if (typeof object.text !== "string" || object.text.length)
268696
+ message.text = String(object.text);
268697
+ return message;
268698
+ };
268699
+
268700
+ /**
268701
+ * Creates a plain object from a ClinicalNoteCodeableConcept message. Also converts values to other types if specified.
268702
+ * @function toObject
268703
+ * @memberof ClinicalNoteCodeableConcept
268704
+ * @static
268705
+ * @param {ClinicalNoteCodeableConcept} message ClinicalNoteCodeableConcept
268706
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
268707
+ * @returns {Object.<string,*>} Plain object
268708
+ */
268709
+ ClinicalNoteCodeableConcept.toObject = function toObject(message, options) {
268710
+ if (!options)
268711
+ options = {};
268712
+ var object = {};
268713
+ if (options.arrays || options.defaults)
268714
+ object.codings = [];
268715
+ if (options.defaults)
268716
+ object.text = "";
268717
+ if (message.codings && message.codings.length) {
268718
+ object.codings = Array(message.codings.length);
268719
+ for (var j = 0; j < message.codings.length; ++j)
268720
+ object.codings[j] = $root.ClinicalNoteCoding.toObject(message.codings[j], options);
268721
+ }
268722
+ if (message.text != null && message.hasOwnProperty("text"))
268723
+ object.text = message.text;
268724
+ return object;
268725
+ };
268726
+
268727
+ /**
268728
+ * Converts this ClinicalNoteCodeableConcept to JSON.
268729
+ * @function toJSON
268730
+ * @memberof ClinicalNoteCodeableConcept
268731
+ * @instance
268732
+ * @returns {Object.<string,*>} JSON object
268733
+ */
268734
+ ClinicalNoteCodeableConcept.prototype.toJSON = function toJSON() {
268735
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
268736
+ };
268737
+
268738
+ /**
268739
+ * Gets the type url for ClinicalNoteCodeableConcept
268740
+ * @function getTypeUrl
268741
+ * @memberof ClinicalNoteCodeableConcept
268742
+ * @static
268743
+ * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"`
268744
+ * @returns {string} The type url
268745
+ */
268746
+ ClinicalNoteCodeableConcept.getTypeUrl = function getTypeUrl(prefix) {
268747
+ if (prefix === undefined)
268748
+ prefix = "type.googleapis.com";
268749
+ return prefix + "/ClinicalNoteCodeableConcept";
268750
+ };
268751
+
268752
+ return ClinicalNoteCodeableConcept;
268753
+ })();
268754
+
268755
+ /**
268756
+ * ClinicalNoteObservationCategory enum.
268757
+ * @name ClinicalNoteObservationCategory
268758
+ * @enum {number}
268759
+ * @property {number} CLINICAL_NOTE_OBSERVATION_CATEGORY_UNKNOWN=0 CLINICAL_NOTE_OBSERVATION_CATEGORY_UNKNOWN value
268760
+ * @property {number} CLINICAL_NOTE_OBSERVATION_CATEGORY_EXAM=1 CLINICAL_NOTE_OBSERVATION_CATEGORY_EXAM value
268761
+ * @property {number} CLINICAL_NOTE_OBSERVATION_CATEGORY_SOCIAL_HISTORY=2 CLINICAL_NOTE_OBSERVATION_CATEGORY_SOCIAL_HISTORY value
268762
+ * @property {number} CLINICAL_NOTE_OBSERVATION_CATEGORY_THERAPY=3 CLINICAL_NOTE_OBSERVATION_CATEGORY_THERAPY value
268763
+ */
268764
+ $root.ClinicalNoteObservationCategory = (function() {
268765
+ var valuesById = {}, values = Object.create(valuesById);
268766
+ values[valuesById[0] = "CLINICAL_NOTE_OBSERVATION_CATEGORY_UNKNOWN"] = 0;
268767
+ values[valuesById[1] = "CLINICAL_NOTE_OBSERVATION_CATEGORY_EXAM"] = 1;
268768
+ values[valuesById[2] = "CLINICAL_NOTE_OBSERVATION_CATEGORY_SOCIAL_HISTORY"] = 2;
268769
+ values[valuesById[3] = "CLINICAL_NOTE_OBSERVATION_CATEGORY_THERAPY"] = 3;
268770
+ return values;
268771
+ })();
268772
+
268773
+ $root.ClinicalNoteObservation = (function() {
268774
+
268775
+ /**
268776
+ * Properties of a ClinicalNoteObservation.
268777
+ * @typedef {Object} ClinicalNoteObservation.$Properties
268778
+ * @property {string|null} [key] ClinicalNoteObservation key
268779
+ * @property {string|null} [panelKey] ClinicalNoteObservation panelKey
268780
+ * @property {ClinicalNoteObservationCategory|null} [category] ClinicalNoteObservation category
268781
+ * @property {ClinicalNoteCodeableConcept.$Properties|null} [code] ClinicalNoteObservation code
268782
+ * @property {ClinicalNoteCodeableConcept.$Properties|null} [valueConcept] ClinicalNoteObservation valueConcept
268783
+ * @property {string|null} [valueString] ClinicalNoteObservation valueString
268784
+ * @property {boolean|null} [valueBoolean] ClinicalNoteObservation valueBoolean
268785
+ * @property {string|null} [note] ClinicalNoteObservation note
268786
+ * @property {Array.<string>|null} [ds4pCodes] ClinicalNoteObservation ds4pCodes
268787
+ * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
268788
+ */
268789
+
268790
+ /**
268791
+ * Properties of a ClinicalNoteObservation.
268792
+ * @name IClinicalNoteObservation
268793
+ * @interface IClinicalNoteObservation
268794
+ * @augments ClinicalNoteObservation.$Properties
268795
+ * @deprecated Use ClinicalNoteObservation.$Properties instead.
268796
+ */
268797
+
268798
+ /**
268799
+ * Shape of a ClinicalNoteObservation.
268800
+ * @typedef {ClinicalNoteObservation.$Properties} ClinicalNoteObservation.$Shape
268801
+ */
268802
+
268803
+ /**
268804
+ * Constructs a new ClinicalNoteObservation.
268805
+ * @name ClinicalNoteObservation
268806
+ * @classdesc Represents a ClinicalNoteObservation.
268807
+ * @constructor
268808
+ * @param {ClinicalNoteObservation.$Properties=} [properties] Properties to set
268809
+ * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
268810
+ */
268811
+ function ClinicalNoteObservation(properties) {
268812
+ this.ds4pCodes = [];
268813
+ if (properties)
268814
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
268815
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
268816
+ this[keys[i]] = properties[keys[i]];
268817
+ }
268818
+
268819
+ /**
268820
+ * ClinicalNoteObservation key.
268821
+ * @member {string} key
268822
+ * @memberof ClinicalNoteObservation
268823
+ * @instance
268824
+ */
268825
+ ClinicalNoteObservation.prototype.key = "";
268826
+
268827
+ /**
268828
+ * ClinicalNoteObservation panelKey.
268829
+ * @member {string} panelKey
268830
+ * @memberof ClinicalNoteObservation
268831
+ * @instance
268832
+ */
268833
+ ClinicalNoteObservation.prototype.panelKey = "";
268834
+
268835
+ /**
268836
+ * ClinicalNoteObservation category.
268837
+ * @member {ClinicalNoteObservationCategory} category
268838
+ * @memberof ClinicalNoteObservation
268839
+ * @instance
268840
+ */
268841
+ ClinicalNoteObservation.prototype.category = 0;
268842
+
268843
+ /**
268844
+ * ClinicalNoteObservation code.
268845
+ * @member {ClinicalNoteCodeableConcept.$Properties|null|undefined} code
268846
+ * @memberof ClinicalNoteObservation
268847
+ * @instance
268848
+ */
268849
+ ClinicalNoteObservation.prototype.code = null;
268850
+
268851
+ /**
268852
+ * ClinicalNoteObservation valueConcept.
268853
+ * @member {ClinicalNoteCodeableConcept.$Properties|null|undefined} valueConcept
268854
+ * @memberof ClinicalNoteObservation
268855
+ * @instance
268856
+ */
268857
+ ClinicalNoteObservation.prototype.valueConcept = null;
268858
+
268859
+ /**
268860
+ * ClinicalNoteObservation valueString.
268861
+ * @member {string} valueString
268862
+ * @memberof ClinicalNoteObservation
268863
+ * @instance
268864
+ */
268865
+ ClinicalNoteObservation.prototype.valueString = "";
268866
+
268867
+ /**
268868
+ * ClinicalNoteObservation valueBoolean.
268869
+ * @member {boolean|null|undefined} valueBoolean
268870
+ * @memberof ClinicalNoteObservation
268871
+ * @instance
268872
+ */
268873
+ ClinicalNoteObservation.prototype.valueBoolean = null;
268874
+
268875
+ /**
268876
+ * ClinicalNoteObservation note.
268877
+ * @member {string} note
268878
+ * @memberof ClinicalNoteObservation
268879
+ * @instance
268880
+ */
268881
+ ClinicalNoteObservation.prototype.note = "";
268882
+
268883
+ /**
268884
+ * ClinicalNoteObservation ds4pCodes.
268885
+ * @member {Array.<string>} ds4pCodes
268886
+ * @memberof ClinicalNoteObservation
268887
+ * @instance
268888
+ */
268889
+ ClinicalNoteObservation.prototype.ds4pCodes = $util.emptyArray;
268890
+
268891
+ // OneOf field names bound to virtual getters and setters
268892
+ var $oneOfFields;
268893
+
268894
+ // Virtual OneOf for proto3 optional field
268895
+ Object.defineProperty(ClinicalNoteObservation.prototype, "_valueBoolean", {
268896
+ get: $util.oneOfGetter($oneOfFields = ["valueBoolean"]),
268897
+ set: $util.oneOfSetter($oneOfFields)
268898
+ });
268899
+
268900
+ /**
268901
+ * Creates a new ClinicalNoteObservation instance using the specified properties.
268902
+ * @function create
268903
+ * @memberof ClinicalNoteObservation
268904
+ * @static
268905
+ * @param {ClinicalNoteObservation.$Properties=} [properties] Properties to set
268906
+ * @returns {ClinicalNoteObservation} ClinicalNoteObservation instance
268907
+ * @type {{
268908
+ * (properties: ClinicalNoteObservation.$Shape): ClinicalNoteObservation & ClinicalNoteObservation.$Shape;
268909
+ * (properties?: ClinicalNoteObservation.$Properties): ClinicalNoteObservation;
268910
+ * }}
268911
+ */
268912
+ ClinicalNoteObservation.create = function create(properties) {
268913
+ return new ClinicalNoteObservation(properties);
268914
+ };
268915
+
268916
+ /**
268917
+ * Encodes the specified ClinicalNoteObservation message. Does not implicitly {@link ClinicalNoteObservation.verify|verify} messages.
268918
+ * @function encode
268919
+ * @memberof ClinicalNoteObservation
268920
+ * @static
268921
+ * @param {ClinicalNoteObservation.$Properties} message ClinicalNoteObservation message or plain object to encode
268922
+ * @param {$protobuf.Writer} [writer] Writer to encode to
268923
+ * @returns {$protobuf.Writer} Writer
268924
+ */
268925
+ ClinicalNoteObservation.encode = function encode(message, writer) {
268926
+ if (!writer)
268927
+ writer = $Writer.create();
268928
+ if (message.key != null && Object.hasOwnProperty.call(message, "key"))
268929
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.key);
268930
+ if (message.panelKey != null && Object.hasOwnProperty.call(message, "panelKey"))
268931
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.panelKey);
268932
+ if (message.category != null && Object.hasOwnProperty.call(message, "category"))
268933
+ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.category);
268934
+ if (message.code != null && Object.hasOwnProperty.call(message, "code"))
268935
+ $root.ClinicalNoteCodeableConcept.encode(message.code, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
268936
+ if (message.valueConcept != null && Object.hasOwnProperty.call(message, "valueConcept"))
268937
+ $root.ClinicalNoteCodeableConcept.encode(message.valueConcept, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
268938
+ if (message.valueString != null && Object.hasOwnProperty.call(message, "valueString"))
268939
+ writer.uint32(/* id 6, wireType 2 =*/50).string(message.valueString);
268940
+ if (message.valueBoolean != null && Object.hasOwnProperty.call(message, "valueBoolean"))
268941
+ writer.uint32(/* id 7, wireType 0 =*/56).bool(message.valueBoolean);
268942
+ if (message.note != null && Object.hasOwnProperty.call(message, "note"))
268943
+ writer.uint32(/* id 8, wireType 2 =*/66).string(message.note);
268944
+ if (message.ds4pCodes != null && message.ds4pCodes.length)
268945
+ for (var i = 0; i < message.ds4pCodes.length; ++i)
268946
+ writer.uint32(/* id 9, wireType 2 =*/74).string(message.ds4pCodes[i]);
268947
+ if (message.$unknowns != null && Object.hasOwnProperty.call(message, "$unknowns"))
268948
+ for (var i = 0; i < message.$unknowns.length; ++i)
268949
+ writer.raw(message.$unknowns[i]);
268950
+ return writer;
268951
+ };
268952
+
268953
+ /**
268954
+ * Encodes the specified ClinicalNoteObservation message, length delimited. Does not implicitly {@link ClinicalNoteObservation.verify|verify} messages.
268955
+ * @function encodeDelimited
268956
+ * @memberof ClinicalNoteObservation
268957
+ * @static
268958
+ * @param {ClinicalNoteObservation.$Properties} message ClinicalNoteObservation message or plain object to encode
268959
+ * @param {$protobuf.Writer} [writer] Writer to encode to
268960
+ * @returns {$protobuf.Writer} Writer
268961
+ */
268962
+ ClinicalNoteObservation.encodeDelimited = function encodeDelimited(message, writer) {
268963
+ return this.encode(message, writer).ldelim();
268964
+ };
268965
+
268966
+ /**
268967
+ * Decodes a ClinicalNoteObservation message from the specified reader or buffer.
268968
+ * @function decode
268969
+ * @memberof ClinicalNoteObservation
268970
+ * @static
268971
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
268972
+ * @param {number} [length] Message length if known beforehand
268973
+ * @returns {ClinicalNoteObservation & ClinicalNoteObservation.$Shape} ClinicalNoteObservation
268974
+ * @throws {Error} If the payload is not a reader or valid buffer
268975
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
268976
+ */
268977
+ ClinicalNoteObservation.decode = function decode(reader, length, _end, _depth, _target) {
268978
+ if (!(reader instanceof $Reader))
268979
+ reader = $Reader.create(reader);
268980
+ if (_depth === undefined)
268981
+ _depth = 0;
268982
+ if (_depth > $Reader.recursionLimit)
268983
+ throw Error("max depth exceeded");
268984
+ var end = length === undefined ? reader.len : reader.pos + length, message = _target || new $root.ClinicalNoteObservation(), value;
268985
+ while (reader.pos < end) {
268986
+ var start = reader.pos;
268987
+ var tag = reader.tag();
268988
+ if (tag === _end) {
268989
+ _end = undefined;
268990
+ break;
268991
+ }
268992
+ var wireType = tag & 7;
268993
+ switch (tag >>>= 3) {
268994
+ case 1: {
268995
+ if (wireType !== 2)
268996
+ break;
268997
+ if ((value = reader.string()).length)
268998
+ message.key = value;
268999
+ else
269000
+ delete message.key;
269001
+ continue;
269002
+ }
269003
+ case 2: {
269004
+ if (wireType !== 2)
269005
+ break;
269006
+ if ((value = reader.string()).length)
269007
+ message.panelKey = value;
269008
+ else
269009
+ delete message.panelKey;
269010
+ continue;
269011
+ }
269012
+ case 3: {
269013
+ if (wireType !== 0)
269014
+ break;
269015
+ if (value = reader.int32())
269016
+ message.category = value;
269017
+ else
269018
+ delete message.category;
269019
+ continue;
269020
+ }
269021
+ case 4: {
269022
+ if (wireType !== 2)
269023
+ break;
269024
+ message.code = $root.ClinicalNoteCodeableConcept.decode(reader, reader.uint32(), undefined, _depth + 1, message.code);
269025
+ continue;
269026
+ }
269027
+ case 5: {
269028
+ if (wireType !== 2)
269029
+ break;
269030
+ message.valueConcept = $root.ClinicalNoteCodeableConcept.decode(reader, reader.uint32(), undefined, _depth + 1, message.valueConcept);
269031
+ continue;
269032
+ }
269033
+ case 6: {
269034
+ if (wireType !== 2)
269035
+ break;
269036
+ if ((value = reader.string()).length)
269037
+ message.valueString = value;
269038
+ else
269039
+ delete message.valueString;
269040
+ continue;
269041
+ }
269042
+ case 7: {
269043
+ if (wireType !== 0)
269044
+ break;
269045
+ message.valueBoolean = reader.bool();
269046
+ message._valueBoolean = "valueBoolean";
269047
+ continue;
269048
+ }
269049
+ case 8: {
269050
+ if (wireType !== 2)
269051
+ break;
269052
+ if ((value = reader.string()).length)
269053
+ message.note = value;
269054
+ else
269055
+ delete message.note;
269056
+ continue;
269057
+ }
269058
+ case 9: {
269059
+ if (wireType !== 2)
269060
+ break;
269061
+ if (!(message.ds4pCodes && message.ds4pCodes.length))
269062
+ message.ds4pCodes = [];
269063
+ message.ds4pCodes.push(reader.string());
269064
+ continue;
269065
+ }
269066
+ }
269067
+ reader.skipType(wireType, _depth, tag);
269068
+ $util.makeProp(message, "$unknowns", false);
269069
+ (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos));
269070
+ }
269071
+ if (_end !== undefined)
269072
+ throw Error("missing end group");
269073
+ return message;
269074
+ };
269075
+
269076
+ /**
269077
+ * Decodes a ClinicalNoteObservation message from the specified reader or buffer, length delimited.
269078
+ * @function decodeDelimited
269079
+ * @memberof ClinicalNoteObservation
269080
+ * @static
269081
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
269082
+ * @returns {ClinicalNoteObservation & ClinicalNoteObservation.$Shape} ClinicalNoteObservation
269083
+ * @throws {Error} If the payload is not a reader or valid buffer
269084
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
269085
+ */
269086
+ ClinicalNoteObservation.decodeDelimited = function decodeDelimited(reader) {
269087
+ if (!(reader instanceof $Reader))
269088
+ reader = new $Reader(reader);
269089
+ return this.decode(reader, reader.uint32());
269090
+ };
269091
+
269092
+ /**
269093
+ * Verifies a ClinicalNoteObservation message.
269094
+ * @function verify
269095
+ * @memberof ClinicalNoteObservation
269096
+ * @static
269097
+ * @param {Object.<string,*>} message Plain object to verify
269098
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
269099
+ */
269100
+ ClinicalNoteObservation.verify = function verify(message, _depth) {
269101
+ if (typeof message !== "object" || message === null)
269102
+ return "object expected";
269103
+ if (_depth === undefined)
269104
+ _depth = 0;
269105
+ if (_depth > $util.recursionLimit)
269106
+ return "max depth exceeded";
269107
+ var properties = {};
269108
+ if (message.key != null && message.hasOwnProperty("key"))
269109
+ if (!$util.isString(message.key))
269110
+ return "key: string expected";
269111
+ if (message.panelKey != null && message.hasOwnProperty("panelKey"))
269112
+ if (!$util.isString(message.panelKey))
269113
+ return "panelKey: string expected";
269114
+ if (message.category != null && message.hasOwnProperty("category"))
269115
+ switch (message.category) {
269116
+ default:
269117
+ return "category: enum value expected";
269118
+ case 0:
269119
+ case 1:
269120
+ case 2:
269121
+ case 3:
269122
+ break;
269123
+ }
269124
+ if (message.code != null && message.hasOwnProperty("code")) {
269125
+ var error = $root.ClinicalNoteCodeableConcept.verify(message.code, _depth + 1);
269126
+ if (error)
269127
+ return "code." + error;
269128
+ }
269129
+ if (message.valueConcept != null && message.hasOwnProperty("valueConcept")) {
269130
+ var error = $root.ClinicalNoteCodeableConcept.verify(message.valueConcept, _depth + 1);
269131
+ if (error)
269132
+ return "valueConcept." + error;
269133
+ }
269134
+ if (message.valueString != null && message.hasOwnProperty("valueString"))
269135
+ if (!$util.isString(message.valueString))
269136
+ return "valueString: string expected";
269137
+ if (message.valueBoolean != null && message.hasOwnProperty("valueBoolean")) {
269138
+ properties._valueBoolean = 1;
269139
+ if (typeof message.valueBoolean !== "boolean")
269140
+ return "valueBoolean: boolean expected";
269141
+ }
269142
+ if (message.note != null && message.hasOwnProperty("note"))
269143
+ if (!$util.isString(message.note))
269144
+ return "note: string expected";
269145
+ if (message.ds4pCodes != null && message.hasOwnProperty("ds4pCodes")) {
269146
+ if (!Array.isArray(message.ds4pCodes))
269147
+ return "ds4pCodes: array expected";
269148
+ for (var i = 0; i < message.ds4pCodes.length; ++i)
269149
+ if (!$util.isString(message.ds4pCodes[i]))
269150
+ return "ds4pCodes: string[] expected";
269151
+ }
269152
+ return null;
269153
+ };
269154
+
269155
+ /**
269156
+ * Creates a ClinicalNoteObservation message from a plain object. Also converts values to their respective internal types.
269157
+ * @function fromObject
269158
+ * @memberof ClinicalNoteObservation
269159
+ * @static
269160
+ * @param {Object.<string,*>} object Plain object
269161
+ * @returns {ClinicalNoteObservation} ClinicalNoteObservation
269162
+ */
269163
+ ClinicalNoteObservation.fromObject = function fromObject(object, _depth) {
269164
+ if (object instanceof $root.ClinicalNoteObservation)
269165
+ return object;
269166
+ if (_depth === undefined)
269167
+ _depth = 0;
269168
+ if (_depth > $util.recursionLimit)
269169
+ throw Error("max depth exceeded");
269170
+ var message = new $root.ClinicalNoteObservation();
269171
+ if (object.key != null)
269172
+ if (typeof object.key !== "string" || object.key.length)
269173
+ message.key = String(object.key);
269174
+ if (object.panelKey != null)
269175
+ if (typeof object.panelKey !== "string" || object.panelKey.length)
269176
+ message.panelKey = String(object.panelKey);
269177
+ if (object.category !== 0 && (typeof object.category !== "string" || $root.ClinicalNoteObservationCategory[object.category] !== 0))
269178
+ switch (object.category) {
269179
+ default:
269180
+ if (typeof object.category === "number") {
269181
+ message.category = object.category;
269182
+ break;
269183
+ }
269184
+ break;
269185
+ case "CLINICAL_NOTE_OBSERVATION_CATEGORY_UNKNOWN":
269186
+ case 0:
269187
+ message.category = 0;
269188
+ break;
269189
+ case "CLINICAL_NOTE_OBSERVATION_CATEGORY_EXAM":
269190
+ case 1:
269191
+ message.category = 1;
269192
+ break;
269193
+ case "CLINICAL_NOTE_OBSERVATION_CATEGORY_SOCIAL_HISTORY":
269194
+ case 2:
269195
+ message.category = 2;
269196
+ break;
269197
+ case "CLINICAL_NOTE_OBSERVATION_CATEGORY_THERAPY":
269198
+ case 3:
269199
+ message.category = 3;
269200
+ break;
269201
+ }
269202
+ if (object.code != null) {
269203
+ if (typeof object.code !== "object")
269204
+ throw TypeError(".ClinicalNoteObservation.code: object expected");
269205
+ message.code = $root.ClinicalNoteCodeableConcept.fromObject(object.code, _depth + 1);
269206
+ }
269207
+ if (object.valueConcept != null) {
269208
+ if (typeof object.valueConcept !== "object")
269209
+ throw TypeError(".ClinicalNoteObservation.valueConcept: object expected");
269210
+ message.valueConcept = $root.ClinicalNoteCodeableConcept.fromObject(object.valueConcept, _depth + 1);
269211
+ }
269212
+ if (object.valueString != null)
269213
+ if (typeof object.valueString !== "string" || object.valueString.length)
269214
+ message.valueString = String(object.valueString);
269215
+ if (object.valueBoolean != null)
269216
+ message.valueBoolean = Boolean(object.valueBoolean);
269217
+ if (object.note != null)
269218
+ if (typeof object.note !== "string" || object.note.length)
269219
+ message.note = String(object.note);
269220
+ if (object.ds4pCodes) {
269221
+ if (!Array.isArray(object.ds4pCodes))
269222
+ throw TypeError(".ClinicalNoteObservation.ds4pCodes: array expected");
269223
+ message.ds4pCodes = Array(object.ds4pCodes.length);
269224
+ for (var i = 0; i < object.ds4pCodes.length; ++i)
269225
+ message.ds4pCodes[i] = String(object.ds4pCodes[i]);
269226
+ }
269227
+ return message;
269228
+ };
269229
+
269230
+ /**
269231
+ * Creates a plain object from a ClinicalNoteObservation message. Also converts values to other types if specified.
269232
+ * @function toObject
269233
+ * @memberof ClinicalNoteObservation
269234
+ * @static
269235
+ * @param {ClinicalNoteObservation} message ClinicalNoteObservation
269236
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
269237
+ * @returns {Object.<string,*>} Plain object
269238
+ */
269239
+ ClinicalNoteObservation.toObject = function toObject(message, options) {
269240
+ if (!options)
269241
+ options = {};
269242
+ var object = {};
269243
+ if (options.arrays || options.defaults)
269244
+ object.ds4pCodes = [];
269245
+ if (options.defaults) {
269246
+ object.key = "";
269247
+ object.panelKey = "";
269248
+ object.category = options.enums === String ? "CLINICAL_NOTE_OBSERVATION_CATEGORY_UNKNOWN" : 0;
269249
+ object.code = null;
269250
+ object.valueConcept = null;
269251
+ object.valueString = "";
269252
+ object.note = "";
269253
+ }
269254
+ if (message.key != null && message.hasOwnProperty("key"))
269255
+ object.key = message.key;
269256
+ if (message.panelKey != null && message.hasOwnProperty("panelKey"))
269257
+ object.panelKey = message.panelKey;
269258
+ if (message.category != null && message.hasOwnProperty("category"))
269259
+ object.category = options.enums === String ? $root.ClinicalNoteObservationCategory[message.category] === undefined ? message.category : $root.ClinicalNoteObservationCategory[message.category] : message.category;
269260
+ if (message.code != null && message.hasOwnProperty("code"))
269261
+ object.code = $root.ClinicalNoteCodeableConcept.toObject(message.code, options);
269262
+ if (message.valueConcept != null && message.hasOwnProperty("valueConcept"))
269263
+ object.valueConcept = $root.ClinicalNoteCodeableConcept.toObject(message.valueConcept, options);
269264
+ if (message.valueString != null && message.hasOwnProperty("valueString"))
269265
+ object.valueString = message.valueString;
269266
+ if (message.valueBoolean != null && message.hasOwnProperty("valueBoolean")) {
269267
+ object.valueBoolean = message.valueBoolean;
269268
+ if (options.oneofs)
269269
+ object._valueBoolean = "valueBoolean";
269270
+ }
269271
+ if (message.note != null && message.hasOwnProperty("note"))
269272
+ object.note = message.note;
269273
+ if (message.ds4pCodes && message.ds4pCodes.length) {
269274
+ object.ds4pCodes = Array(message.ds4pCodes.length);
269275
+ for (var j = 0; j < message.ds4pCodes.length; ++j)
269276
+ object.ds4pCodes[j] = message.ds4pCodes[j];
269277
+ }
269278
+ return object;
269279
+ };
269280
+
269281
+ /**
269282
+ * Converts this ClinicalNoteObservation to JSON.
269283
+ * @function toJSON
269284
+ * @memberof ClinicalNoteObservation
269285
+ * @instance
269286
+ * @returns {Object.<string,*>} JSON object
269287
+ */
269288
+ ClinicalNoteObservation.prototype.toJSON = function toJSON() {
269289
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
269290
+ };
269291
+
269292
+ /**
269293
+ * Gets the type url for ClinicalNoteObservation
269294
+ * @function getTypeUrl
269295
+ * @memberof ClinicalNoteObservation
269296
+ * @static
269297
+ * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"`
269298
+ * @returns {string} The type url
269299
+ */
269300
+ ClinicalNoteObservation.getTypeUrl = function getTypeUrl(prefix) {
269301
+ if (prefix === undefined)
269302
+ prefix = "type.googleapis.com";
269303
+ return prefix + "/ClinicalNoteObservation";
269304
+ };
269305
+
269306
+ return ClinicalNoteObservation;
269307
+ })();
269308
+
269309
+ $root.ClinicalNoteFamilyHistory = (function() {
269310
+
269311
+ /**
269312
+ * Properties of a ClinicalNoteFamilyHistory.
269313
+ * @typedef {Object} ClinicalNoteFamilyHistory.$Properties
269314
+ * @property {string|null} [key] ClinicalNoteFamilyHistory key
269315
+ * @property {ClinicalNoteCodeableConcept.$Properties|null} [relationship] ClinicalNoteFamilyHistory relationship
269316
+ * @property {string|null} [note] ClinicalNoteFamilyHistory note
269317
+ * @property {Array.<string>|null} [ds4pCodes] ClinicalNoteFamilyHistory ds4pCodes
269318
+ * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
269319
+ */
269320
+
269321
+ /**
269322
+ * Properties of a ClinicalNoteFamilyHistory.
269323
+ * @name IClinicalNoteFamilyHistory
269324
+ * @interface IClinicalNoteFamilyHistory
269325
+ * @augments ClinicalNoteFamilyHistory.$Properties
269326
+ * @deprecated Use ClinicalNoteFamilyHistory.$Properties instead.
269327
+ */
269328
+
269329
+ /**
269330
+ * Shape of a ClinicalNoteFamilyHistory.
269331
+ * @typedef {ClinicalNoteFamilyHistory.$Properties} ClinicalNoteFamilyHistory.$Shape
269332
+ */
269333
+
269334
+ /**
269335
+ * Constructs a new ClinicalNoteFamilyHistory.
269336
+ * @name ClinicalNoteFamilyHistory
269337
+ * @classdesc Represents a ClinicalNoteFamilyHistory.
269338
+ * @constructor
269339
+ * @param {ClinicalNoteFamilyHistory.$Properties=} [properties] Properties to set
269340
+ * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
269341
+ */
269342
+ function ClinicalNoteFamilyHistory(properties) {
269343
+ this.ds4pCodes = [];
269344
+ if (properties)
269345
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
269346
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
269347
+ this[keys[i]] = properties[keys[i]];
269348
+ }
269349
+
269350
+ /**
269351
+ * ClinicalNoteFamilyHistory key.
269352
+ * @member {string} key
269353
+ * @memberof ClinicalNoteFamilyHistory
269354
+ * @instance
269355
+ */
269356
+ ClinicalNoteFamilyHistory.prototype.key = "";
269357
+
269358
+ /**
269359
+ * ClinicalNoteFamilyHistory relationship.
269360
+ * @member {ClinicalNoteCodeableConcept.$Properties|null|undefined} relationship
269361
+ * @memberof ClinicalNoteFamilyHistory
269362
+ * @instance
269363
+ */
269364
+ ClinicalNoteFamilyHistory.prototype.relationship = null;
269365
+
269366
+ /**
269367
+ * ClinicalNoteFamilyHistory note.
269368
+ * @member {string} note
269369
+ * @memberof ClinicalNoteFamilyHistory
269370
+ * @instance
269371
+ */
269372
+ ClinicalNoteFamilyHistory.prototype.note = "";
269373
+
269374
+ /**
269375
+ * ClinicalNoteFamilyHistory ds4pCodes.
269376
+ * @member {Array.<string>} ds4pCodes
269377
+ * @memberof ClinicalNoteFamilyHistory
269378
+ * @instance
269379
+ */
269380
+ ClinicalNoteFamilyHistory.prototype.ds4pCodes = $util.emptyArray;
269381
+
269382
+ /**
269383
+ * Creates a new ClinicalNoteFamilyHistory instance using the specified properties.
269384
+ * @function create
269385
+ * @memberof ClinicalNoteFamilyHistory
269386
+ * @static
269387
+ * @param {ClinicalNoteFamilyHistory.$Properties=} [properties] Properties to set
269388
+ * @returns {ClinicalNoteFamilyHistory} ClinicalNoteFamilyHistory instance
269389
+ * @type {{
269390
+ * (properties: ClinicalNoteFamilyHistory.$Shape): ClinicalNoteFamilyHistory & ClinicalNoteFamilyHistory.$Shape;
269391
+ * (properties?: ClinicalNoteFamilyHistory.$Properties): ClinicalNoteFamilyHistory;
269392
+ * }}
269393
+ */
269394
+ ClinicalNoteFamilyHistory.create = function create(properties) {
269395
+ return new ClinicalNoteFamilyHistory(properties);
269396
+ };
269397
+
269398
+ /**
269399
+ * Encodes the specified ClinicalNoteFamilyHistory message. Does not implicitly {@link ClinicalNoteFamilyHistory.verify|verify} messages.
269400
+ * @function encode
269401
+ * @memberof ClinicalNoteFamilyHistory
269402
+ * @static
269403
+ * @param {ClinicalNoteFamilyHistory.$Properties} message ClinicalNoteFamilyHistory message or plain object to encode
269404
+ * @param {$protobuf.Writer} [writer] Writer to encode to
269405
+ * @returns {$protobuf.Writer} Writer
269406
+ */
269407
+ ClinicalNoteFamilyHistory.encode = function encode(message, writer) {
269408
+ if (!writer)
269409
+ writer = $Writer.create();
269410
+ if (message.key != null && Object.hasOwnProperty.call(message, "key"))
269411
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.key);
269412
+ if (message.relationship != null && Object.hasOwnProperty.call(message, "relationship"))
269413
+ $root.ClinicalNoteCodeableConcept.encode(message.relationship, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
269414
+ if (message.note != null && Object.hasOwnProperty.call(message, "note"))
269415
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.note);
269416
+ if (message.ds4pCodes != null && message.ds4pCodes.length)
269417
+ for (var i = 0; i < message.ds4pCodes.length; ++i)
269418
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.ds4pCodes[i]);
269419
+ if (message.$unknowns != null && Object.hasOwnProperty.call(message, "$unknowns"))
269420
+ for (var i = 0; i < message.$unknowns.length; ++i)
269421
+ writer.raw(message.$unknowns[i]);
269422
+ return writer;
269423
+ };
269424
+
269425
+ /**
269426
+ * Encodes the specified ClinicalNoteFamilyHistory message, length delimited. Does not implicitly {@link ClinicalNoteFamilyHistory.verify|verify} messages.
269427
+ * @function encodeDelimited
269428
+ * @memberof ClinicalNoteFamilyHistory
269429
+ * @static
269430
+ * @param {ClinicalNoteFamilyHistory.$Properties} message ClinicalNoteFamilyHistory message or plain object to encode
269431
+ * @param {$protobuf.Writer} [writer] Writer to encode to
269432
+ * @returns {$protobuf.Writer} Writer
269433
+ */
269434
+ ClinicalNoteFamilyHistory.encodeDelimited = function encodeDelimited(message, writer) {
269435
+ return this.encode(message, writer).ldelim();
269436
+ };
269437
+
269438
+ /**
269439
+ * Decodes a ClinicalNoteFamilyHistory message from the specified reader or buffer.
269440
+ * @function decode
269441
+ * @memberof ClinicalNoteFamilyHistory
269442
+ * @static
269443
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
269444
+ * @param {number} [length] Message length if known beforehand
269445
+ * @returns {ClinicalNoteFamilyHistory & ClinicalNoteFamilyHistory.$Shape} ClinicalNoteFamilyHistory
269446
+ * @throws {Error} If the payload is not a reader or valid buffer
269447
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
269448
+ */
269449
+ ClinicalNoteFamilyHistory.decode = function decode(reader, length, _end, _depth, _target) {
269450
+ if (!(reader instanceof $Reader))
269451
+ reader = $Reader.create(reader);
269452
+ if (_depth === undefined)
269453
+ _depth = 0;
269454
+ if (_depth > $Reader.recursionLimit)
269455
+ throw Error("max depth exceeded");
269456
+ var end = length === undefined ? reader.len : reader.pos + length, message = _target || new $root.ClinicalNoteFamilyHistory(), value;
269457
+ while (reader.pos < end) {
269458
+ var start = reader.pos;
269459
+ var tag = reader.tag();
269460
+ if (tag === _end) {
269461
+ _end = undefined;
269462
+ break;
269463
+ }
269464
+ var wireType = tag & 7;
269465
+ switch (tag >>>= 3) {
269466
+ case 1: {
269467
+ if (wireType !== 2)
269468
+ break;
269469
+ if ((value = reader.string()).length)
269470
+ message.key = value;
269471
+ else
269472
+ delete message.key;
269473
+ continue;
269474
+ }
269475
+ case 2: {
269476
+ if (wireType !== 2)
269477
+ break;
269478
+ message.relationship = $root.ClinicalNoteCodeableConcept.decode(reader, reader.uint32(), undefined, _depth + 1, message.relationship);
269479
+ continue;
269480
+ }
269481
+ case 3: {
269482
+ if (wireType !== 2)
269483
+ break;
269484
+ if ((value = reader.string()).length)
269485
+ message.note = value;
269486
+ else
269487
+ delete message.note;
269488
+ continue;
269489
+ }
269490
+ case 4: {
269491
+ if (wireType !== 2)
269492
+ break;
269493
+ if (!(message.ds4pCodes && message.ds4pCodes.length))
269494
+ message.ds4pCodes = [];
269495
+ message.ds4pCodes.push(reader.string());
269496
+ continue;
269497
+ }
269498
+ }
269499
+ reader.skipType(wireType, _depth, tag);
269500
+ $util.makeProp(message, "$unknowns", false);
269501
+ (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos));
269502
+ }
269503
+ if (_end !== undefined)
269504
+ throw Error("missing end group");
269505
+ return message;
269506
+ };
269507
+
269508
+ /**
269509
+ * Decodes a ClinicalNoteFamilyHistory message from the specified reader or buffer, length delimited.
269510
+ * @function decodeDelimited
269511
+ * @memberof ClinicalNoteFamilyHistory
269512
+ * @static
269513
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
269514
+ * @returns {ClinicalNoteFamilyHistory & ClinicalNoteFamilyHistory.$Shape} ClinicalNoteFamilyHistory
269515
+ * @throws {Error} If the payload is not a reader or valid buffer
269516
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
269517
+ */
269518
+ ClinicalNoteFamilyHistory.decodeDelimited = function decodeDelimited(reader) {
269519
+ if (!(reader instanceof $Reader))
269520
+ reader = new $Reader(reader);
269521
+ return this.decode(reader, reader.uint32());
269522
+ };
269523
+
269524
+ /**
269525
+ * Verifies a ClinicalNoteFamilyHistory message.
269526
+ * @function verify
269527
+ * @memberof ClinicalNoteFamilyHistory
269528
+ * @static
269529
+ * @param {Object.<string,*>} message Plain object to verify
269530
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
269531
+ */
269532
+ ClinicalNoteFamilyHistory.verify = function verify(message, _depth) {
269533
+ if (typeof message !== "object" || message === null)
269534
+ return "object expected";
269535
+ if (_depth === undefined)
269536
+ _depth = 0;
269537
+ if (_depth > $util.recursionLimit)
269538
+ return "max depth exceeded";
269539
+ if (message.key != null && message.hasOwnProperty("key"))
269540
+ if (!$util.isString(message.key))
269541
+ return "key: string expected";
269542
+ if (message.relationship != null && message.hasOwnProperty("relationship")) {
269543
+ var error = $root.ClinicalNoteCodeableConcept.verify(message.relationship, _depth + 1);
269544
+ if (error)
269545
+ return "relationship." + error;
269546
+ }
269547
+ if (message.note != null && message.hasOwnProperty("note"))
269548
+ if (!$util.isString(message.note))
269549
+ return "note: string expected";
269550
+ if (message.ds4pCodes != null && message.hasOwnProperty("ds4pCodes")) {
269551
+ if (!Array.isArray(message.ds4pCodes))
269552
+ return "ds4pCodes: array expected";
269553
+ for (var i = 0; i < message.ds4pCodes.length; ++i)
269554
+ if (!$util.isString(message.ds4pCodes[i]))
269555
+ return "ds4pCodes: string[] expected";
269556
+ }
269557
+ return null;
269558
+ };
269559
+
269560
+ /**
269561
+ * Creates a ClinicalNoteFamilyHistory message from a plain object. Also converts values to their respective internal types.
269562
+ * @function fromObject
269563
+ * @memberof ClinicalNoteFamilyHistory
269564
+ * @static
269565
+ * @param {Object.<string,*>} object Plain object
269566
+ * @returns {ClinicalNoteFamilyHistory} ClinicalNoteFamilyHistory
269567
+ */
269568
+ ClinicalNoteFamilyHistory.fromObject = function fromObject(object, _depth) {
269569
+ if (object instanceof $root.ClinicalNoteFamilyHistory)
269570
+ return object;
269571
+ if (_depth === undefined)
269572
+ _depth = 0;
269573
+ if (_depth > $util.recursionLimit)
269574
+ throw Error("max depth exceeded");
269575
+ var message = new $root.ClinicalNoteFamilyHistory();
269576
+ if (object.key != null)
269577
+ if (typeof object.key !== "string" || object.key.length)
269578
+ message.key = String(object.key);
269579
+ if (object.relationship != null) {
269580
+ if (typeof object.relationship !== "object")
269581
+ throw TypeError(".ClinicalNoteFamilyHistory.relationship: object expected");
269582
+ message.relationship = $root.ClinicalNoteCodeableConcept.fromObject(object.relationship, _depth + 1);
269583
+ }
269584
+ if (object.note != null)
269585
+ if (typeof object.note !== "string" || object.note.length)
269586
+ message.note = String(object.note);
269587
+ if (object.ds4pCodes) {
269588
+ if (!Array.isArray(object.ds4pCodes))
269589
+ throw TypeError(".ClinicalNoteFamilyHistory.ds4pCodes: array expected");
269590
+ message.ds4pCodes = Array(object.ds4pCodes.length);
269591
+ for (var i = 0; i < object.ds4pCodes.length; ++i)
269592
+ message.ds4pCodes[i] = String(object.ds4pCodes[i]);
269593
+ }
269594
+ return message;
269595
+ };
269596
+
269597
+ /**
269598
+ * Creates a plain object from a ClinicalNoteFamilyHistory message. Also converts values to other types if specified.
269599
+ * @function toObject
269600
+ * @memberof ClinicalNoteFamilyHistory
269601
+ * @static
269602
+ * @param {ClinicalNoteFamilyHistory} message ClinicalNoteFamilyHistory
269603
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
269604
+ * @returns {Object.<string,*>} Plain object
269605
+ */
269606
+ ClinicalNoteFamilyHistory.toObject = function toObject(message, options) {
269607
+ if (!options)
269608
+ options = {};
269609
+ var object = {};
269610
+ if (options.arrays || options.defaults)
269611
+ object.ds4pCodes = [];
269612
+ if (options.defaults) {
269613
+ object.key = "";
269614
+ object.relationship = null;
269615
+ object.note = "";
269616
+ }
269617
+ if (message.key != null && message.hasOwnProperty("key"))
269618
+ object.key = message.key;
269619
+ if (message.relationship != null && message.hasOwnProperty("relationship"))
269620
+ object.relationship = $root.ClinicalNoteCodeableConcept.toObject(message.relationship, options);
269621
+ if (message.note != null && message.hasOwnProperty("note"))
269622
+ object.note = message.note;
269623
+ if (message.ds4pCodes && message.ds4pCodes.length) {
269624
+ object.ds4pCodes = Array(message.ds4pCodes.length);
269625
+ for (var j = 0; j < message.ds4pCodes.length; ++j)
269626
+ object.ds4pCodes[j] = message.ds4pCodes[j];
269627
+ }
269628
+ return object;
269629
+ };
269630
+
269631
+ /**
269632
+ * Converts this ClinicalNoteFamilyHistory to JSON.
269633
+ * @function toJSON
269634
+ * @memberof ClinicalNoteFamilyHistory
269635
+ * @instance
269636
+ * @returns {Object.<string,*>} JSON object
269637
+ */
269638
+ ClinicalNoteFamilyHistory.prototype.toJSON = function toJSON() {
269639
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
269640
+ };
269641
+
269642
+ /**
269643
+ * Gets the type url for ClinicalNoteFamilyHistory
269644
+ * @function getTypeUrl
269645
+ * @memberof ClinicalNoteFamilyHistory
269646
+ * @static
269647
+ * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"`
269648
+ * @returns {string} The type url
269649
+ */
269650
+ ClinicalNoteFamilyHistory.getTypeUrl = function getTypeUrl(prefix) {
269651
+ if (prefix === undefined)
269652
+ prefix = "type.googleapis.com";
269653
+ return prefix + "/ClinicalNoteFamilyHistory";
269654
+ };
269655
+
269656
+ return ClinicalNoteFamilyHistory;
269657
+ })();
269658
+
269659
+ $root.GingerClinicalNotePayload = (function() {
269660
+
269661
+ /**
269662
+ * Properties of a GingerClinicalNotePayload.
269663
+ * @typedef {Object} GingerClinicalNotePayload.$Properties
269664
+ * @property {string|null} [noteId] GingerClinicalNotePayload noteId
269665
+ * @property {string|null} [hsUserId] GingerClinicalNotePayload hsUserId
269666
+ * @property {GingerClinicalNoteType|null} [noteType] GingerClinicalNotePayload noteType
269667
+ * @property {ClinicalNotePatient.$Properties|null} [patient] GingerClinicalNotePayload patient
269668
+ * @property {ClinicalNotePractitioner.$Properties|null} [practitioner] GingerClinicalNotePayload practitioner
269669
+ * @property {ClinicalNoteOrganization.$Properties|null} [organization] GingerClinicalNotePayload organization
269670
+ * @property {ClinicalNoteEncounter.$Properties|null} [encounter] GingerClinicalNotePayload encounter
269671
+ * @property {string|null} [content] GingerClinicalNotePayload content
269672
+ * @property {Array.<string>|null} [icd10Codes] GingerClinicalNotePayload icd10Codes
269673
+ * @property {Array.<string>|null} [ds4pCodes] GingerClinicalNotePayload ds4pCodes
269674
+ * @property {Array.<ClinicalNoteAllergy.$Properties>|null} [allergies] GingerClinicalNotePayload allergies
269675
+ * @property {Array.<ClinicalNoteMedication.$Properties>|null} [medications] GingerClinicalNotePayload medications
269676
+ * @property {Array.<ClinicalNoteObservation.$Properties>|null} [observations] GingerClinicalNotePayload observations
269677
+ * @property {Array.<ClinicalNoteFamilyHistory.$Properties>|null} [familyHistories] GingerClinicalNotePayload familyHistories
269678
+ * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
269679
+ */
269680
+
269681
+ /**
269682
+ * Properties of a GingerClinicalNotePayload.
269683
+ * @name IGingerClinicalNotePayload
269684
+ * @interface IGingerClinicalNotePayload
269685
+ * @augments GingerClinicalNotePayload.$Properties
269686
+ * @deprecated Use GingerClinicalNotePayload.$Properties instead.
269687
+ */
269688
+
269689
+ /**
269690
+ * Shape of a GingerClinicalNotePayload.
269691
+ * @typedef {GingerClinicalNotePayload.$Properties} GingerClinicalNotePayload.$Shape
269692
+ */
269693
+
269694
+ /**
269695
+ * Constructs a new GingerClinicalNotePayload.
269696
+ * @name GingerClinicalNotePayload
269697
+ * @classdesc Represents a GingerClinicalNotePayload.
269698
+ * @constructor
269699
+ * @param {GingerClinicalNotePayload.$Properties=} [properties] Properties to set
269700
+ * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
269701
+ */
269702
+ function GingerClinicalNotePayload(properties) {
269703
+ this.icd10Codes = [];
269704
+ this.ds4pCodes = [];
269705
+ this.allergies = [];
269706
+ this.medications = [];
269707
+ this.observations = [];
269708
+ this.familyHistories = [];
269709
+ if (properties)
269710
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
269711
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
269712
+ this[keys[i]] = properties[keys[i]];
269713
+ }
269714
+
269715
+ /**
269716
+ * GingerClinicalNotePayload noteId.
269717
+ * @member {string} noteId
269718
+ * @memberof GingerClinicalNotePayload
269719
+ * @instance
269720
+ */
269721
+ GingerClinicalNotePayload.prototype.noteId = "";
269722
+
269723
+ /**
269724
+ * GingerClinicalNotePayload hsUserId.
269725
+ * @member {string} hsUserId
269726
+ * @memberof GingerClinicalNotePayload
269727
+ * @instance
269728
+ */
269729
+ GingerClinicalNotePayload.prototype.hsUserId = "";
269730
+
269731
+ /**
269732
+ * GingerClinicalNotePayload noteType.
269733
+ * @member {GingerClinicalNoteType} noteType
269734
+ * @memberof GingerClinicalNotePayload
269735
+ * @instance
269736
+ */
269737
+ GingerClinicalNotePayload.prototype.noteType = 0;
269738
+
269739
+ /**
269740
+ * GingerClinicalNotePayload patient.
269741
+ * @member {ClinicalNotePatient.$Properties|null|undefined} patient
269742
+ * @memberof GingerClinicalNotePayload
269743
+ * @instance
269744
+ */
269745
+ GingerClinicalNotePayload.prototype.patient = null;
269746
+
269747
+ /**
269748
+ * GingerClinicalNotePayload practitioner.
269749
+ * @member {ClinicalNotePractitioner.$Properties|null|undefined} practitioner
269750
+ * @memberof GingerClinicalNotePayload
269751
+ * @instance
269752
+ */
269753
+ GingerClinicalNotePayload.prototype.practitioner = null;
269754
+
269755
+ /**
269756
+ * GingerClinicalNotePayload organization.
269757
+ * @member {ClinicalNoteOrganization.$Properties|null|undefined} organization
269758
+ * @memberof GingerClinicalNotePayload
269759
+ * @instance
269760
+ */
269761
+ GingerClinicalNotePayload.prototype.organization = null;
269762
+
269763
+ /**
269764
+ * GingerClinicalNotePayload encounter.
269765
+ * @member {ClinicalNoteEncounter.$Properties|null|undefined} encounter
269766
+ * @memberof GingerClinicalNotePayload
269767
+ * @instance
269768
+ */
269769
+ GingerClinicalNotePayload.prototype.encounter = null;
269770
+
269771
+ /**
269772
+ * GingerClinicalNotePayload content.
269773
+ * @member {string} content
269774
+ * @memberof GingerClinicalNotePayload
269775
+ * @instance
269776
+ */
269777
+ GingerClinicalNotePayload.prototype.content = "";
269778
+
269779
+ /**
269780
+ * GingerClinicalNotePayload icd10Codes.
269781
+ * @member {Array.<string>} icd10Codes
269782
+ * @memberof GingerClinicalNotePayload
269783
+ * @instance
269784
+ */
269785
+ GingerClinicalNotePayload.prototype.icd10Codes = $util.emptyArray;
269786
+
269787
+ /**
269788
+ * GingerClinicalNotePayload ds4pCodes.
269789
+ * @member {Array.<string>} ds4pCodes
269790
+ * @memberof GingerClinicalNotePayload
269791
+ * @instance
269792
+ */
269793
+ GingerClinicalNotePayload.prototype.ds4pCodes = $util.emptyArray;
269794
+
269795
+ /**
269796
+ * GingerClinicalNotePayload allergies.
269797
+ * @member {Array.<ClinicalNoteAllergy.$Properties>} allergies
269798
+ * @memberof GingerClinicalNotePayload
269799
+ * @instance
269800
+ */
269801
+ GingerClinicalNotePayload.prototype.allergies = $util.emptyArray;
269802
+
269803
+ /**
269804
+ * GingerClinicalNotePayload medications.
269805
+ * @member {Array.<ClinicalNoteMedication.$Properties>} medications
269806
+ * @memberof GingerClinicalNotePayload
269807
+ * @instance
269808
+ */
269809
+ GingerClinicalNotePayload.prototype.medications = $util.emptyArray;
269810
+
269811
+ /**
269812
+ * GingerClinicalNotePayload observations.
269813
+ * @member {Array.<ClinicalNoteObservation.$Properties>} observations
269814
+ * @memberof GingerClinicalNotePayload
269815
+ * @instance
269816
+ */
269817
+ GingerClinicalNotePayload.prototype.observations = $util.emptyArray;
269818
+
269819
+ /**
269820
+ * GingerClinicalNotePayload familyHistories.
269821
+ * @member {Array.<ClinicalNoteFamilyHistory.$Properties>} familyHistories
269822
+ * @memberof GingerClinicalNotePayload
269823
+ * @instance
269824
+ */
269825
+ GingerClinicalNotePayload.prototype.familyHistories = $util.emptyArray;
269826
+
269827
+ /**
269828
+ * Creates a new GingerClinicalNotePayload instance using the specified properties.
269829
+ * @function create
269830
+ * @memberof GingerClinicalNotePayload
269831
+ * @static
269832
+ * @param {GingerClinicalNotePayload.$Properties=} [properties] Properties to set
269833
+ * @returns {GingerClinicalNotePayload} GingerClinicalNotePayload instance
269834
+ * @type {{
269835
+ * (properties: GingerClinicalNotePayload.$Shape): GingerClinicalNotePayload & GingerClinicalNotePayload.$Shape;
269836
+ * (properties?: GingerClinicalNotePayload.$Properties): GingerClinicalNotePayload;
269837
+ * }}
269838
+ */
269839
+ GingerClinicalNotePayload.create = function create(properties) {
269840
+ return new GingerClinicalNotePayload(properties);
269841
+ };
269842
+
269843
+ /**
269844
+ * Encodes the specified GingerClinicalNotePayload message. Does not implicitly {@link GingerClinicalNotePayload.verify|verify} messages.
269845
+ * @function encode
269846
+ * @memberof GingerClinicalNotePayload
269847
+ * @static
269848
+ * @param {GingerClinicalNotePayload.$Properties} message GingerClinicalNotePayload message or plain object to encode
269849
+ * @param {$protobuf.Writer} [writer] Writer to encode to
269850
+ * @returns {$protobuf.Writer} Writer
269851
+ */
269852
+ GingerClinicalNotePayload.encode = function encode(message, writer) {
269853
+ if (!writer)
269854
+ writer = $Writer.create();
269855
+ if (message.noteId != null && Object.hasOwnProperty.call(message, "noteId"))
269856
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.noteId);
269857
+ if (message.hsUserId != null && Object.hasOwnProperty.call(message, "hsUserId"))
269858
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.hsUserId);
269859
+ if (message.noteType != null && Object.hasOwnProperty.call(message, "noteType"))
269860
+ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.noteType);
269861
+ if (message.patient != null && Object.hasOwnProperty.call(message, "patient"))
269862
+ $root.ClinicalNotePatient.encode(message.patient, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
269863
+ if (message.practitioner != null && Object.hasOwnProperty.call(message, "practitioner"))
269864
+ $root.ClinicalNotePractitioner.encode(message.practitioner, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
269865
+ if (message.organization != null && Object.hasOwnProperty.call(message, "organization"))
269866
+ $root.ClinicalNoteOrganization.encode(message.organization, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
269867
+ if (message.encounter != null && Object.hasOwnProperty.call(message, "encounter"))
269868
+ $root.ClinicalNoteEncounter.encode(message.encounter, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
269869
+ if (message.content != null && Object.hasOwnProperty.call(message, "content"))
269870
+ writer.uint32(/* id 8, wireType 2 =*/66).string(message.content);
269871
+ if (message.icd10Codes != null && message.icd10Codes.length)
269872
+ for (var i = 0; i < message.icd10Codes.length; ++i)
269873
+ writer.uint32(/* id 9, wireType 2 =*/74).string(message.icd10Codes[i]);
269874
+ if (message.ds4pCodes != null && message.ds4pCodes.length)
269875
+ for (var i = 0; i < message.ds4pCodes.length; ++i)
269876
+ writer.uint32(/* id 10, wireType 2 =*/82).string(message.ds4pCodes[i]);
269877
+ if (message.allergies != null && message.allergies.length)
269878
+ for (var i = 0; i < message.allergies.length; ++i)
269879
+ $root.ClinicalNoteAllergy.encode(message.allergies[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
269880
+ if (message.medications != null && message.medications.length)
269881
+ for (var i = 0; i < message.medications.length; ++i)
269882
+ $root.ClinicalNoteMedication.encode(message.medications[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
269883
+ if (message.observations != null && message.observations.length)
269884
+ for (var i = 0; i < message.observations.length; ++i)
269885
+ $root.ClinicalNoteObservation.encode(message.observations[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim();
269886
+ if (message.familyHistories != null && message.familyHistories.length)
269887
+ for (var i = 0; i < message.familyHistories.length; ++i)
269888
+ $root.ClinicalNoteFamilyHistory.encode(message.familyHistories[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim();
269889
+ if (message.$unknowns != null && Object.hasOwnProperty.call(message, "$unknowns"))
269890
+ for (var i = 0; i < message.$unknowns.length; ++i)
269891
+ writer.raw(message.$unknowns[i]);
269892
+ return writer;
269893
+ };
269894
+
269895
+ /**
269896
+ * Encodes the specified GingerClinicalNotePayload message, length delimited. Does not implicitly {@link GingerClinicalNotePayload.verify|verify} messages.
269897
+ * @function encodeDelimited
269898
+ * @memberof GingerClinicalNotePayload
269899
+ * @static
269900
+ * @param {GingerClinicalNotePayload.$Properties} message GingerClinicalNotePayload message or plain object to encode
269901
+ * @param {$protobuf.Writer} [writer] Writer to encode to
269902
+ * @returns {$protobuf.Writer} Writer
269903
+ */
269904
+ GingerClinicalNotePayload.encodeDelimited = function encodeDelimited(message, writer) {
269905
+ return this.encode(message, writer).ldelim();
269906
+ };
269907
+
269908
+ /**
269909
+ * Decodes a GingerClinicalNotePayload message from the specified reader or buffer.
269910
+ * @function decode
269911
+ * @memberof GingerClinicalNotePayload
269912
+ * @static
269913
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
269914
+ * @param {number} [length] Message length if known beforehand
269915
+ * @returns {GingerClinicalNotePayload & GingerClinicalNotePayload.$Shape} GingerClinicalNotePayload
269916
+ * @throws {Error} If the payload is not a reader or valid buffer
269917
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
269918
+ */
269919
+ GingerClinicalNotePayload.decode = function decode(reader, length, _end, _depth, _target) {
269920
+ if (!(reader instanceof $Reader))
269921
+ reader = $Reader.create(reader);
269922
+ if (_depth === undefined)
269923
+ _depth = 0;
269924
+ if (_depth > $Reader.recursionLimit)
269925
+ throw Error("max depth exceeded");
269926
+ var end = length === undefined ? reader.len : reader.pos + length, message = _target || new $root.GingerClinicalNotePayload(), value;
269927
+ while (reader.pos < end) {
269928
+ var start = reader.pos;
269929
+ var tag = reader.tag();
269930
+ if (tag === _end) {
269931
+ _end = undefined;
269932
+ break;
269933
+ }
269934
+ var wireType = tag & 7;
269935
+ switch (tag >>>= 3) {
269936
+ case 1: {
269937
+ if (wireType !== 2)
269938
+ break;
269939
+ if ((value = reader.string()).length)
269940
+ message.noteId = value;
269941
+ else
269942
+ delete message.noteId;
269943
+ continue;
269944
+ }
269945
+ case 2: {
269946
+ if (wireType !== 2)
269947
+ break;
269948
+ if ((value = reader.string()).length)
269949
+ message.hsUserId = value;
269950
+ else
269951
+ delete message.hsUserId;
269952
+ continue;
269953
+ }
269954
+ case 3: {
269955
+ if (wireType !== 0)
269956
+ break;
269957
+ if (value = reader.int32())
269958
+ message.noteType = value;
269959
+ else
269960
+ delete message.noteType;
269961
+ continue;
269962
+ }
269963
+ case 4: {
269964
+ if (wireType !== 2)
269965
+ break;
269966
+ message.patient = $root.ClinicalNotePatient.decode(reader, reader.uint32(), undefined, _depth + 1, message.patient);
269967
+ continue;
269968
+ }
269969
+ case 5: {
269970
+ if (wireType !== 2)
269971
+ break;
269972
+ message.practitioner = $root.ClinicalNotePractitioner.decode(reader, reader.uint32(), undefined, _depth + 1, message.practitioner);
269973
+ continue;
269974
+ }
269975
+ case 6: {
269976
+ if (wireType !== 2)
269977
+ break;
269978
+ message.organization = $root.ClinicalNoteOrganization.decode(reader, reader.uint32(), undefined, _depth + 1, message.organization);
269979
+ continue;
269980
+ }
269981
+ case 7: {
269982
+ if (wireType !== 2)
269983
+ break;
269984
+ message.encounter = $root.ClinicalNoteEncounter.decode(reader, reader.uint32(), undefined, _depth + 1, message.encounter);
269985
+ continue;
269986
+ }
269987
+ case 8: {
269988
+ if (wireType !== 2)
269989
+ break;
269990
+ if ((value = reader.string()).length)
269991
+ message.content = value;
269992
+ else
269993
+ delete message.content;
269994
+ continue;
269995
+ }
269996
+ case 9: {
269997
+ if (wireType !== 2)
269998
+ break;
269999
+ if (!(message.icd10Codes && message.icd10Codes.length))
270000
+ message.icd10Codes = [];
270001
+ message.icd10Codes.push(reader.string());
270002
+ continue;
270003
+ }
270004
+ case 10: {
270005
+ if (wireType !== 2)
270006
+ break;
270007
+ if (!(message.ds4pCodes && message.ds4pCodes.length))
270008
+ message.ds4pCodes = [];
270009
+ message.ds4pCodes.push(reader.string());
270010
+ continue;
270011
+ }
270012
+ case 11: {
270013
+ if (wireType !== 2)
270014
+ break;
270015
+ if (!(message.allergies && message.allergies.length))
270016
+ message.allergies = [];
270017
+ message.allergies.push($root.ClinicalNoteAllergy.decode(reader, reader.uint32(), undefined, _depth + 1));
270018
+ continue;
270019
+ }
270020
+ case 12: {
270021
+ if (wireType !== 2)
270022
+ break;
270023
+ if (!(message.medications && message.medications.length))
270024
+ message.medications = [];
268446
270025
  message.medications.push($root.ClinicalNoteMedication.decode(reader, reader.uint32(), undefined, _depth + 1));
268447
270026
  continue;
268448
270027
  }
270028
+ case 13: {
270029
+ if (wireType !== 2)
270030
+ break;
270031
+ if (!(message.observations && message.observations.length))
270032
+ message.observations = [];
270033
+ message.observations.push($root.ClinicalNoteObservation.decode(reader, reader.uint32(), undefined, _depth + 1));
270034
+ continue;
270035
+ }
270036
+ case 14: {
270037
+ if (wireType !== 2)
270038
+ break;
270039
+ if (!(message.familyHistories && message.familyHistories.length))
270040
+ message.familyHistories = [];
270041
+ message.familyHistories.push($root.ClinicalNoteFamilyHistory.decode(reader, reader.uint32(), undefined, _depth + 1));
270042
+ continue;
270043
+ }
268449
270044
  }
268450
270045
  reader.skipType(wireType, _depth, tag);
268451
270046
  $util.makeProp(message, "$unknowns", false);
@@ -268559,6 +270154,24 @@ $root.GingerClinicalNotePayload = (function() {
268559
270154
  return "medications." + error;
268560
270155
  }
268561
270156
  }
270157
+ if (message.observations != null && message.hasOwnProperty("observations")) {
270158
+ if (!Array.isArray(message.observations))
270159
+ return "observations: array expected";
270160
+ for (var i = 0; i < message.observations.length; ++i) {
270161
+ var error = $root.ClinicalNoteObservation.verify(message.observations[i], _depth + 1);
270162
+ if (error)
270163
+ return "observations." + error;
270164
+ }
270165
+ }
270166
+ if (message.familyHistories != null && message.hasOwnProperty("familyHistories")) {
270167
+ if (!Array.isArray(message.familyHistories))
270168
+ return "familyHistories: array expected";
270169
+ for (var i = 0; i < message.familyHistories.length; ++i) {
270170
+ var error = $root.ClinicalNoteFamilyHistory.verify(message.familyHistories[i], _depth + 1);
270171
+ if (error)
270172
+ return "familyHistories." + error;
270173
+ }
270174
+ }
268562
270175
  return null;
268563
270176
  };
268564
270177
 
@@ -268670,6 +270283,26 @@ $root.GingerClinicalNotePayload = (function() {
268670
270283
  message.medications[i] = $root.ClinicalNoteMedication.fromObject(object.medications[i], _depth + 1);
268671
270284
  }
268672
270285
  }
270286
+ if (object.observations) {
270287
+ if (!Array.isArray(object.observations))
270288
+ throw TypeError(".GingerClinicalNotePayload.observations: array expected");
270289
+ message.observations = Array(object.observations.length);
270290
+ for (var i = 0; i < object.observations.length; ++i) {
270291
+ if (typeof object.observations[i] !== "object")
270292
+ throw TypeError(".GingerClinicalNotePayload.observations: object expected");
270293
+ message.observations[i] = $root.ClinicalNoteObservation.fromObject(object.observations[i], _depth + 1);
270294
+ }
270295
+ }
270296
+ if (object.familyHistories) {
270297
+ if (!Array.isArray(object.familyHistories))
270298
+ throw TypeError(".GingerClinicalNotePayload.familyHistories: array expected");
270299
+ message.familyHistories = Array(object.familyHistories.length);
270300
+ for (var i = 0; i < object.familyHistories.length; ++i) {
270301
+ if (typeof object.familyHistories[i] !== "object")
270302
+ throw TypeError(".GingerClinicalNotePayload.familyHistories: object expected");
270303
+ message.familyHistories[i] = $root.ClinicalNoteFamilyHistory.fromObject(object.familyHistories[i], _depth + 1);
270304
+ }
270305
+ }
268673
270306
  return message;
268674
270307
  };
268675
270308
 
@@ -268691,6 +270324,8 @@ $root.GingerClinicalNotePayload = (function() {
268691
270324
  object.ds4pCodes = [];
268692
270325
  object.allergies = [];
268693
270326
  object.medications = [];
270327
+ object.observations = [];
270328
+ object.familyHistories = [];
268694
270329
  }
268695
270330
  if (options.defaults) {
268696
270331
  object.noteId = "";
@@ -268738,6 +270373,16 @@ $root.GingerClinicalNotePayload = (function() {
268738
270373
  for (var j = 0; j < message.medications.length; ++j)
268739
270374
  object.medications[j] = $root.ClinicalNoteMedication.toObject(message.medications[j], options);
268740
270375
  }
270376
+ if (message.observations && message.observations.length) {
270377
+ object.observations = Array(message.observations.length);
270378
+ for (var j = 0; j < message.observations.length; ++j)
270379
+ object.observations[j] = $root.ClinicalNoteObservation.toObject(message.observations[j], options);
270380
+ }
270381
+ if (message.familyHistories && message.familyHistories.length) {
270382
+ object.familyHistories = Array(message.familyHistories.length);
270383
+ for (var j = 0; j < message.familyHistories.length; ++j)
270384
+ object.familyHistories[j] = $root.ClinicalNoteFamilyHistory.toObject(message.familyHistories[j], options);
270385
+ }
268741
270386
  return object;
268742
270387
  };
268743
270388