@natch-the-storage/heathershaw-platform-types 1.19.19 → 1.20.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.
@@ -663,6 +663,12 @@ export declare const CompoundDirectAnimalId: {
663
663
  };
664
664
  };
665
665
  export declare const AnimalSpeciesKeys: [keyof typeof CompoundDirectAnimalId, ...(keyof typeof CompoundDirectAnimalId)[]];
666
+ export interface CDEPrescription {
667
+ type: string;
668
+ /** If true, indicates this is an eRx script, if false or undefined, assume it is a paper script */
669
+ isETP2?: boolean;
670
+ fileUrl?: string;
671
+ }
666
672
  export interface CDScriptPriceOption {
667
673
  id: number;
668
674
  quantity: number;
@@ -723,10 +729,7 @@ export interface CDScript {
723
729
  repeatsTotal: number;
724
730
  repeatsLeft: number;
725
731
  supplyNumber: number;
726
- ePrescription?: {
727
- type: string;
728
- isETP2?: boolean; /** If true, indicates this is an eRx script, if false or undefined, assume it is a paper script */
729
- };
732
+ ePrescription?: CDEPrescription;
730
733
  };
731
734
  formulation: {
732
735
  formulationId: number;
@@ -738,6 +741,117 @@ export interface CDScript {
738
741
  };
739
742
  itemCount: number;
740
743
  }
744
+ export interface CDDispensedScript {
745
+ scriptId: number;
746
+ scriptNumber: number;
747
+ scriptBarcode: string;
748
+ scriptType: string;
749
+ name: string;
750
+ quantity: number;
751
+ itemCount: number;
752
+ isReorderable: boolean;
753
+ isArchived: boolean;
754
+ disableRiskAssessment: boolean;
755
+ comment?: string;
756
+ notes?: string;
757
+ draftScriptId?: number;
758
+ compound: Pick<CDFormulation, 'formulationId' | 'isCapsule' | 'unit' | 'dosageFormName'> & {
759
+ /** Expiry date of compounded product - ISO timestamp */
760
+ productExpiryDate: string;
761
+ expiryDays: number;
762
+ };
763
+ prescription: {
764
+ originalScriptNumber: string;
765
+ instructions: string;
766
+ /** yyyy-mm-dd ISO date */
767
+ datePrescribed?: string;
768
+ isExpired: boolean;
769
+ repeatsLeft: number;
770
+ repeatsTotal: number;
771
+ supplyNumber: number;
772
+ isRepeatDispensed: boolean;
773
+ /** Rx expiry date - yyyy-mm-dd ISO date */
774
+ expiryDate?: string;
775
+ customer?: CDCustomer;
776
+ additionalSupplyNumber: number;
777
+ comment?: '';
778
+ labelInstructions?: '';
779
+ ePrescription?: CDEPrescription;
780
+ };
781
+ /** Date a pharmacist has dispensed the script - ISO timestamp yyyy-mm-ddThh:mm:ss.000Z */
782
+ dateDispensed: string;
783
+ /** Date the script was generated - ISO timestamp yyyy-mm-ddThh:mm:ss.000Z */
784
+ createdDate: string;
785
+ /** ISO timestamp yyyy-mm-ddThh:mm:ss.000Z */
786
+ modifiedDate: string;
787
+ formulationProperties: CDScriptProperties[];
788
+ repeatChain: CDDispensedScriptRepeatChain[];
789
+ }
790
+ export interface CDDispensedScriptRepeatChain {
791
+ key: string;
792
+ repeatsLeft: number;
793
+ isDeleted: boolean;
794
+ isEmpty: boolean;
795
+ /** Supply number of the item. */
796
+ supplyNumber?: number;
797
+ /** Script number of the item */
798
+ number?: string;
799
+ quantity?: number | string;
800
+ date?: string;
801
+ draftScriptId?: number;
802
+ dispensedScriptId?: number;
803
+ }
804
+ /** The script item retrieved from a customer_scripts search on compound direct */
805
+ export interface CDSearchScripts {
806
+ key: string;
807
+ id: number;
808
+ isDispensed: boolean;
809
+ scriptType: 'compound' | 'stockProduct' | 'retail' | 'drug' | 'externalBatchStock';
810
+ price: number;
811
+ repeatsLeft: number;
812
+ repeatsTotal: number;
813
+ labelName: string;
814
+ /** Dispensing instructions / SIG */
815
+ instructions: string;
816
+ isRepeatDispensed: boolean;
817
+ /** Quantity on the script */
818
+ quantity: number;
819
+ /** Number of items on the script. */
820
+ itemCount: number;
821
+ /** Date and time the record was created
822
+ * ISO timestamp yyyy-mm-ddThh:mm:ss.000Z */
823
+ createdDate: string;
824
+ /** Whether the script can be reordered */
825
+ isReorderable: boolean;
826
+ /** Whether the script is archived */
827
+ isArchived: boolean;
828
+ /** Whether the script is expired */
829
+ isExpired: boolean;
830
+ draftScriptId?: number;
831
+ dispensedScriptId?: number;
832
+ isEPrescription?: boolean;
833
+ unit?: string;
834
+ /** ISO timestamp yyyy-mm-ddThh:mm:ss.000Z */
835
+ dateDispensed?: '2026-06-19T06:29:02.000Z';
836
+ /** ISO date - yyyy-mm-dd */
837
+ datePrescribed?: string;
838
+ supplyNumber?: number;
839
+ totalQuantityPrescribed?: number;
840
+ totalQuantityRemaining?: number;
841
+ minimumInterval?: number;
842
+ deferred?: boolean;
843
+ owing?: boolean;
844
+ originalQuantity?: number;
845
+ isVariableSupply?: boolean;
846
+ /** ISO date - yyyy-mm-dd */
847
+ expiryDate?: string;
848
+ /** Number of days the supply covers */
849
+ daysSupply?: 30;
850
+ refillReminderEnabled?: boolean;
851
+ /** Default next refill reminder date
852
+ * ISO date - yyyy-mm-dd */
853
+ defaultNextRefillReminderDate?: string;
854
+ }
741
855
  /**
742
856
  * A customer object from Compound Direct
743
857
  * @dateOfBirth IsoDateString, only date portion
@@ -756,7 +870,7 @@ export interface CDCustomer {
756
870
  email: string;
757
871
  createdDate: string;
758
872
  modifiedDate: string;
759
- isAnimal: false;
873
+ isAnimal: boolean;
760
874
  dateOfBirth: string;
761
875
  isMobileInvalid: boolean;
762
876
  note: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@natch-the-storage/heathershaw-platform-types",
3
- "version": "1.19.19",
3
+ "version": "1.20.0",
4
4
  "description": "Interfaces and routes to use on the client",
5
5
  "license": "ISC",
6
6
  "author": "Natch Surana",