// Job ID: #6900404158652f6f2e00e443
using OI.Service.HangfireTask;
var packingFoilTask = Activate<PackingFoilTask>();
await packingFoilTask.ExecuteUpdateDrug(
"6840d2a408efed0f0c610cb4",
FromJson<Drug>("{\"DrugName\":\"PERINDOPRIL AMLODIPINE (APO) 10mg/10mg TAB\",\"DrugCode\":\"PERI67\",\"Austr\":\"224300\",\"Supplier\":\"APOTEX PTY LTD\",\"Type\":\"Tablet\",\"Color\":\"white to off-white\",\"Shape\":\"round\",\"Marking\":\"10/10\",\"Warning\":\"*Do NOT stop taking this medication abruptly*DO NOT TAKE POTASSIUM while being treated with this medicine unless advised by your Doctor**May affect alertness and/or co-ordination. If affected, do not drive or operate machinery*May cause dizziness when standing up quickly*Certain foods and fruit juices should be avoided while being treated with this medicineSpecial handling and disposal required - ask your Pharmacistswallowed wholePREGNANCY WARNING - Category D\",\"Direction\":\"\",\"GenericCode\":\"PEAM4\",\"GenericName\":\"PERINDOPRIL ARG/AMLODIPINE\",\"Presentation\":\"\",\"ImageId\":\"5f3a2db6a0ba5d7c50796b46\",\"ImageSmallSizeId\":\"68f599735a506b941b5c91a0\",\"ImageName\":\"224300-C01-01-BL600.jpg\",\"AltBrand\":\"COVERAM 10/10, REAPTAN 10/10, DEFLECTUM 10/10, DYNOVAL 10/10, PERINDOPRIL AMLODIPINE (APO), PERINDOPRIL AMLODIPINE (BLOOMS, PERINDOPRIL AMLODIPINE (CMART), PERINDOPRIL AMLODIPINE (TW), PERINDOPRIL AMLODIPINE (APX), PERINDOPRIL AMLODIPINE (WGR)\",\"DoNotCrush\":true,\"TradeName\":\"PERINDOPRIL AMLODIPINE (APO)\",\"Formulation\":\"TAB\",\"Strength\":\"10mg/10mg\",\"Schedule\":\"4\",\"PackSize\":30,\"IsCytotoxic\":false,\"Authorized\":2,\"TSAuthorized\":\"0001-01-01T00:00:00Z\",\"ShelfLife\":1,\"Description\":\"white to off-white round 10/10\",\"UsePrintingDrugName\":false,\"PrintingDrugName\":\"\",\"PharmacyId\":\"6840d2a408efed0f0c610cb4\",\"Route\":{\"Code\":\"PO\",\"Description\":\"Oral\"},\"OriginValues\":\"{\\"Authorized\\":0,\\"ShelfLife\\":0,\\"Route\\":null}\",\"Usage\":0,\"DrugFullName\":\"PERINDOPRIL AMLODIPINE (APO) 10mg/10mg TAB\",\"MedicationFullDetails\":\"PERINDOPRIL AMLODIPINE (APO) 10mg/10mg TAB - PERINDOPRIL ARG/AMLODIPINE (PERI67)\",\"Id\":\"5f0e69e0a0ba5db368a1745e\",\"CreatedDate\":\"2020-07-15T02:28:46.695Z\",\"CreatedUserId\":\"5e7457052a22160c3cf31edb\",\"LastUpdateUserId\":\"6840f627a7ab95045cb85f69\",\"LastUpdateDate\":\"2025-10-28T04:02:09.0376798Z\",\"UpdateDeletedDate\":\"1900-01-01T00:00:00Z\",\"IsDeleted\":false}"));
"en-US""en-US"An exception occurred during performance of the job.
Exception of type 'System.OutOfMemoryException' was thrown.
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown. at MongoDB.Driver.Linq.Linq3Implementation.LinqProviderAdapterV3.TranslateExpressionToField[TDocument,TField](Expression`1 expression, IBsonSerializer`1 documentSerializer, IBsonSerializerRegistry serializerRegistry, Boolean allowScalarValueForArrayField) at MongoDB.Driver.ExpressionFieldDefinition`2.Render(IBsonSerializer`1 documentSerializer, IBsonSerializerRegistry serializerRegistry, LinqProvider linqProvider, Boolean allowScalarValueForArrayField) at MongoDB.Driver.SimpleFilterDefinition`2.Render(IBsonSerializer`1 documentSerializer, IBsonSerializerRegistry serializerRegistry, LinqProvider linqProvider) at MongoDB.Driver.AndFilterDefinition`1.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