@medplum/core 0.9.20 → 0.9.21

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.
@@ -816,6 +816,54 @@ export declare class MedplumClient extends EventTarget {
816
816
  * @returns The result of the delete operation.
817
817
  */
818
818
  deleteResource(resourceType: ResourceType, id: string): Promise<any>;
819
+ /**
820
+ * Executes a batch or transaction of FHIR operations.
821
+ *
822
+ * Example:
823
+ *
824
+ * ```typescript
825
+ * await medplum.executeBatch({
826
+ * "resourceType": "Bundle",
827
+ * "type": "transaction",
828
+ * "entry": [
829
+ * {
830
+ * "fullUrl": "urn:uuid:61ebe359-bfdc-4613-8bf2-c5e300945f0a",
831
+ * "resource": {
832
+ * "resourceType": "Patient",
833
+ * "name": [{ "use": "official", "given": ["Alice"], "family": "Smith" }],
834
+ * "gender": "female",
835
+ * "birthDate": "1974-12-25"
836
+ * },
837
+ * "request": {
838
+ * "method": "POST",
839
+ * "url": "Patient"
840
+ * }
841
+ * },
842
+ * {
843
+ * "fullUrl": "urn:uuid:88f151c0-a954-468a-88bd-5ae15c08e059",
844
+ * "resource": {
845
+ * "resourceType": "Patient",
846
+ * "identifier": [{ "system": "http:/example.org/fhir/ids", "value": "234234" }],
847
+ * "name": [{ "use": "official", "given": ["Bob"], "family": "Jones" }],
848
+ * "gender": "male",
849
+ * "birthDate": "1974-12-25"
850
+ * },
851
+ * "request": {
852
+ * "method": "POST",
853
+ * "url": "Patient",
854
+ * "ifNoneExist": "identifier=http:/example.org/fhir/ids|234234"
855
+ * }
856
+ * }
857
+ * ]
858
+ * });
859
+ * ```
860
+ *
861
+ * See The FHIR "batch/transaction" section for full details: https://hl7.org/fhir/http.html#transaction
862
+ *
863
+ * @param bundle The FHIR batch/transaction bundle.
864
+ * @returns The FHIR batch/transaction response bundle.
865
+ */
866
+ executeBatch(bundle: Bundle): Promise<Bundle>;
819
867
  /**
820
868
  * Sends an email using the Medplum Email API.
821
869
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medplum/core",
3
- "version": "0.9.20",
3
+ "version": "0.9.21",
4
4
  "description": "Medplum TS/JS Library",
5
5
  "author": "Medplum <hello@medplum.com>",
6
6
  "license": "Apache-2.0",
@@ -17,8 +17,8 @@
17
17
  "test": "jest"
18
18
  },
19
19
  "devDependencies": {
20
- "@medplum/definitions": "0.9.20",
21
- "@medplum/fhirtypes": "0.9.20"
20
+ "@medplum/definitions": "0.9.21",
21
+ "@medplum/fhirtypes": "0.9.21"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "pdfmake": "0.2.5"