@headspace/protos-events 1.840.0 → 1.842.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.
Files changed (3) hide show
  1. package/lib/index.d.ts +409 -3
  2. package/lib/index.js +1228 -3
  3. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -265656,6 +265656,1132 @@ $root.ClinicalNoteEncounter = (function() {
265656
265656
  return ClinicalNoteEncounter;
265657
265657
  })();
265658
265658
 
265659
+ /**
265660
+ * ClinicalNoteAllergyClinicalStatus enum.
265661
+ * @name ClinicalNoteAllergyClinicalStatus
265662
+ * @enum {number}
265663
+ * @property {number} CLINICAL_NOTE_ALLERGY_CLINICAL_STATUS_UNKNOWN=0 CLINICAL_NOTE_ALLERGY_CLINICAL_STATUS_UNKNOWN value
265664
+ * @property {number} CLINICAL_NOTE_ALLERGY_CLINICAL_STATUS_ACTIVE=1 CLINICAL_NOTE_ALLERGY_CLINICAL_STATUS_ACTIVE value
265665
+ * @property {number} CLINICAL_NOTE_ALLERGY_CLINICAL_STATUS_INACTIVE=2 CLINICAL_NOTE_ALLERGY_CLINICAL_STATUS_INACTIVE value
265666
+ * @property {number} CLINICAL_NOTE_ALLERGY_CLINICAL_STATUS_RESOLVED=3 CLINICAL_NOTE_ALLERGY_CLINICAL_STATUS_RESOLVED value
265667
+ */
265668
+ $root.ClinicalNoteAllergyClinicalStatus = (function() {
265669
+ var valuesById = {}, values = Object.create(valuesById);
265670
+ values[valuesById[0] = "CLINICAL_NOTE_ALLERGY_CLINICAL_STATUS_UNKNOWN"] = 0;
265671
+ values[valuesById[1] = "CLINICAL_NOTE_ALLERGY_CLINICAL_STATUS_ACTIVE"] = 1;
265672
+ values[valuesById[2] = "CLINICAL_NOTE_ALLERGY_CLINICAL_STATUS_INACTIVE"] = 2;
265673
+ values[valuesById[3] = "CLINICAL_NOTE_ALLERGY_CLINICAL_STATUS_RESOLVED"] = 3;
265674
+ return values;
265675
+ })();
265676
+
265677
+ /**
265678
+ * ClinicalNoteAllergyVerificationStatus enum.
265679
+ * @name ClinicalNoteAllergyVerificationStatus
265680
+ * @enum {number}
265681
+ * @property {number} CLINICAL_NOTE_ALLERGY_VERIFICATION_STATUS_UNKNOWN=0 CLINICAL_NOTE_ALLERGY_VERIFICATION_STATUS_UNKNOWN value
265682
+ * @property {number} CLINICAL_NOTE_ALLERGY_VERIFICATION_STATUS_CONFIRMED=1 CLINICAL_NOTE_ALLERGY_VERIFICATION_STATUS_CONFIRMED value
265683
+ * @property {number} CLINICAL_NOTE_ALLERGY_VERIFICATION_STATUS_UNCONFIRMED=2 CLINICAL_NOTE_ALLERGY_VERIFICATION_STATUS_UNCONFIRMED value
265684
+ * @property {number} CLINICAL_NOTE_ALLERGY_VERIFICATION_STATUS_REFUTED=3 CLINICAL_NOTE_ALLERGY_VERIFICATION_STATUS_REFUTED value
265685
+ * @property {number} CLINICAL_NOTE_ALLERGY_VERIFICATION_STATUS_ENTERED_IN_ERROR=4 CLINICAL_NOTE_ALLERGY_VERIFICATION_STATUS_ENTERED_IN_ERROR value
265686
+ */
265687
+ $root.ClinicalNoteAllergyVerificationStatus = (function() {
265688
+ var valuesById = {}, values = Object.create(valuesById);
265689
+ values[valuesById[0] = "CLINICAL_NOTE_ALLERGY_VERIFICATION_STATUS_UNKNOWN"] = 0;
265690
+ values[valuesById[1] = "CLINICAL_NOTE_ALLERGY_VERIFICATION_STATUS_CONFIRMED"] = 1;
265691
+ values[valuesById[2] = "CLINICAL_NOTE_ALLERGY_VERIFICATION_STATUS_UNCONFIRMED"] = 2;
265692
+ values[valuesById[3] = "CLINICAL_NOTE_ALLERGY_VERIFICATION_STATUS_REFUTED"] = 3;
265693
+ values[valuesById[4] = "CLINICAL_NOTE_ALLERGY_VERIFICATION_STATUS_ENTERED_IN_ERROR"] = 4;
265694
+ return values;
265695
+ })();
265696
+
265697
+ /**
265698
+ * ClinicalNoteMedicationStatus enum.
265699
+ * @name ClinicalNoteMedicationStatus
265700
+ * @enum {number}
265701
+ * @property {number} CLINICAL_NOTE_MEDICATION_STATUS_UNKNOWN=0 CLINICAL_NOTE_MEDICATION_STATUS_UNKNOWN value
265702
+ * @property {number} CLINICAL_NOTE_MEDICATION_STATUS_ACTIVE=1 CLINICAL_NOTE_MEDICATION_STATUS_ACTIVE value
265703
+ * @property {number} CLINICAL_NOTE_MEDICATION_STATUS_ON_HOLD=2 CLINICAL_NOTE_MEDICATION_STATUS_ON_HOLD value
265704
+ * @property {number} CLINICAL_NOTE_MEDICATION_STATUS_CANCELLED=3 CLINICAL_NOTE_MEDICATION_STATUS_CANCELLED value
265705
+ * @property {number} CLINICAL_NOTE_MEDICATION_STATUS_COMPLETED=4 CLINICAL_NOTE_MEDICATION_STATUS_COMPLETED value
265706
+ * @property {number} CLINICAL_NOTE_MEDICATION_STATUS_ENTERED_IN_ERROR=5 CLINICAL_NOTE_MEDICATION_STATUS_ENTERED_IN_ERROR value
265707
+ * @property {number} CLINICAL_NOTE_MEDICATION_STATUS_STOPPED=6 CLINICAL_NOTE_MEDICATION_STATUS_STOPPED value
265708
+ * @property {number} CLINICAL_NOTE_MEDICATION_STATUS_DRAFT=7 CLINICAL_NOTE_MEDICATION_STATUS_DRAFT value
265709
+ */
265710
+ $root.ClinicalNoteMedicationStatus = (function() {
265711
+ var valuesById = {}, values = Object.create(valuesById);
265712
+ values[valuesById[0] = "CLINICAL_NOTE_MEDICATION_STATUS_UNKNOWN"] = 0;
265713
+ values[valuesById[1] = "CLINICAL_NOTE_MEDICATION_STATUS_ACTIVE"] = 1;
265714
+ values[valuesById[2] = "CLINICAL_NOTE_MEDICATION_STATUS_ON_HOLD"] = 2;
265715
+ values[valuesById[3] = "CLINICAL_NOTE_MEDICATION_STATUS_CANCELLED"] = 3;
265716
+ values[valuesById[4] = "CLINICAL_NOTE_MEDICATION_STATUS_COMPLETED"] = 4;
265717
+ values[valuesById[5] = "CLINICAL_NOTE_MEDICATION_STATUS_ENTERED_IN_ERROR"] = 5;
265718
+ values[valuesById[6] = "CLINICAL_NOTE_MEDICATION_STATUS_STOPPED"] = 6;
265719
+ values[valuesById[7] = "CLINICAL_NOTE_MEDICATION_STATUS_DRAFT"] = 7;
265720
+ return values;
265721
+ })();
265722
+
265723
+ /**
265724
+ * ClinicalNoteMedicationIntent enum.
265725
+ * @name ClinicalNoteMedicationIntent
265726
+ * @enum {number}
265727
+ * @property {number} CLINICAL_NOTE_MEDICATION_INTENT_UNKNOWN=0 CLINICAL_NOTE_MEDICATION_INTENT_UNKNOWN value
265728
+ * @property {number} CLINICAL_NOTE_MEDICATION_INTENT_PLAN=1 CLINICAL_NOTE_MEDICATION_INTENT_PLAN value
265729
+ * @property {number} CLINICAL_NOTE_MEDICATION_INTENT_ORDER=2 CLINICAL_NOTE_MEDICATION_INTENT_ORDER value
265730
+ * @property {number} CLINICAL_NOTE_MEDICATION_INTENT_PROPOSAL=3 CLINICAL_NOTE_MEDICATION_INTENT_PROPOSAL value
265731
+ * @property {number} CLINICAL_NOTE_MEDICATION_INTENT_ORIGINAL_ORDER=4 CLINICAL_NOTE_MEDICATION_INTENT_ORIGINAL_ORDER value
265732
+ * @property {number} CLINICAL_NOTE_MEDICATION_INTENT_OPTION=5 CLINICAL_NOTE_MEDICATION_INTENT_OPTION value
265733
+ */
265734
+ $root.ClinicalNoteMedicationIntent = (function() {
265735
+ var valuesById = {}, values = Object.create(valuesById);
265736
+ values[valuesById[0] = "CLINICAL_NOTE_MEDICATION_INTENT_UNKNOWN"] = 0;
265737
+ values[valuesById[1] = "CLINICAL_NOTE_MEDICATION_INTENT_PLAN"] = 1;
265738
+ values[valuesById[2] = "CLINICAL_NOTE_MEDICATION_INTENT_ORDER"] = 2;
265739
+ values[valuesById[3] = "CLINICAL_NOTE_MEDICATION_INTENT_PROPOSAL"] = 3;
265740
+ values[valuesById[4] = "CLINICAL_NOTE_MEDICATION_INTENT_ORIGINAL_ORDER"] = 4;
265741
+ values[valuesById[5] = "CLINICAL_NOTE_MEDICATION_INTENT_OPTION"] = 5;
265742
+ return values;
265743
+ })();
265744
+
265745
+ $root.ClinicalNoteAllergy = (function() {
265746
+
265747
+ /**
265748
+ * Properties of a ClinicalNoteAllergy.
265749
+ * @typedef {Object} ClinicalNoteAllergy.$Properties
265750
+ * @property {string|null} [substance] ClinicalNoteAllergy substance
265751
+ * @property {string|null} [reaction] ClinicalNoteAllergy reaction
265752
+ * @property {string|null} [comments] ClinicalNoteAllergy comments
265753
+ * @property {string|null} [code] ClinicalNoteAllergy code
265754
+ * @property {string|null} [codeSystem] ClinicalNoteAllergy codeSystem
265755
+ * @property {ClinicalNoteAllergyClinicalStatus|null} [clinicalStatus] ClinicalNoteAllergy clinicalStatus
265756
+ * @property {ClinicalNoteAllergyVerificationStatus|null} [verificationStatus] ClinicalNoteAllergy verificationStatus
265757
+ * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
265758
+ */
265759
+
265760
+ /**
265761
+ * Properties of a ClinicalNoteAllergy.
265762
+ * @name IClinicalNoteAllergy
265763
+ * @interface IClinicalNoteAllergy
265764
+ * @augments ClinicalNoteAllergy.$Properties
265765
+ * @deprecated Use ClinicalNoteAllergy.$Properties instead.
265766
+ */
265767
+
265768
+ /**
265769
+ * Shape of a ClinicalNoteAllergy.
265770
+ * @typedef {ClinicalNoteAllergy.$Properties} ClinicalNoteAllergy.$Shape
265771
+ */
265772
+
265773
+ /**
265774
+ * Constructs a new ClinicalNoteAllergy.
265775
+ * @name ClinicalNoteAllergy
265776
+ * @classdesc Represents a ClinicalNoteAllergy.
265777
+ * @constructor
265778
+ * @param {ClinicalNoteAllergy.$Properties=} [properties] Properties to set
265779
+ * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
265780
+ */
265781
+ function ClinicalNoteAllergy(properties) {
265782
+ if (properties)
265783
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
265784
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
265785
+ this[keys[i]] = properties[keys[i]];
265786
+ }
265787
+
265788
+ /**
265789
+ * ClinicalNoteAllergy substance.
265790
+ * @member {string} substance
265791
+ * @memberof ClinicalNoteAllergy
265792
+ * @instance
265793
+ */
265794
+ ClinicalNoteAllergy.prototype.substance = "";
265795
+
265796
+ /**
265797
+ * ClinicalNoteAllergy reaction.
265798
+ * @member {string} reaction
265799
+ * @memberof ClinicalNoteAllergy
265800
+ * @instance
265801
+ */
265802
+ ClinicalNoteAllergy.prototype.reaction = "";
265803
+
265804
+ /**
265805
+ * ClinicalNoteAllergy comments.
265806
+ * @member {string} comments
265807
+ * @memberof ClinicalNoteAllergy
265808
+ * @instance
265809
+ */
265810
+ ClinicalNoteAllergy.prototype.comments = "";
265811
+
265812
+ /**
265813
+ * ClinicalNoteAllergy code.
265814
+ * @member {string} code
265815
+ * @memberof ClinicalNoteAllergy
265816
+ * @instance
265817
+ */
265818
+ ClinicalNoteAllergy.prototype.code = "";
265819
+
265820
+ /**
265821
+ * ClinicalNoteAllergy codeSystem.
265822
+ * @member {string} codeSystem
265823
+ * @memberof ClinicalNoteAllergy
265824
+ * @instance
265825
+ */
265826
+ ClinicalNoteAllergy.prototype.codeSystem = "";
265827
+
265828
+ /**
265829
+ * ClinicalNoteAllergy clinicalStatus.
265830
+ * @member {ClinicalNoteAllergyClinicalStatus|null|undefined} clinicalStatus
265831
+ * @memberof ClinicalNoteAllergy
265832
+ * @instance
265833
+ */
265834
+ ClinicalNoteAllergy.prototype.clinicalStatus = null;
265835
+
265836
+ /**
265837
+ * ClinicalNoteAllergy verificationStatus.
265838
+ * @member {ClinicalNoteAllergyVerificationStatus|null|undefined} verificationStatus
265839
+ * @memberof ClinicalNoteAllergy
265840
+ * @instance
265841
+ */
265842
+ ClinicalNoteAllergy.prototype.verificationStatus = null;
265843
+
265844
+ // OneOf field names bound to virtual getters and setters
265845
+ var $oneOfFields;
265846
+
265847
+ // Virtual OneOf for proto3 optional field
265848
+ Object.defineProperty(ClinicalNoteAllergy.prototype, "_clinicalStatus", {
265849
+ get: $util.oneOfGetter($oneOfFields = ["clinicalStatus"]),
265850
+ set: $util.oneOfSetter($oneOfFields)
265851
+ });
265852
+
265853
+ // Virtual OneOf for proto3 optional field
265854
+ Object.defineProperty(ClinicalNoteAllergy.prototype, "_verificationStatus", {
265855
+ get: $util.oneOfGetter($oneOfFields = ["verificationStatus"]),
265856
+ set: $util.oneOfSetter($oneOfFields)
265857
+ });
265858
+
265859
+ /**
265860
+ * Creates a new ClinicalNoteAllergy instance using the specified properties.
265861
+ * @function create
265862
+ * @memberof ClinicalNoteAllergy
265863
+ * @static
265864
+ * @param {ClinicalNoteAllergy.$Properties=} [properties] Properties to set
265865
+ * @returns {ClinicalNoteAllergy} ClinicalNoteAllergy instance
265866
+ * @type {{
265867
+ * (properties: ClinicalNoteAllergy.$Shape): ClinicalNoteAllergy & ClinicalNoteAllergy.$Shape;
265868
+ * (properties?: ClinicalNoteAllergy.$Properties): ClinicalNoteAllergy;
265869
+ * }}
265870
+ */
265871
+ ClinicalNoteAllergy.create = function create(properties) {
265872
+ return new ClinicalNoteAllergy(properties);
265873
+ };
265874
+
265875
+ /**
265876
+ * Encodes the specified ClinicalNoteAllergy message. Does not implicitly {@link ClinicalNoteAllergy.verify|verify} messages.
265877
+ * @function encode
265878
+ * @memberof ClinicalNoteAllergy
265879
+ * @static
265880
+ * @param {ClinicalNoteAllergy.$Properties} message ClinicalNoteAllergy message or plain object to encode
265881
+ * @param {$protobuf.Writer} [writer] Writer to encode to
265882
+ * @returns {$protobuf.Writer} Writer
265883
+ */
265884
+ ClinicalNoteAllergy.encode = function encode(message, writer) {
265885
+ if (!writer)
265886
+ writer = $Writer.create();
265887
+ if (message.substance != null && Object.hasOwnProperty.call(message, "substance"))
265888
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.substance);
265889
+ if (message.reaction != null && Object.hasOwnProperty.call(message, "reaction"))
265890
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.reaction);
265891
+ if (message.comments != null && Object.hasOwnProperty.call(message, "comments"))
265892
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.comments);
265893
+ if (message.code != null && Object.hasOwnProperty.call(message, "code"))
265894
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.code);
265895
+ if (message.codeSystem != null && Object.hasOwnProperty.call(message, "codeSystem"))
265896
+ writer.uint32(/* id 5, wireType 2 =*/42).string(message.codeSystem);
265897
+ if (message.clinicalStatus != null && Object.hasOwnProperty.call(message, "clinicalStatus"))
265898
+ writer.uint32(/* id 6, wireType 0 =*/48).int32(message.clinicalStatus);
265899
+ if (message.verificationStatus != null && Object.hasOwnProperty.call(message, "verificationStatus"))
265900
+ writer.uint32(/* id 7, wireType 0 =*/56).int32(message.verificationStatus);
265901
+ if (message.$unknowns != null && Object.hasOwnProperty.call(message, "$unknowns"))
265902
+ for (var i = 0; i < message.$unknowns.length; ++i)
265903
+ writer.raw(message.$unknowns[i]);
265904
+ return writer;
265905
+ };
265906
+
265907
+ /**
265908
+ * Encodes the specified ClinicalNoteAllergy message, length delimited. Does not implicitly {@link ClinicalNoteAllergy.verify|verify} messages.
265909
+ * @function encodeDelimited
265910
+ * @memberof ClinicalNoteAllergy
265911
+ * @static
265912
+ * @param {ClinicalNoteAllergy.$Properties} message ClinicalNoteAllergy message or plain object to encode
265913
+ * @param {$protobuf.Writer} [writer] Writer to encode to
265914
+ * @returns {$protobuf.Writer} Writer
265915
+ */
265916
+ ClinicalNoteAllergy.encodeDelimited = function encodeDelimited(message, writer) {
265917
+ return this.encode(message, writer).ldelim();
265918
+ };
265919
+
265920
+ /**
265921
+ * Decodes a ClinicalNoteAllergy message from the specified reader or buffer.
265922
+ * @function decode
265923
+ * @memberof ClinicalNoteAllergy
265924
+ * @static
265925
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
265926
+ * @param {number} [length] Message length if known beforehand
265927
+ * @returns {ClinicalNoteAllergy & ClinicalNoteAllergy.$Shape} ClinicalNoteAllergy
265928
+ * @throws {Error} If the payload is not a reader or valid buffer
265929
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
265930
+ */
265931
+ ClinicalNoteAllergy.decode = function decode(reader, length, _end, _depth, _target) {
265932
+ if (!(reader instanceof $Reader))
265933
+ reader = $Reader.create(reader);
265934
+ if (_depth === undefined)
265935
+ _depth = 0;
265936
+ if (_depth > $Reader.recursionLimit)
265937
+ throw Error("max depth exceeded");
265938
+ var end = length === undefined ? reader.len : reader.pos + length, message = _target || new $root.ClinicalNoteAllergy(), value;
265939
+ while (reader.pos < end) {
265940
+ var start = reader.pos;
265941
+ var tag = reader.tag();
265942
+ if (tag === _end) {
265943
+ _end = undefined;
265944
+ break;
265945
+ }
265946
+ var wireType = tag & 7;
265947
+ switch (tag >>>= 3) {
265948
+ case 1: {
265949
+ if (wireType !== 2)
265950
+ break;
265951
+ if ((value = reader.string()).length)
265952
+ message.substance = value;
265953
+ else
265954
+ delete message.substance;
265955
+ continue;
265956
+ }
265957
+ case 2: {
265958
+ if (wireType !== 2)
265959
+ break;
265960
+ if ((value = reader.string()).length)
265961
+ message.reaction = value;
265962
+ else
265963
+ delete message.reaction;
265964
+ continue;
265965
+ }
265966
+ case 3: {
265967
+ if (wireType !== 2)
265968
+ break;
265969
+ if ((value = reader.string()).length)
265970
+ message.comments = value;
265971
+ else
265972
+ delete message.comments;
265973
+ continue;
265974
+ }
265975
+ case 4: {
265976
+ if (wireType !== 2)
265977
+ break;
265978
+ if ((value = reader.string()).length)
265979
+ message.code = value;
265980
+ else
265981
+ delete message.code;
265982
+ continue;
265983
+ }
265984
+ case 5: {
265985
+ if (wireType !== 2)
265986
+ break;
265987
+ if ((value = reader.string()).length)
265988
+ message.codeSystem = value;
265989
+ else
265990
+ delete message.codeSystem;
265991
+ continue;
265992
+ }
265993
+ case 6: {
265994
+ if (wireType !== 0)
265995
+ break;
265996
+ message.clinicalStatus = reader.int32();
265997
+ message._clinicalStatus = "clinicalStatus";
265998
+ continue;
265999
+ }
266000
+ case 7: {
266001
+ if (wireType !== 0)
266002
+ break;
266003
+ message.verificationStatus = reader.int32();
266004
+ message._verificationStatus = "verificationStatus";
266005
+ continue;
266006
+ }
266007
+ }
266008
+ reader.skipType(wireType, _depth, tag);
266009
+ $util.makeProp(message, "$unknowns", false);
266010
+ (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos));
266011
+ }
266012
+ if (_end !== undefined)
266013
+ throw Error("missing end group");
266014
+ return message;
266015
+ };
266016
+
266017
+ /**
266018
+ * Decodes a ClinicalNoteAllergy message from the specified reader or buffer, length delimited.
266019
+ * @function decodeDelimited
266020
+ * @memberof ClinicalNoteAllergy
266021
+ * @static
266022
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
266023
+ * @returns {ClinicalNoteAllergy & ClinicalNoteAllergy.$Shape} ClinicalNoteAllergy
266024
+ * @throws {Error} If the payload is not a reader or valid buffer
266025
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
266026
+ */
266027
+ ClinicalNoteAllergy.decodeDelimited = function decodeDelimited(reader) {
266028
+ if (!(reader instanceof $Reader))
266029
+ reader = new $Reader(reader);
266030
+ return this.decode(reader, reader.uint32());
266031
+ };
266032
+
266033
+ /**
266034
+ * Verifies a ClinicalNoteAllergy message.
266035
+ * @function verify
266036
+ * @memberof ClinicalNoteAllergy
266037
+ * @static
266038
+ * @param {Object.<string,*>} message Plain object to verify
266039
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
266040
+ */
266041
+ ClinicalNoteAllergy.verify = function verify(message, _depth) {
266042
+ if (typeof message !== "object" || message === null)
266043
+ return "object expected";
266044
+ if (_depth === undefined)
266045
+ _depth = 0;
266046
+ if (_depth > $util.recursionLimit)
266047
+ return "max depth exceeded";
266048
+ var properties = {};
266049
+ if (message.substance != null && message.hasOwnProperty("substance"))
266050
+ if (!$util.isString(message.substance))
266051
+ return "substance: string expected";
266052
+ if (message.reaction != null && message.hasOwnProperty("reaction"))
266053
+ if (!$util.isString(message.reaction))
266054
+ return "reaction: string expected";
266055
+ if (message.comments != null && message.hasOwnProperty("comments"))
266056
+ if (!$util.isString(message.comments))
266057
+ return "comments: string expected";
266058
+ if (message.code != null && message.hasOwnProperty("code"))
266059
+ if (!$util.isString(message.code))
266060
+ return "code: string expected";
266061
+ if (message.codeSystem != null && message.hasOwnProperty("codeSystem"))
266062
+ if (!$util.isString(message.codeSystem))
266063
+ return "codeSystem: string expected";
266064
+ if (message.clinicalStatus != null && message.hasOwnProperty("clinicalStatus")) {
266065
+ properties._clinicalStatus = 1;
266066
+ switch (message.clinicalStatus) {
266067
+ default:
266068
+ return "clinicalStatus: enum value expected";
266069
+ case 0:
266070
+ case 1:
266071
+ case 2:
266072
+ case 3:
266073
+ break;
266074
+ }
266075
+ }
266076
+ if (message.verificationStatus != null && message.hasOwnProperty("verificationStatus")) {
266077
+ properties._verificationStatus = 1;
266078
+ switch (message.verificationStatus) {
266079
+ default:
266080
+ return "verificationStatus: enum value expected";
266081
+ case 0:
266082
+ case 1:
266083
+ case 2:
266084
+ case 3:
266085
+ case 4:
266086
+ break;
266087
+ }
266088
+ }
266089
+ return null;
266090
+ };
266091
+
266092
+ /**
266093
+ * Creates a ClinicalNoteAllergy message from a plain object. Also converts values to their respective internal types.
266094
+ * @function fromObject
266095
+ * @memberof ClinicalNoteAllergy
266096
+ * @static
266097
+ * @param {Object.<string,*>} object Plain object
266098
+ * @returns {ClinicalNoteAllergy} ClinicalNoteAllergy
266099
+ */
266100
+ ClinicalNoteAllergy.fromObject = function fromObject(object, _depth) {
266101
+ if (object instanceof $root.ClinicalNoteAllergy)
266102
+ return object;
266103
+ if (_depth === undefined)
266104
+ _depth = 0;
266105
+ if (_depth > $util.recursionLimit)
266106
+ throw Error("max depth exceeded");
266107
+ var message = new $root.ClinicalNoteAllergy();
266108
+ if (object.substance != null)
266109
+ if (typeof object.substance !== "string" || object.substance.length)
266110
+ message.substance = String(object.substance);
266111
+ if (object.reaction != null)
266112
+ if (typeof object.reaction !== "string" || object.reaction.length)
266113
+ message.reaction = String(object.reaction);
266114
+ if (object.comments != null)
266115
+ if (typeof object.comments !== "string" || object.comments.length)
266116
+ message.comments = String(object.comments);
266117
+ if (object.code != null)
266118
+ if (typeof object.code !== "string" || object.code.length)
266119
+ message.code = String(object.code);
266120
+ if (object.codeSystem != null)
266121
+ if (typeof object.codeSystem !== "string" || object.codeSystem.length)
266122
+ message.codeSystem = String(object.codeSystem);
266123
+ switch (object.clinicalStatus) {
266124
+ default:
266125
+ if (typeof object.clinicalStatus === "number") {
266126
+ message.clinicalStatus = object.clinicalStatus;
266127
+ break;
266128
+ }
266129
+ break;
266130
+ case "CLINICAL_NOTE_ALLERGY_CLINICAL_STATUS_UNKNOWN":
266131
+ case 0:
266132
+ message.clinicalStatus = 0;
266133
+ break;
266134
+ case "CLINICAL_NOTE_ALLERGY_CLINICAL_STATUS_ACTIVE":
266135
+ case 1:
266136
+ message.clinicalStatus = 1;
266137
+ break;
266138
+ case "CLINICAL_NOTE_ALLERGY_CLINICAL_STATUS_INACTIVE":
266139
+ case 2:
266140
+ message.clinicalStatus = 2;
266141
+ break;
266142
+ case "CLINICAL_NOTE_ALLERGY_CLINICAL_STATUS_RESOLVED":
266143
+ case 3:
266144
+ message.clinicalStatus = 3;
266145
+ break;
266146
+ }
266147
+ switch (object.verificationStatus) {
266148
+ default:
266149
+ if (typeof object.verificationStatus === "number") {
266150
+ message.verificationStatus = object.verificationStatus;
266151
+ break;
266152
+ }
266153
+ break;
266154
+ case "CLINICAL_NOTE_ALLERGY_VERIFICATION_STATUS_UNKNOWN":
266155
+ case 0:
266156
+ message.verificationStatus = 0;
266157
+ break;
266158
+ case "CLINICAL_NOTE_ALLERGY_VERIFICATION_STATUS_CONFIRMED":
266159
+ case 1:
266160
+ message.verificationStatus = 1;
266161
+ break;
266162
+ case "CLINICAL_NOTE_ALLERGY_VERIFICATION_STATUS_UNCONFIRMED":
266163
+ case 2:
266164
+ message.verificationStatus = 2;
266165
+ break;
266166
+ case "CLINICAL_NOTE_ALLERGY_VERIFICATION_STATUS_REFUTED":
266167
+ case 3:
266168
+ message.verificationStatus = 3;
266169
+ break;
266170
+ case "CLINICAL_NOTE_ALLERGY_VERIFICATION_STATUS_ENTERED_IN_ERROR":
266171
+ case 4:
266172
+ message.verificationStatus = 4;
266173
+ break;
266174
+ }
266175
+ return message;
266176
+ };
266177
+
266178
+ /**
266179
+ * Creates a plain object from a ClinicalNoteAllergy message. Also converts values to other types if specified.
266180
+ * @function toObject
266181
+ * @memberof ClinicalNoteAllergy
266182
+ * @static
266183
+ * @param {ClinicalNoteAllergy} message ClinicalNoteAllergy
266184
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
266185
+ * @returns {Object.<string,*>} Plain object
266186
+ */
266187
+ ClinicalNoteAllergy.toObject = function toObject(message, options) {
266188
+ if (!options)
266189
+ options = {};
266190
+ var object = {};
266191
+ if (options.defaults) {
266192
+ object.substance = "";
266193
+ object.reaction = "";
266194
+ object.comments = "";
266195
+ object.code = "";
266196
+ object.codeSystem = "";
266197
+ }
266198
+ if (message.substance != null && message.hasOwnProperty("substance"))
266199
+ object.substance = message.substance;
266200
+ if (message.reaction != null && message.hasOwnProperty("reaction"))
266201
+ object.reaction = message.reaction;
266202
+ if (message.comments != null && message.hasOwnProperty("comments"))
266203
+ object.comments = message.comments;
266204
+ if (message.code != null && message.hasOwnProperty("code"))
266205
+ object.code = message.code;
266206
+ if (message.codeSystem != null && message.hasOwnProperty("codeSystem"))
266207
+ object.codeSystem = message.codeSystem;
266208
+ if (message.clinicalStatus != null && message.hasOwnProperty("clinicalStatus")) {
266209
+ object.clinicalStatus = options.enums === String ? $root.ClinicalNoteAllergyClinicalStatus[message.clinicalStatus] === undefined ? message.clinicalStatus : $root.ClinicalNoteAllergyClinicalStatus[message.clinicalStatus] : message.clinicalStatus;
266210
+ if (options.oneofs)
266211
+ object._clinicalStatus = "clinicalStatus";
266212
+ }
266213
+ if (message.verificationStatus != null && message.hasOwnProperty("verificationStatus")) {
266214
+ object.verificationStatus = options.enums === String ? $root.ClinicalNoteAllergyVerificationStatus[message.verificationStatus] === undefined ? message.verificationStatus : $root.ClinicalNoteAllergyVerificationStatus[message.verificationStatus] : message.verificationStatus;
266215
+ if (options.oneofs)
266216
+ object._verificationStatus = "verificationStatus";
266217
+ }
266218
+ return object;
266219
+ };
266220
+
266221
+ /**
266222
+ * Converts this ClinicalNoteAllergy to JSON.
266223
+ * @function toJSON
266224
+ * @memberof ClinicalNoteAllergy
266225
+ * @instance
266226
+ * @returns {Object.<string,*>} JSON object
266227
+ */
266228
+ ClinicalNoteAllergy.prototype.toJSON = function toJSON() {
266229
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
266230
+ };
266231
+
266232
+ /**
266233
+ * Gets the type url for ClinicalNoteAllergy
266234
+ * @function getTypeUrl
266235
+ * @memberof ClinicalNoteAllergy
266236
+ * @static
266237
+ * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"`
266238
+ * @returns {string} The type url
266239
+ */
266240
+ ClinicalNoteAllergy.getTypeUrl = function getTypeUrl(prefix) {
266241
+ if (prefix === undefined)
266242
+ prefix = "type.googleapis.com";
266243
+ return prefix + "/ClinicalNoteAllergy";
266244
+ };
266245
+
266246
+ return ClinicalNoteAllergy;
266247
+ })();
266248
+
266249
+ $root.ClinicalNoteMedication = (function() {
266250
+
266251
+ /**
266252
+ * Properties of a ClinicalNoteMedication.
266253
+ * @typedef {Object} ClinicalNoteMedication.$Properties
266254
+ * @property {string|null} [name] ClinicalNoteMedication name
266255
+ * @property {string|null} [dosage] ClinicalNoteMedication dosage
266256
+ * @property {string|null} [duration] ClinicalNoteMedication duration
266257
+ * @property {string|null} [rxNormCode] ClinicalNoteMedication rxNormCode
266258
+ * @property {ClinicalNoteMedicationStatus|null} [status] ClinicalNoteMedication status
266259
+ * @property {ClinicalNoteMedicationIntent|null} [intent] ClinicalNoteMedication intent
266260
+ * @property {boolean|null} [reported] ClinicalNoteMedication reported
266261
+ * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
266262
+ */
266263
+
266264
+ /**
266265
+ * Properties of a ClinicalNoteMedication.
266266
+ * @name IClinicalNoteMedication
266267
+ * @interface IClinicalNoteMedication
266268
+ * @augments ClinicalNoteMedication.$Properties
266269
+ * @deprecated Use ClinicalNoteMedication.$Properties instead.
266270
+ */
266271
+
266272
+ /**
266273
+ * Shape of a ClinicalNoteMedication.
266274
+ * @typedef {ClinicalNoteMedication.$Properties} ClinicalNoteMedication.$Shape
266275
+ */
266276
+
266277
+ /**
266278
+ * Constructs a new ClinicalNoteMedication.
266279
+ * @name ClinicalNoteMedication
266280
+ * @classdesc Represents a ClinicalNoteMedication.
266281
+ * @constructor
266282
+ * @param {ClinicalNoteMedication.$Properties=} [properties] Properties to set
266283
+ * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
266284
+ */
266285
+ function ClinicalNoteMedication(properties) {
266286
+ if (properties)
266287
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
266288
+ if (properties[keys[i]] != null && keys[i] !== "__proto__")
266289
+ this[keys[i]] = properties[keys[i]];
266290
+ }
266291
+
266292
+ /**
266293
+ * ClinicalNoteMedication name.
266294
+ * @member {string} name
266295
+ * @memberof ClinicalNoteMedication
266296
+ * @instance
266297
+ */
266298
+ ClinicalNoteMedication.prototype.name = "";
266299
+
266300
+ /**
266301
+ * ClinicalNoteMedication dosage.
266302
+ * @member {string} dosage
266303
+ * @memberof ClinicalNoteMedication
266304
+ * @instance
266305
+ */
266306
+ ClinicalNoteMedication.prototype.dosage = "";
266307
+
266308
+ /**
266309
+ * ClinicalNoteMedication duration.
266310
+ * @member {string} duration
266311
+ * @memberof ClinicalNoteMedication
266312
+ * @instance
266313
+ */
266314
+ ClinicalNoteMedication.prototype.duration = "";
266315
+
266316
+ /**
266317
+ * ClinicalNoteMedication rxNormCode.
266318
+ * @member {string} rxNormCode
266319
+ * @memberof ClinicalNoteMedication
266320
+ * @instance
266321
+ */
266322
+ ClinicalNoteMedication.prototype.rxNormCode = "";
266323
+
266324
+ /**
266325
+ * ClinicalNoteMedication status.
266326
+ * @member {ClinicalNoteMedicationStatus|null|undefined} status
266327
+ * @memberof ClinicalNoteMedication
266328
+ * @instance
266329
+ */
266330
+ ClinicalNoteMedication.prototype.status = null;
266331
+
266332
+ /**
266333
+ * ClinicalNoteMedication intent.
266334
+ * @member {ClinicalNoteMedicationIntent|null|undefined} intent
266335
+ * @memberof ClinicalNoteMedication
266336
+ * @instance
266337
+ */
266338
+ ClinicalNoteMedication.prototype.intent = null;
266339
+
266340
+ /**
266341
+ * ClinicalNoteMedication reported.
266342
+ * @member {boolean|null|undefined} reported
266343
+ * @memberof ClinicalNoteMedication
266344
+ * @instance
266345
+ */
266346
+ ClinicalNoteMedication.prototype.reported = null;
266347
+
266348
+ // OneOf field names bound to virtual getters and setters
266349
+ var $oneOfFields;
266350
+
266351
+ // Virtual OneOf for proto3 optional field
266352
+ Object.defineProperty(ClinicalNoteMedication.prototype, "_status", {
266353
+ get: $util.oneOfGetter($oneOfFields = ["status"]),
266354
+ set: $util.oneOfSetter($oneOfFields)
266355
+ });
266356
+
266357
+ // Virtual OneOf for proto3 optional field
266358
+ Object.defineProperty(ClinicalNoteMedication.prototype, "_intent", {
266359
+ get: $util.oneOfGetter($oneOfFields = ["intent"]),
266360
+ set: $util.oneOfSetter($oneOfFields)
266361
+ });
266362
+
266363
+ // Virtual OneOf for proto3 optional field
266364
+ Object.defineProperty(ClinicalNoteMedication.prototype, "_reported", {
266365
+ get: $util.oneOfGetter($oneOfFields = ["reported"]),
266366
+ set: $util.oneOfSetter($oneOfFields)
266367
+ });
266368
+
266369
+ /**
266370
+ * Creates a new ClinicalNoteMedication instance using the specified properties.
266371
+ * @function create
266372
+ * @memberof ClinicalNoteMedication
266373
+ * @static
266374
+ * @param {ClinicalNoteMedication.$Properties=} [properties] Properties to set
266375
+ * @returns {ClinicalNoteMedication} ClinicalNoteMedication instance
266376
+ * @type {{
266377
+ * (properties: ClinicalNoteMedication.$Shape): ClinicalNoteMedication & ClinicalNoteMedication.$Shape;
266378
+ * (properties?: ClinicalNoteMedication.$Properties): ClinicalNoteMedication;
266379
+ * }}
266380
+ */
266381
+ ClinicalNoteMedication.create = function create(properties) {
266382
+ return new ClinicalNoteMedication(properties);
266383
+ };
266384
+
266385
+ /**
266386
+ * Encodes the specified ClinicalNoteMedication message. Does not implicitly {@link ClinicalNoteMedication.verify|verify} messages.
266387
+ * @function encode
266388
+ * @memberof ClinicalNoteMedication
266389
+ * @static
266390
+ * @param {ClinicalNoteMedication.$Properties} message ClinicalNoteMedication message or plain object to encode
266391
+ * @param {$protobuf.Writer} [writer] Writer to encode to
266392
+ * @returns {$protobuf.Writer} Writer
266393
+ */
266394
+ ClinicalNoteMedication.encode = function encode(message, writer) {
266395
+ if (!writer)
266396
+ writer = $Writer.create();
266397
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
266398
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
266399
+ if (message.dosage != null && Object.hasOwnProperty.call(message, "dosage"))
266400
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.dosage);
266401
+ if (message.duration != null && Object.hasOwnProperty.call(message, "duration"))
266402
+ writer.uint32(/* id 3, wireType 2 =*/26).string(message.duration);
266403
+ if (message.rxNormCode != null && Object.hasOwnProperty.call(message, "rxNormCode"))
266404
+ writer.uint32(/* id 4, wireType 2 =*/34).string(message.rxNormCode);
266405
+ if (message.status != null && Object.hasOwnProperty.call(message, "status"))
266406
+ writer.uint32(/* id 5, wireType 0 =*/40).int32(message.status);
266407
+ if (message.intent != null && Object.hasOwnProperty.call(message, "intent"))
266408
+ writer.uint32(/* id 6, wireType 0 =*/48).int32(message.intent);
266409
+ if (message.reported != null && Object.hasOwnProperty.call(message, "reported"))
266410
+ writer.uint32(/* id 7, wireType 0 =*/56).bool(message.reported);
266411
+ if (message.$unknowns != null && Object.hasOwnProperty.call(message, "$unknowns"))
266412
+ for (var i = 0; i < message.$unknowns.length; ++i)
266413
+ writer.raw(message.$unknowns[i]);
266414
+ return writer;
266415
+ };
266416
+
266417
+ /**
266418
+ * Encodes the specified ClinicalNoteMedication message, length delimited. Does not implicitly {@link ClinicalNoteMedication.verify|verify} messages.
266419
+ * @function encodeDelimited
266420
+ * @memberof ClinicalNoteMedication
266421
+ * @static
266422
+ * @param {ClinicalNoteMedication.$Properties} message ClinicalNoteMedication message or plain object to encode
266423
+ * @param {$protobuf.Writer} [writer] Writer to encode to
266424
+ * @returns {$protobuf.Writer} Writer
266425
+ */
266426
+ ClinicalNoteMedication.encodeDelimited = function encodeDelimited(message, writer) {
266427
+ return this.encode(message, writer).ldelim();
266428
+ };
266429
+
266430
+ /**
266431
+ * Decodes a ClinicalNoteMedication message from the specified reader or buffer.
266432
+ * @function decode
266433
+ * @memberof ClinicalNoteMedication
266434
+ * @static
266435
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
266436
+ * @param {number} [length] Message length if known beforehand
266437
+ * @returns {ClinicalNoteMedication & ClinicalNoteMedication.$Shape} ClinicalNoteMedication
266438
+ * @throws {Error} If the payload is not a reader or valid buffer
266439
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
266440
+ */
266441
+ ClinicalNoteMedication.decode = function decode(reader, length, _end, _depth, _target) {
266442
+ if (!(reader instanceof $Reader))
266443
+ reader = $Reader.create(reader);
266444
+ if (_depth === undefined)
266445
+ _depth = 0;
266446
+ if (_depth > $Reader.recursionLimit)
266447
+ throw Error("max depth exceeded");
266448
+ var end = length === undefined ? reader.len : reader.pos + length, message = _target || new $root.ClinicalNoteMedication(), value;
266449
+ while (reader.pos < end) {
266450
+ var start = reader.pos;
266451
+ var tag = reader.tag();
266452
+ if (tag === _end) {
266453
+ _end = undefined;
266454
+ break;
266455
+ }
266456
+ var wireType = tag & 7;
266457
+ switch (tag >>>= 3) {
266458
+ case 1: {
266459
+ if (wireType !== 2)
266460
+ break;
266461
+ if ((value = reader.string()).length)
266462
+ message.name = value;
266463
+ else
266464
+ delete message.name;
266465
+ continue;
266466
+ }
266467
+ case 2: {
266468
+ if (wireType !== 2)
266469
+ break;
266470
+ if ((value = reader.string()).length)
266471
+ message.dosage = value;
266472
+ else
266473
+ delete message.dosage;
266474
+ continue;
266475
+ }
266476
+ case 3: {
266477
+ if (wireType !== 2)
266478
+ break;
266479
+ if ((value = reader.string()).length)
266480
+ message.duration = value;
266481
+ else
266482
+ delete message.duration;
266483
+ continue;
266484
+ }
266485
+ case 4: {
266486
+ if (wireType !== 2)
266487
+ break;
266488
+ if ((value = reader.string()).length)
266489
+ message.rxNormCode = value;
266490
+ else
266491
+ delete message.rxNormCode;
266492
+ continue;
266493
+ }
266494
+ case 5: {
266495
+ if (wireType !== 0)
266496
+ break;
266497
+ message.status = reader.int32();
266498
+ message._status = "status";
266499
+ continue;
266500
+ }
266501
+ case 6: {
266502
+ if (wireType !== 0)
266503
+ break;
266504
+ message.intent = reader.int32();
266505
+ message._intent = "intent";
266506
+ continue;
266507
+ }
266508
+ case 7: {
266509
+ if (wireType !== 0)
266510
+ break;
266511
+ message.reported = reader.bool();
266512
+ message._reported = "reported";
266513
+ continue;
266514
+ }
266515
+ }
266516
+ reader.skipType(wireType, _depth, tag);
266517
+ $util.makeProp(message, "$unknowns", false);
266518
+ (message.$unknowns || (message.$unknowns = [])).push(reader.raw(start, reader.pos));
266519
+ }
266520
+ if (_end !== undefined)
266521
+ throw Error("missing end group");
266522
+ return message;
266523
+ };
266524
+
266525
+ /**
266526
+ * Decodes a ClinicalNoteMedication message from the specified reader or buffer, length delimited.
266527
+ * @function decodeDelimited
266528
+ * @memberof ClinicalNoteMedication
266529
+ * @static
266530
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
266531
+ * @returns {ClinicalNoteMedication & ClinicalNoteMedication.$Shape} ClinicalNoteMedication
266532
+ * @throws {Error} If the payload is not a reader or valid buffer
266533
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
266534
+ */
266535
+ ClinicalNoteMedication.decodeDelimited = function decodeDelimited(reader) {
266536
+ if (!(reader instanceof $Reader))
266537
+ reader = new $Reader(reader);
266538
+ return this.decode(reader, reader.uint32());
266539
+ };
266540
+
266541
+ /**
266542
+ * Verifies a ClinicalNoteMedication message.
266543
+ * @function verify
266544
+ * @memberof ClinicalNoteMedication
266545
+ * @static
266546
+ * @param {Object.<string,*>} message Plain object to verify
266547
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
266548
+ */
266549
+ ClinicalNoteMedication.verify = function verify(message, _depth) {
266550
+ if (typeof message !== "object" || message === null)
266551
+ return "object expected";
266552
+ if (_depth === undefined)
266553
+ _depth = 0;
266554
+ if (_depth > $util.recursionLimit)
266555
+ return "max depth exceeded";
266556
+ var properties = {};
266557
+ if (message.name != null && message.hasOwnProperty("name"))
266558
+ if (!$util.isString(message.name))
266559
+ return "name: string expected";
266560
+ if (message.dosage != null && message.hasOwnProperty("dosage"))
266561
+ if (!$util.isString(message.dosage))
266562
+ return "dosage: string expected";
266563
+ if (message.duration != null && message.hasOwnProperty("duration"))
266564
+ if (!$util.isString(message.duration))
266565
+ return "duration: string expected";
266566
+ if (message.rxNormCode != null && message.hasOwnProperty("rxNormCode"))
266567
+ if (!$util.isString(message.rxNormCode))
266568
+ return "rxNormCode: string expected";
266569
+ if (message.status != null && message.hasOwnProperty("status")) {
266570
+ properties._status = 1;
266571
+ switch (message.status) {
266572
+ default:
266573
+ return "status: enum value expected";
266574
+ case 0:
266575
+ case 1:
266576
+ case 2:
266577
+ case 3:
266578
+ case 4:
266579
+ case 5:
266580
+ case 6:
266581
+ case 7:
266582
+ break;
266583
+ }
266584
+ }
266585
+ if (message.intent != null && message.hasOwnProperty("intent")) {
266586
+ properties._intent = 1;
266587
+ switch (message.intent) {
266588
+ default:
266589
+ return "intent: enum value expected";
266590
+ case 0:
266591
+ case 1:
266592
+ case 2:
266593
+ case 3:
266594
+ case 4:
266595
+ case 5:
266596
+ break;
266597
+ }
266598
+ }
266599
+ if (message.reported != null && message.hasOwnProperty("reported")) {
266600
+ properties._reported = 1;
266601
+ if (typeof message.reported !== "boolean")
266602
+ return "reported: boolean expected";
266603
+ }
266604
+ return null;
266605
+ };
266606
+
266607
+ /**
266608
+ * Creates a ClinicalNoteMedication message from a plain object. Also converts values to their respective internal types.
266609
+ * @function fromObject
266610
+ * @memberof ClinicalNoteMedication
266611
+ * @static
266612
+ * @param {Object.<string,*>} object Plain object
266613
+ * @returns {ClinicalNoteMedication} ClinicalNoteMedication
266614
+ */
266615
+ ClinicalNoteMedication.fromObject = function fromObject(object, _depth) {
266616
+ if (object instanceof $root.ClinicalNoteMedication)
266617
+ return object;
266618
+ if (_depth === undefined)
266619
+ _depth = 0;
266620
+ if (_depth > $util.recursionLimit)
266621
+ throw Error("max depth exceeded");
266622
+ var message = new $root.ClinicalNoteMedication();
266623
+ if (object.name != null)
266624
+ if (typeof object.name !== "string" || object.name.length)
266625
+ message.name = String(object.name);
266626
+ if (object.dosage != null)
266627
+ if (typeof object.dosage !== "string" || object.dosage.length)
266628
+ message.dosage = String(object.dosage);
266629
+ if (object.duration != null)
266630
+ if (typeof object.duration !== "string" || object.duration.length)
266631
+ message.duration = String(object.duration);
266632
+ if (object.rxNormCode != null)
266633
+ if (typeof object.rxNormCode !== "string" || object.rxNormCode.length)
266634
+ message.rxNormCode = String(object.rxNormCode);
266635
+ switch (object.status) {
266636
+ default:
266637
+ if (typeof object.status === "number") {
266638
+ message.status = object.status;
266639
+ break;
266640
+ }
266641
+ break;
266642
+ case "CLINICAL_NOTE_MEDICATION_STATUS_UNKNOWN":
266643
+ case 0:
266644
+ message.status = 0;
266645
+ break;
266646
+ case "CLINICAL_NOTE_MEDICATION_STATUS_ACTIVE":
266647
+ case 1:
266648
+ message.status = 1;
266649
+ break;
266650
+ case "CLINICAL_NOTE_MEDICATION_STATUS_ON_HOLD":
266651
+ case 2:
266652
+ message.status = 2;
266653
+ break;
266654
+ case "CLINICAL_NOTE_MEDICATION_STATUS_CANCELLED":
266655
+ case 3:
266656
+ message.status = 3;
266657
+ break;
266658
+ case "CLINICAL_NOTE_MEDICATION_STATUS_COMPLETED":
266659
+ case 4:
266660
+ message.status = 4;
266661
+ break;
266662
+ case "CLINICAL_NOTE_MEDICATION_STATUS_ENTERED_IN_ERROR":
266663
+ case 5:
266664
+ message.status = 5;
266665
+ break;
266666
+ case "CLINICAL_NOTE_MEDICATION_STATUS_STOPPED":
266667
+ case 6:
266668
+ message.status = 6;
266669
+ break;
266670
+ case "CLINICAL_NOTE_MEDICATION_STATUS_DRAFT":
266671
+ case 7:
266672
+ message.status = 7;
266673
+ break;
266674
+ }
266675
+ switch (object.intent) {
266676
+ default:
266677
+ if (typeof object.intent === "number") {
266678
+ message.intent = object.intent;
266679
+ break;
266680
+ }
266681
+ break;
266682
+ case "CLINICAL_NOTE_MEDICATION_INTENT_UNKNOWN":
266683
+ case 0:
266684
+ message.intent = 0;
266685
+ break;
266686
+ case "CLINICAL_NOTE_MEDICATION_INTENT_PLAN":
266687
+ case 1:
266688
+ message.intent = 1;
266689
+ break;
266690
+ case "CLINICAL_NOTE_MEDICATION_INTENT_ORDER":
266691
+ case 2:
266692
+ message.intent = 2;
266693
+ break;
266694
+ case "CLINICAL_NOTE_MEDICATION_INTENT_PROPOSAL":
266695
+ case 3:
266696
+ message.intent = 3;
266697
+ break;
266698
+ case "CLINICAL_NOTE_MEDICATION_INTENT_ORIGINAL_ORDER":
266699
+ case 4:
266700
+ message.intent = 4;
266701
+ break;
266702
+ case "CLINICAL_NOTE_MEDICATION_INTENT_OPTION":
266703
+ case 5:
266704
+ message.intent = 5;
266705
+ break;
266706
+ }
266707
+ if (object.reported != null)
266708
+ message.reported = Boolean(object.reported);
266709
+ return message;
266710
+ };
266711
+
266712
+ /**
266713
+ * Creates a plain object from a ClinicalNoteMedication message. Also converts values to other types if specified.
266714
+ * @function toObject
266715
+ * @memberof ClinicalNoteMedication
266716
+ * @static
266717
+ * @param {ClinicalNoteMedication} message ClinicalNoteMedication
266718
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
266719
+ * @returns {Object.<string,*>} Plain object
266720
+ */
266721
+ ClinicalNoteMedication.toObject = function toObject(message, options) {
266722
+ if (!options)
266723
+ options = {};
266724
+ var object = {};
266725
+ if (options.defaults) {
266726
+ object.name = "";
266727
+ object.dosage = "";
266728
+ object.duration = "";
266729
+ object.rxNormCode = "";
266730
+ }
266731
+ if (message.name != null && message.hasOwnProperty("name"))
266732
+ object.name = message.name;
266733
+ if (message.dosage != null && message.hasOwnProperty("dosage"))
266734
+ object.dosage = message.dosage;
266735
+ if (message.duration != null && message.hasOwnProperty("duration"))
266736
+ object.duration = message.duration;
266737
+ if (message.rxNormCode != null && message.hasOwnProperty("rxNormCode"))
266738
+ object.rxNormCode = message.rxNormCode;
266739
+ if (message.status != null && message.hasOwnProperty("status")) {
266740
+ object.status = options.enums === String ? $root.ClinicalNoteMedicationStatus[message.status] === undefined ? message.status : $root.ClinicalNoteMedicationStatus[message.status] : message.status;
266741
+ if (options.oneofs)
266742
+ object._status = "status";
266743
+ }
266744
+ if (message.intent != null && message.hasOwnProperty("intent")) {
266745
+ object.intent = options.enums === String ? $root.ClinicalNoteMedicationIntent[message.intent] === undefined ? message.intent : $root.ClinicalNoteMedicationIntent[message.intent] : message.intent;
266746
+ if (options.oneofs)
266747
+ object._intent = "intent";
266748
+ }
266749
+ if (message.reported != null && message.hasOwnProperty("reported")) {
266750
+ object.reported = message.reported;
266751
+ if (options.oneofs)
266752
+ object._reported = "reported";
266753
+ }
266754
+ return object;
266755
+ };
266756
+
266757
+ /**
266758
+ * Converts this ClinicalNoteMedication to JSON.
266759
+ * @function toJSON
266760
+ * @memberof ClinicalNoteMedication
266761
+ * @instance
266762
+ * @returns {Object.<string,*>} JSON object
266763
+ */
266764
+ ClinicalNoteMedication.prototype.toJSON = function toJSON() {
266765
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
266766
+ };
266767
+
266768
+ /**
266769
+ * Gets the type url for ClinicalNoteMedication
266770
+ * @function getTypeUrl
266771
+ * @memberof ClinicalNoteMedication
266772
+ * @static
266773
+ * @param {string} [prefix] Custom type url prefix, defaults to `"type.googleapis.com"`
266774
+ * @returns {string} The type url
266775
+ */
266776
+ ClinicalNoteMedication.getTypeUrl = function getTypeUrl(prefix) {
266777
+ if (prefix === undefined)
266778
+ prefix = "type.googleapis.com";
266779
+ return prefix + "/ClinicalNoteMedication";
266780
+ };
266781
+
266782
+ return ClinicalNoteMedication;
266783
+ })();
266784
+
265659
266785
  $root.GingerClinicalNotePayload = (function() {
265660
266786
 
265661
266787
  /**
@@ -265671,6 +266797,8 @@ $root.GingerClinicalNotePayload = (function() {
265671
266797
  * @property {string|null} [content] GingerClinicalNotePayload content
265672
266798
  * @property {Array.<string>|null} [icd10Codes] GingerClinicalNotePayload icd10Codes
265673
266799
  * @property {Array.<string>|null} [ds4pCodes] GingerClinicalNotePayload ds4pCodes
266800
+ * @property {Array.<ClinicalNoteAllergy.$Properties>|null} [allergies] GingerClinicalNotePayload allergies
266801
+ * @property {Array.<ClinicalNoteMedication.$Properties>|null} [medications] GingerClinicalNotePayload medications
265674
266802
  * @property {Array.<Uint8Array>} [$unknowns] Unknown fields preserved while decoding
265675
266803
  */
265676
266804
 
@@ -265698,6 +266826,8 @@ $root.GingerClinicalNotePayload = (function() {
265698
266826
  function GingerClinicalNotePayload(properties) {
265699
266827
  this.icd10Codes = [];
265700
266828
  this.ds4pCodes = [];
266829
+ this.allergies = [];
266830
+ this.medications = [];
265701
266831
  if (properties)
265702
266832
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
265703
266833
  if (properties[keys[i]] != null && keys[i] !== "__proto__")
@@ -265784,6 +266914,22 @@ $root.GingerClinicalNotePayload = (function() {
265784
266914
  */
265785
266915
  GingerClinicalNotePayload.prototype.ds4pCodes = $util.emptyArray;
265786
266916
 
266917
+ /**
266918
+ * GingerClinicalNotePayload allergies.
266919
+ * @member {Array.<ClinicalNoteAllergy.$Properties>} allergies
266920
+ * @memberof GingerClinicalNotePayload
266921
+ * @instance
266922
+ */
266923
+ GingerClinicalNotePayload.prototype.allergies = $util.emptyArray;
266924
+
266925
+ /**
266926
+ * GingerClinicalNotePayload medications.
266927
+ * @member {Array.<ClinicalNoteMedication.$Properties>} medications
266928
+ * @memberof GingerClinicalNotePayload
266929
+ * @instance
266930
+ */
266931
+ GingerClinicalNotePayload.prototype.medications = $util.emptyArray;
266932
+
265787
266933
  /**
265788
266934
  * Creates a new GingerClinicalNotePayload instance using the specified properties.
265789
266935
  * @function create
@@ -265834,6 +266980,12 @@ $root.GingerClinicalNotePayload = (function() {
265834
266980
  if (message.ds4pCodes != null && message.ds4pCodes.length)
265835
266981
  for (var i = 0; i < message.ds4pCodes.length; ++i)
265836
266982
  writer.uint32(/* id 10, wireType 2 =*/82).string(message.ds4pCodes[i]);
266983
+ if (message.allergies != null && message.allergies.length)
266984
+ for (var i = 0; i < message.allergies.length; ++i)
266985
+ $root.ClinicalNoteAllergy.encode(message.allergies[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
266986
+ if (message.medications != null && message.medications.length)
266987
+ for (var i = 0; i < message.medications.length; ++i)
266988
+ $root.ClinicalNoteMedication.encode(message.medications[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
265837
266989
  if (message.$unknowns != null && Object.hasOwnProperty.call(message, "$unknowns"))
265838
266990
  for (var i = 0; i < message.$unknowns.length; ++i)
265839
266991
  writer.raw(message.$unknowns[i]);
@@ -265957,6 +267109,22 @@ $root.GingerClinicalNotePayload = (function() {
265957
267109
  message.ds4pCodes.push(reader.string());
265958
267110
  continue;
265959
267111
  }
267112
+ case 11: {
267113
+ if (wireType !== 2)
267114
+ break;
267115
+ if (!(message.allergies && message.allergies.length))
267116
+ message.allergies = [];
267117
+ message.allergies.push($root.ClinicalNoteAllergy.decode(reader, reader.uint32(), undefined, _depth + 1));
267118
+ continue;
267119
+ }
267120
+ case 12: {
267121
+ if (wireType !== 2)
267122
+ break;
267123
+ if (!(message.medications && message.medications.length))
267124
+ message.medications = [];
267125
+ message.medications.push($root.ClinicalNoteMedication.decode(reader, reader.uint32(), undefined, _depth + 1));
267126
+ continue;
267127
+ }
265960
267128
  }
265961
267129
  reader.skipType(wireType, _depth, tag);
265962
267130
  $util.makeProp(message, "$unknowns", false);
@@ -266052,6 +267220,24 @@ $root.GingerClinicalNotePayload = (function() {
266052
267220
  if (!$util.isString(message.ds4pCodes[i]))
266053
267221
  return "ds4pCodes: string[] expected";
266054
267222
  }
267223
+ if (message.allergies != null && message.hasOwnProperty("allergies")) {
267224
+ if (!Array.isArray(message.allergies))
267225
+ return "allergies: array expected";
267226
+ for (var i = 0; i < message.allergies.length; ++i) {
267227
+ var error = $root.ClinicalNoteAllergy.verify(message.allergies[i], _depth + 1);
267228
+ if (error)
267229
+ return "allergies." + error;
267230
+ }
267231
+ }
267232
+ if (message.medications != null && message.hasOwnProperty("medications")) {
267233
+ if (!Array.isArray(message.medications))
267234
+ return "medications: array expected";
267235
+ for (var i = 0; i < message.medications.length; ++i) {
267236
+ var error = $root.ClinicalNoteMedication.verify(message.medications[i], _depth + 1);
267237
+ if (error)
267238
+ return "medications." + error;
267239
+ }
267240
+ }
266055
267241
  return null;
266056
267242
  };
266057
267243
 
@@ -266143,6 +267329,26 @@ $root.GingerClinicalNotePayload = (function() {
266143
267329
  for (var i = 0; i < object.ds4pCodes.length; ++i)
266144
267330
  message.ds4pCodes[i] = String(object.ds4pCodes[i]);
266145
267331
  }
267332
+ if (object.allergies) {
267333
+ if (!Array.isArray(object.allergies))
267334
+ throw TypeError(".GingerClinicalNotePayload.allergies: array expected");
267335
+ message.allergies = Array(object.allergies.length);
267336
+ for (var i = 0; i < object.allergies.length; ++i) {
267337
+ if (typeof object.allergies[i] !== "object")
267338
+ throw TypeError(".GingerClinicalNotePayload.allergies: object expected");
267339
+ message.allergies[i] = $root.ClinicalNoteAllergy.fromObject(object.allergies[i], _depth + 1);
267340
+ }
267341
+ }
267342
+ if (object.medications) {
267343
+ if (!Array.isArray(object.medications))
267344
+ throw TypeError(".GingerClinicalNotePayload.medications: array expected");
267345
+ message.medications = Array(object.medications.length);
267346
+ for (var i = 0; i < object.medications.length; ++i) {
267347
+ if (typeof object.medications[i] !== "object")
267348
+ throw TypeError(".GingerClinicalNotePayload.medications: object expected");
267349
+ message.medications[i] = $root.ClinicalNoteMedication.fromObject(object.medications[i], _depth + 1);
267350
+ }
267351
+ }
266146
267352
  return message;
266147
267353
  };
266148
267354
 
@@ -266162,6 +267368,8 @@ $root.GingerClinicalNotePayload = (function() {
266162
267368
  if (options.arrays || options.defaults) {
266163
267369
  object.icd10Codes = [];
266164
267370
  object.ds4pCodes = [];
267371
+ object.allergies = [];
267372
+ object.medications = [];
266165
267373
  }
266166
267374
  if (options.defaults) {
266167
267375
  object.noteId = "";
@@ -266199,6 +267407,16 @@ $root.GingerClinicalNotePayload = (function() {
266199
267407
  for (var j = 0; j < message.ds4pCodes.length; ++j)
266200
267408
  object.ds4pCodes[j] = message.ds4pCodes[j];
266201
267409
  }
267410
+ if (message.allergies && message.allergies.length) {
267411
+ object.allergies = Array(message.allergies.length);
267412
+ for (var j = 0; j < message.allergies.length; ++j)
267413
+ object.allergies[j] = $root.ClinicalNoteAllergy.toObject(message.allergies[j], options);
267414
+ }
267415
+ if (message.medications && message.medications.length) {
267416
+ object.medications = Array(message.medications.length);
267417
+ for (var j = 0; j < message.medications.length; ++j)
267418
+ object.medications[j] = $root.ClinicalNoteMedication.toObject(message.medications[j], options);
267419
+ }
266202
267420
  return object;
266203
267421
  };
266204
267422
 
@@ -274023,18 +275241,20 @@ $root.OnboardingSecondaryInterest = (function() {
274023
275241
  * @name OnboardingDifficultyImpact
274024
275242
  * @enum {number}
274025
275243
  * @property {number} ONBOARDING_DIFFICULTY_IMPACT_UNKNOWN=0 ONBOARDING_DIFFICULTY_IMPACT_UNKNOWN value
274026
- * @property {number} ONBOARDING_DIFFICULTY_IMPACT_NOT_AT_ALL=1 ONBOARDING_DIFFICULTY_IMPACT_NOT_AT_ALL value
275244
+ * @property {number} ONBOARDING_DIFFICULTY_IMPACT_NOT_VERY_DIFFICULT=1 ONBOARDING_DIFFICULTY_IMPACT_NOT_VERY_DIFFICULT value
274027
275245
  * @property {number} ONBOARDING_DIFFICULTY_IMPACT_SOMEWHAT_DIFFICULT=2 ONBOARDING_DIFFICULTY_IMPACT_SOMEWHAT_DIFFICULT value
274028
275246
  * @property {number} ONBOARDING_DIFFICULTY_IMPACT_VERY_DIFFICULT=3 ONBOARDING_DIFFICULTY_IMPACT_VERY_DIFFICULT value
274029
275247
  * @property {number} ONBOARDING_DIFFICULTY_IMPACT_EXTREMELY_DIFFICULT=4 ONBOARDING_DIFFICULTY_IMPACT_EXTREMELY_DIFFICULT value
275248
+ * @property {number} ONBOARDING_DIFFICULTY_IMPACT_A_LITTLE_DIFFICULT=5 ONBOARDING_DIFFICULTY_IMPACT_A_LITTLE_DIFFICULT value
274030
275249
  */
274031
275250
  $root.OnboardingDifficultyImpact = (function() {
274032
275251
  var valuesById = {}, values = Object.create(valuesById);
274033
275252
  values[valuesById[0] = "ONBOARDING_DIFFICULTY_IMPACT_UNKNOWN"] = 0;
274034
- values[valuesById[1] = "ONBOARDING_DIFFICULTY_IMPACT_NOT_AT_ALL"] = 1;
275253
+ values[valuesById[1] = "ONBOARDING_DIFFICULTY_IMPACT_NOT_VERY_DIFFICULT"] = 1;
274035
275254
  values[valuesById[2] = "ONBOARDING_DIFFICULTY_IMPACT_SOMEWHAT_DIFFICULT"] = 2;
274036
275255
  values[valuesById[3] = "ONBOARDING_DIFFICULTY_IMPACT_VERY_DIFFICULT"] = 3;
274037
275256
  values[valuesById[4] = "ONBOARDING_DIFFICULTY_IMPACT_EXTREMELY_DIFFICULT"] = 4;
275257
+ values[valuesById[5] = "ONBOARDING_DIFFICULTY_IMPACT_A_LITTLE_DIFFICULT"] = 5;
274038
275258
  return values;
274039
275259
  })();
274040
275260
 
@@ -274393,6 +275613,7 @@ $root.OnboardingGoalSettingCompleted = (function() {
274393
275613
  case 2:
274394
275614
  case 3:
274395
275615
  case 4:
275616
+ case 5:
274396
275617
  break;
274397
275618
  }
274398
275619
  if (message.goalLastUpdatedAt != null && message.hasOwnProperty("goalLastUpdatedAt"))
@@ -274551,7 +275772,7 @@ $root.OnboardingGoalSettingCompleted = (function() {
274551
275772
  case 0:
274552
275773
  message.difficultyImpact = 0;
274553
275774
  break;
274554
- case "ONBOARDING_DIFFICULTY_IMPACT_NOT_AT_ALL":
275775
+ case "ONBOARDING_DIFFICULTY_IMPACT_NOT_VERY_DIFFICULT":
274555
275776
  case 1:
274556
275777
  message.difficultyImpact = 1;
274557
275778
  break;
@@ -274567,6 +275788,10 @@ $root.OnboardingGoalSettingCompleted = (function() {
274567
275788
  case 4:
274568
275789
  message.difficultyImpact = 4;
274569
275790
  break;
275791
+ case "ONBOARDING_DIFFICULTY_IMPACT_A_LITTLE_DIFFICULT":
275792
+ case 5:
275793
+ message.difficultyImpact = 5;
275794
+ break;
274570
275795
  }
274571
275796
  if (object.goalLastUpdatedAt != null)
274572
275797
  if (typeof object.goalLastUpdatedAt === "object" ? object.goalLastUpdatedAt.low || object.goalLastUpdatedAt.high : Number(object.goalLastUpdatedAt) !== 0)