// Job ID: #69aa175e487d3f7778f6e0c1
using OI.Service.HangfireTask;
var packingFoilTask = Activate<PackingFoilTask>();
await packingFoilTask.ExecuteUpdateDrug(
"67d9f6e2af648e0accf00131",
FromJson<Drug>("{\"DrugName\":\"LISINOPRIL (AN) 20mg TAB\",\"DrugCode\":\"LISI55\",\"Austr\":\"152714\",\"Supplier\":\"AMNEAL PHARMACEUTICALS PT\",\"Type\":\"Tablet\",\"Color\":\"pink\",\"Shape\":\"round\",\"Marking\":\"20 BL\",\"Warning\":\"*May affect alertness and/or co-ordination. If affected, do not drive or operate machinery*May cause dizziness when standing up quickly*DO NOT TAKE POTASSIUM while being treated with this medicine unless advised by your Doctor*PREGNANCY WARNING - Category DSpecial handling and disposal required - ask your Pharmacistswallowed whole*Do not crush or chew*\",\"Direction\":\"\",\"GenericCode\":\"LIS3\",\"GenericName\":\"LISINOPRIL\",\"Presentation\":\"Used mainly in the treatment of hypertension (high blood pressure) and heart failure.Also used in some people with diabetes, for some forms of kidney disease, and after a heart attack to help protect the heart.\",\"ImageId\":\"5f3a2d8fa0ba5d7c50795571\",\"ImageSmallSizeId\":\"68f599455a506b941b5c8f0d\",\"ImageName\":\"152714-C01-01-BL600.jpg\",\"AltBrand\":\"PRINIVIL 20, ZESTRIL, LISINOPRIL (TPX BASE), LISODUR, LISINOPRIL-BC, FIBSOL, LISINOPRIL (GENRX), LISINOPRIL (CHEM-MART), LISINOPRIL (HEALTHSENSE), LISINOPRIL (TW), LIPRACE, LISINOPRIL (HEXAL), LISINOBELL, LISINOPRIL (CR), LISINOPRIL (WINTHROP), LISINOPRIL (GEN HLTH), LISINOTRUST, LISINOPRIL (APO), LISINOPRIL (RANBAXY), LISINOPRIL (GA), LISINOPRIL (SANDOZ), LISINOPRIL (DRLA), LISINOPRIL (PS), ZINOPRIL, LISINOPRIL (AURO), LISINOPRIL (AN), LISINOPRIL (WGR)\",\"DoNotCrush\":true,\"TradeName\":\"LISINOPRIL (AN)\",\"Formulation\":\"TAB\",\"Strength\":\"20mg\",\"Schedule\":\"4\",\"PackSize\":30,\"IsCytotoxic\":false,\"Authorized\":0,\"TSAuthorized\":\"0001-01-01T00:00:00Z\",\"ShelfLife\":1,\"Description\":\"round pink 20 BL\",\"UsePrintingDrugName\":false,\"PrintingDrugName\":\"\",\"PharmacyId\":\"67d9f6e2af648e0accf00131\",\"Route\":{\"Code\":\"PO\",\"Description\":\"Oral\"},\"OriginValues\":\"{\\"Authorized\\":2,\\"ShelfLife\\":0,\\"Route\\":null}\",\"Usage\":0,\"DrugFullName\":\"LISINOPRIL (AN) 20mg TAB\",\"MedicationFullDetails\":\"LISINOPRIL (AN) 20mg TAB - LISINOPRIL (LISI55)\",\"Id\":\"5f0e69e0a0ba5db368a16fcb\",\"CreatedDate\":\"2020-07-15T02:28:45.689Z\",\"CreatedUserId\":\"5e7457052a22160c3cf31edb\",\"LastUpdateUserId\":\"67eb2b1f08efed0b7099fd06\",\"LastUpdateDate\":\"2026-03-05T23:53:02.6176979Z\",\"UpdateDeletedDate\":\"1900-01-01T00:00:00Z\",\"IsDeleted\":false}"));
"en-US""en-US"An exception occurred during performance of the job.
An error occurred while serializing the Drug property of class OI.Domain.Prescription: An error occurred while serializing the UsePrintingDrugName property of class OI.Domain.Drug: Exception of type 'System.OutOfMemoryException' was thrown.
MongoDB.Bson.BsonSerializationException: An error occurred while serializing the Drug property of class OI.Domain.Prescription: An error occurred while serializing the UsePrintingDrugName property of class OI.Domain.Drug: Exception of type 'System.OutOfMemoryException' was thrown. ---> MongoDB.Bson.BsonSerializationException: An error occurred while serializing the UsePrintingDrugName property of class OI.Domain.Drug: Exception of type 'System.OutOfMemoryException' was thrown. ---> System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown. at lambda_method(Closure , Object ) at MongoDB.Bson.Serialization.BsonClassMapSerializer`1.SerializeNormalMember(BsonSerializationContext context, Object obj, BsonMemberMap memberMap) at MongoDB.Bson.Serialization.BsonClassMapSerializer`1.SerializeMember(BsonSerializationContext context, Object obj, BsonMemberMap memberMap) --- End of inner exception stack trace --- at MongoDB.Bson.Serialization.BsonClassMapSerializer`1.SerializeMember(BsonSerializationContext context, Object obj, BsonMemberMap memberMap) at MongoDB.Bson.Serialization.BsonClassMapSerializer`1.SerializeClass(BsonSerializationContext context, BsonSerializationArgs args, TClass document) at MongoDB.Bson.Serialization.BsonClassMapSerializer`1.Serialize(BsonSerializationContext context, BsonSerializationArgs args, TClass value) at MongoDB.Bson.Serialization.Serializers.SerializerBase`1.MongoDB.Bson.Serialization.IBsonSerializer.Serialize(BsonSerializationContext context, BsonSerializationArgs args, Object value) at MongoDB.Bson.Serialization.IBsonSerializerExtensions.Serialize(IBsonSerializer serializer, BsonSerializationContext context, Object value) at MongoDB.Bson.Serialization.BsonClassMapSerializer`1.SerializeNormalMember(BsonSerializationContext context, Object obj, BsonMemberMap memberMap) at MongoDB.Bson.Serialization.BsonClassMapSerializer`1.SerializeMember(BsonSerializationContext context, Object obj, BsonMemberMap memberMap) --- End of inner exception stack trace --- at MongoDB.Bson.Serialization.BsonClassMapSerializer`1.SerializeMember(BsonSerializationContext context, Object obj, BsonMemberMap memberMap) at MongoDB.Bson.Serialization.BsonClassMapSerializer`1.SerializeClass(BsonSerializationContext context, BsonSerializationArgs args, TClass document) at MongoDB.Bson.Serialization.BsonClassMapSerializer`1.Serialize(BsonSerializationContext context, BsonSerializationArgs args, TClass value) at MongoDB.Bson.Serialization.IBsonSerializerExtensions.Serialize[TValue](IBsonSerializer`1 serializer, BsonSerializationContext context, TValue value) at MongoDB.Bson.Serialization.Serializers.EnumerableSerializerBase`2.Serialize(BsonSerializationContext context, BsonSerializationArgs args, TValue value) at MongoDB.Bson.Serialization.IBsonSerializerExtensions.Serialize[TValue](IBsonSerializer`1 serializer, BsonSerializationContext context, TValue value) at MongoDB.Driver.OperatorUpdateDefinition`2.Render(IBsonSerializer`1 documentSerializer, IBsonSerializerRegistry serializerRegistry, LinqProvider linqProvider) at MongoDB.Driver.MongoCollectionImpl`1.ConvertWriteModelToWriteRequest(WriteModel`1 model, Int32 index) at System.Linq.Enumerable.<SelectIterator>d__5`2.MoveNext() at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source) at MongoDB.Driver.Core.Operations.BulkMixedWriteOperation..ctor(CollectionNamespace collectionNamespace, IEnumerable`1 requests, MessageEncoderSettings messageEncoderSettings) at MongoDB.Driver.MongoCollectionImpl`1.CreateBulkWriteOperation(IClientSessionHandle session, IEnumerable`1 requests, BulkWriteOptions options) at MongoDB.Driver.MongoCollectionImpl`1.<BulkWriteAsync>d__31.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at MongoDB.Driver.MongoCollectionImpl`1.<UsingImplicitSessionAsync>d__107`1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at OI.Data.MongoDBRepository`1.<BulkWriteAsync>d__15.MoveNext() in C:\Program Files (x86)\Jenkins\workspace\myPak-webjob-live\OI\OI.Data\MongoDBRepository.cs:line 166 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at OI.Service.HangfireTask.PackingFoilTask.<BulkUpdate>d__7.MoveNext() in C:\Program Files (x86)\Jenkins\workspace\myPak-webjob-live\OI\OI.Service\HangfireTask\PackingFoil\PackingFoilTask.cs:line 89 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at OI.Service.HangfireTask.PackingFoilTask.<ExecuteUpdateDrug>d__6.MoveNext() in C:\Program Files (x86)\Jenkins\workspace\myPak-webjob-live\OI\OI.Service\HangfireTask\PackingFoil\PackingFoilTask.cs:line 69