@awell-health/awell-extensions 1.0.233 → 1.0.234

Sign up to get free protection for your applications and to get access to all the features.
Files changed (160) hide show
  1. package/dist/extensions/index.js +2 -0
  2. package/dist/extensions/index.js.map +1 -1
  3. package/dist/extensions/markdown.json +4 -0
  4. package/dist/extensions/medplum/actions/createPatient/config/dataPoints.d.ts +6 -0
  5. package/dist/extensions/medplum/actions/createPatient/config/dataPoints.js +10 -0
  6. package/dist/extensions/medplum/actions/createPatient/config/dataPoints.js.map +1 -0
  7. package/dist/extensions/medplum/actions/createPatient/config/fields.d.ts +119 -0
  8. package/dist/extensions/medplum/actions/createPatient/config/fields.js +87 -0
  9. package/dist/extensions/medplum/actions/createPatient/config/fields.js.map +1 -0
  10. package/dist/extensions/medplum/actions/createPatient/config/index.d.ts +2 -0
  11. package/dist/extensions/medplum/actions/createPatient/config/index.js +19 -0
  12. package/dist/extensions/medplum/actions/createPatient/config/index.js.map +1 -0
  13. package/dist/extensions/medplum/actions/createPatient/createPatient.d.ts +4 -0
  14. package/dist/extensions/medplum/actions/createPatient/createPatient.js +84 -0
  15. package/dist/extensions/medplum/actions/createPatient/createPatient.js.map +1 -0
  16. package/dist/extensions/medplum/actions/createPatient/createPatient.test.d.ts +1 -0
  17. package/dist/extensions/medplum/actions/createPatient/createPatient.test.js +47 -0
  18. package/dist/extensions/medplum/actions/createPatient/createPatient.test.js.map +1 -0
  19. package/dist/extensions/medplum/actions/createPatient/index.d.ts +1 -0
  20. package/dist/extensions/medplum/actions/createPatient/index.js +6 -0
  21. package/dist/extensions/medplum/actions/createPatient/index.js.map +1 -0
  22. package/dist/extensions/medplum/actions/createServiceRequest/config/dataPoints.d.ts +6 -0
  23. package/dist/extensions/medplum/actions/createServiceRequest/config/dataPoints.js +10 -0
  24. package/dist/extensions/medplum/actions/createServiceRequest/config/dataPoints.js.map +1 -0
  25. package/dist/extensions/medplum/actions/createServiceRequest/config/fields.d.ts +48 -0
  26. package/dist/extensions/medplum/actions/createServiceRequest/config/fields.js +37 -0
  27. package/dist/extensions/medplum/actions/createServiceRequest/config/fields.js.map +1 -0
  28. package/dist/extensions/medplum/actions/createServiceRequest/config/index.d.ts +2 -0
  29. package/dist/extensions/medplum/actions/createServiceRequest/config/index.js +19 -0
  30. package/dist/extensions/medplum/actions/createServiceRequest/config/index.js.map +1 -0
  31. package/dist/extensions/medplum/actions/createServiceRequest/createServiceRequest.d.ts +4 -0
  32. package/dist/extensions/medplum/actions/createServiceRequest/createServiceRequest.js +44 -0
  33. package/dist/extensions/medplum/actions/createServiceRequest/createServiceRequest.js.map +1 -0
  34. package/dist/extensions/medplum/actions/createServiceRequest/createServiceRequest.test.d.ts +1 -0
  35. package/dist/extensions/medplum/actions/createServiceRequest/createServiceRequest.test.js +40 -0
  36. package/dist/extensions/medplum/actions/createServiceRequest/createServiceRequest.test.js.map +1 -0
  37. package/dist/extensions/medplum/actions/createServiceRequest/index.d.ts +1 -0
  38. package/dist/extensions/medplum/actions/createServiceRequest/index.js +6 -0
  39. package/dist/extensions/medplum/actions/createServiceRequest/index.js.map +1 -0
  40. package/dist/extensions/medplum/actions/createTask/config/dataPoints.d.ts +6 -0
  41. package/dist/extensions/medplum/actions/createTask/config/dataPoints.js +10 -0
  42. package/dist/extensions/medplum/actions/createTask/config/dataPoints.js.map +1 -0
  43. package/dist/extensions/medplum/actions/createTask/config/fields.d.ts +88 -0
  44. package/dist/extensions/medplum/actions/createTask/config/fields.js +65 -0
  45. package/dist/extensions/medplum/actions/createTask/config/fields.js.map +1 -0
  46. package/dist/extensions/medplum/actions/createTask/config/index.d.ts +2 -0
  47. package/dist/extensions/medplum/actions/createTask/config/index.js +19 -0
  48. package/dist/extensions/medplum/actions/createTask/config/index.js.map +1 -0
  49. package/dist/extensions/medplum/actions/createTask/createTask.d.ts +4 -0
  50. package/dist/extensions/medplum/actions/createTask/createTask.js +56 -0
  51. package/dist/extensions/medplum/actions/createTask/createTask.js.map +1 -0
  52. package/dist/extensions/medplum/actions/createTask/createTask.test.d.ts +1 -0
  53. package/dist/extensions/medplum/actions/createTask/createTask.test.js +41 -0
  54. package/dist/extensions/medplum/actions/createTask/createTask.test.js.map +1 -0
  55. package/dist/extensions/medplum/actions/createTask/index.d.ts +1 -0
  56. package/dist/extensions/medplum/actions/createTask/index.js +6 -0
  57. package/dist/extensions/medplum/actions/createTask/index.js.map +1 -0
  58. package/dist/extensions/medplum/actions/executeBot/config/dataPoints.d.ts +6 -0
  59. package/dist/extensions/medplum/actions/executeBot/config/dataPoints.js +10 -0
  60. package/dist/extensions/medplum/actions/executeBot/config/dataPoints.js.map +1 -0
  61. package/dist/extensions/medplum/actions/executeBot/config/fields.d.ts +34 -0
  62. package/dist/extensions/medplum/actions/executeBot/config/fields.js +41 -0
  63. package/dist/extensions/medplum/actions/executeBot/config/fields.js.map +1 -0
  64. package/dist/extensions/medplum/actions/executeBot/config/index.d.ts +2 -0
  65. package/dist/extensions/medplum/actions/executeBot/config/index.js +19 -0
  66. package/dist/extensions/medplum/actions/executeBot/config/index.js.map +1 -0
  67. package/dist/extensions/medplum/actions/executeBot/executeBot.d.ts +4 -0
  68. package/dist/extensions/medplum/actions/executeBot/executeBot.js +28 -0
  69. package/dist/extensions/medplum/actions/executeBot/executeBot.js.map +1 -0
  70. package/dist/extensions/medplum/actions/executeBot/executeBot.test.d.ts +1 -0
  71. package/dist/extensions/medplum/actions/executeBot/executeBot.test.js +35 -0
  72. package/dist/extensions/medplum/actions/executeBot/executeBot.test.js.map +1 -0
  73. package/dist/extensions/medplum/actions/executeBot/index.d.ts +1 -0
  74. package/dist/extensions/medplum/actions/executeBot/index.js +6 -0
  75. package/dist/extensions/medplum/actions/executeBot/index.js.map +1 -0
  76. package/dist/extensions/medplum/actions/getAppointment/config/dataPoints.d.ts +6 -0
  77. package/dist/extensions/medplum/actions/getAppointment/config/dataPoints.js +10 -0
  78. package/dist/extensions/medplum/actions/getAppointment/config/dataPoints.js.map +1 -0
  79. package/dist/extensions/medplum/actions/getAppointment/config/fields.d.ts +18 -0
  80. package/dist/extensions/medplum/actions/getAppointment/config/fields.js +20 -0
  81. package/dist/extensions/medplum/actions/getAppointment/config/fields.js.map +1 -0
  82. package/dist/extensions/medplum/actions/getAppointment/config/index.d.ts +2 -0
  83. package/dist/extensions/medplum/actions/getAppointment/config/index.js +19 -0
  84. package/dist/extensions/medplum/actions/getAppointment/config/index.js.map +1 -0
  85. package/dist/extensions/medplum/actions/getAppointment/getAppointment.d.ts +4 -0
  86. package/dist/extensions/medplum/actions/getAppointment/getAppointment.js +33 -0
  87. package/dist/extensions/medplum/actions/getAppointment/getAppointment.js.map +1 -0
  88. package/dist/extensions/medplum/actions/getAppointment/getAppointment.test.d.ts +1 -0
  89. package/dist/extensions/medplum/actions/getAppointment/getAppointment.test.js +34 -0
  90. package/dist/extensions/medplum/actions/getAppointment/getAppointment.test.js.map +1 -0
  91. package/dist/extensions/medplum/actions/getAppointment/index.d.ts +1 -0
  92. package/dist/extensions/medplum/actions/getAppointment/index.js +6 -0
  93. package/dist/extensions/medplum/actions/getAppointment/index.js.map +1 -0
  94. package/dist/extensions/medplum/actions/getPatient/config/dataPoints.d.ts +6 -0
  95. package/dist/extensions/medplum/actions/getPatient/config/dataPoints.js +10 -0
  96. package/dist/extensions/medplum/actions/getPatient/config/dataPoints.js.map +1 -0
  97. package/dist/extensions/medplum/actions/getPatient/config/fields.d.ts +18 -0
  98. package/dist/extensions/medplum/actions/getPatient/config/fields.js +20 -0
  99. package/dist/extensions/medplum/actions/getPatient/config/fields.js.map +1 -0
  100. package/dist/extensions/medplum/actions/getPatient/config/index.d.ts +2 -0
  101. package/dist/extensions/medplum/actions/getPatient/config/index.js +19 -0
  102. package/dist/extensions/medplum/actions/getPatient/config/index.js.map +1 -0
  103. package/dist/extensions/medplum/actions/getPatient/getPatient.d.ts +4 -0
  104. package/dist/extensions/medplum/actions/getPatient/getPatient.js +33 -0
  105. package/dist/extensions/medplum/actions/getPatient/getPatient.js.map +1 -0
  106. package/dist/extensions/medplum/actions/getPatient/getPatient.test.d.ts +1 -0
  107. package/dist/extensions/medplum/actions/getPatient/getPatient.test.js +34 -0
  108. package/dist/extensions/medplum/actions/getPatient/getPatient.test.js.map +1 -0
  109. package/dist/extensions/medplum/actions/getPatient/index.d.ts +1 -0
  110. package/dist/extensions/medplum/actions/getPatient/index.js +6 -0
  111. package/dist/extensions/medplum/actions/getPatient/index.js.map +1 -0
  112. package/dist/extensions/medplum/actions/index.d.ts +6 -0
  113. package/dist/extensions/medplum/actions/index.js +16 -0
  114. package/dist/extensions/medplum/actions/index.js.map +1 -0
  115. package/dist/extensions/medplum/fhir/schemas/atoms/GenderSchema.d.ts +2 -0
  116. package/dist/extensions/medplum/fhir/schemas/atoms/GenderSchema.js +11 -0
  117. package/dist/extensions/medplum/fhir/schemas/atoms/GenderSchema.js.map +1 -0
  118. package/dist/extensions/medplum/fhir/schemas/atoms/IntentSchema.d.ts +3 -0
  119. package/dist/extensions/medplum/fhir/schemas/atoms/IntentSchema.js +27 -0
  120. package/dist/extensions/medplum/fhir/schemas/atoms/IntentSchema.js.map +1 -0
  121. package/dist/extensions/medplum/fhir/schemas/atoms/PeriodSchema.d.ts +14 -0
  122. package/dist/extensions/medplum/fhir/schemas/atoms/PeriodSchema.js +10 -0
  123. package/dist/extensions/medplum/fhir/schemas/atoms/PeriodSchema.js.map +1 -0
  124. package/dist/extensions/medplum/fhir/schemas/atoms/PrioritySchema.d.ts +2 -0
  125. package/dist/extensions/medplum/fhir/schemas/atoms/PrioritySchema.js +11 -0
  126. package/dist/extensions/medplum/fhir/schemas/atoms/PrioritySchema.js.map +1 -0
  127. package/dist/extensions/medplum/fhir/schemas/atoms/StatusSchema.d.ts +3 -0
  128. package/dist/extensions/medplum/fhir/schemas/atoms/StatusSchema.js +28 -0
  129. package/dist/extensions/medplum/fhir/schemas/atoms/StatusSchema.js.map +1 -0
  130. package/dist/extensions/medplum/fhir/schemas/atoms/index.d.ts +5 -0
  131. package/dist/extensions/medplum/fhir/schemas/atoms/index.js +16 -0
  132. package/dist/extensions/medplum/fhir/schemas/atoms/index.js.map +1 -0
  133. package/dist/extensions/medplum/fhir/schemas/index.d.ts +1 -0
  134. package/dist/extensions/medplum/fhir/schemas/index.js +6 -0
  135. package/dist/extensions/medplum/fhir/schemas/index.js.map +1 -0
  136. package/dist/extensions/medplum/fhir/schemas/resources/index.d.ts +3 -0
  137. package/dist/extensions/medplum/fhir/schemas/resources/index.js +10 -0
  138. package/dist/extensions/medplum/fhir/schemas/resources/index.js.map +1 -0
  139. package/dist/extensions/medplum/fhir/schemas/resources/patient.schema.d.ts +38 -0
  140. package/dist/extensions/medplum/fhir/schemas/resources/patient.schema.js +20 -0
  141. package/dist/extensions/medplum/fhir/schemas/resources/patient.schema.js.map +1 -0
  142. package/dist/extensions/medplum/fhir/schemas/resources/serviceRequest.schema.d.ts +17 -0
  143. package/dist/extensions/medplum/fhir/schemas/resources/serviceRequest.schema.js +12 -0
  144. package/dist/extensions/medplum/fhir/schemas/resources/serviceRequest.schema.js.map +1 -0
  145. package/dist/extensions/medplum/fhir/schemas/resources/task.schema.d.ts +29 -0
  146. package/dist/extensions/medplum/fhir/schemas/resources/task.schema.js +17 -0
  147. package/dist/extensions/medplum/fhir/schemas/resources/task.schema.js.map +1 -0
  148. package/dist/extensions/medplum/index.d.ts +2 -0
  149. package/dist/extensions/medplum/index.js +42 -0
  150. package/dist/extensions/medplum/index.js.map +1 -0
  151. package/dist/extensions/medplum/settings.d.ts +27 -0
  152. package/dist/extensions/medplum/settings.js +25 -0
  153. package/dist/extensions/medplum/settings.js.map +1 -0
  154. package/dist/extensions/medplum/utils/index.d.ts +2 -0
  155. package/dist/extensions/medplum/utils/index.js +7 -0
  156. package/dist/extensions/medplum/utils/index.js.map +1 -0
  157. package/dist/extensions/medplum/utils/validateAndCreateSdkClient.d.ts +17 -0
  158. package/dist/extensions/medplum/utils/validateAndCreateSdkClient.js +27 -0
  159. package/dist/extensions/medplum/utils/validateAndCreateSdkClient.js.map +1 -0
  160. package/package.json +4 -1
@@ -58,6 +58,7 @@ const collectData_1 = require("./collectData");
58
58
  const athenahealth_1 = require("./athenahealth");
59
59
  const icd_1 = require("./icd");
60
60
  const textline_1 = require("./textline");
61
+ const medplum_1 = require("./medplum");
61
62
  const json = __importStar(require("./markdown.json"));
62
63
  const external_server_1 = require("./external-server");
63
64
  exports.markdown = json;
@@ -100,5 +101,6 @@ exports.extensions = [
100
101
  zendesk_1.Zendesk,
101
102
  westFax_1.WestFax,
102
103
  textline_1.TextLine,
104
+ medplum_1.Medplum,
103
105
  ];
104
106
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../extensions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kCAAkC;AAClC,mCAA+B;AAC/B,2CAAuC;AACvC,yCAAqC;AACrC,mDAA+C;AAC/C,6CAAyC;AACzC,+CAA2C;AAC3C,uCAAmC;AACnC,iDAA6C;AAC7C,yCAAqC;AACrC,yCAAqC;AACrC,+CAA0C;AAC1C,2CAAuC;AACvC,uCAAmC;AACnC,iCAAsC;AACtC,+CAA2C;AAC3C,2CAAuC;AACvC,qCAAiC;AACjC,+CAA+C;AAC/C,6DAA+C;AAC/C,yCAAqC;AACrC,yCAAqC;AACrC,yCAAqC;AACrC,yCAAqC;AACrC,2CAAuC;AACvC,yCAAqC;AACrC,uCAAmC;AACnC,uCAAmC;AACnC,uCAAmC;AACnC,+CAA2C;AAC3C,+CAA2C;AAC3C,iDAA6C;AAC7C,+BAA2B;AAC3B,yCAAqC;AAErC,sDAAuC;AACvC,uDAAkD;AAGrC,QAAA,QAAQ,GAAa,IAAI,CAAA;AAEzB,QAAA,UAAU,GAAG;IACxB,oFAAoF;IACpF,4CAA4C;IAC5C,aAAa;IACb,aAAK;IACL,2BAAY;IACZ,qBAAS;IACT,mBAAQ;IACR,6BAAa;IACb,uBAAU;IACV,mBAAQ;IACR,yBAAW;IACX,mBAAQ;IACR,yBAAW;IACX,iBAAO;IACP,2BAAY;IACZ,gCAAc;IACd,mBAAQ;IACR,mBAAQ;IACR,wBAAU;IACV,SAAG;IACH,iBAAO;IACP,mBAAQ;IACR,qBAAS;IACT,iBAAO;IACP,oBAAa;IACb,yBAAW;IACX,qBAAS;IACT,yBAAW;IACX,mBAAQ;IACR,6BAAQ;IACR,mBAAQ;IACR,mBAAQ;IACR,qBAAS;IACT,eAAM;IACN,YAAY;IACZ,iBAAO;IACP,iBAAO;IACP,mBAAQ;CACT,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../extensions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kCAAkC;AAClC,mCAA+B;AAC/B,2CAAuC;AACvC,yCAAqC;AACrC,mDAA+C;AAC/C,6CAAyC;AACzC,+CAA2C;AAC3C,uCAAmC;AACnC,iDAA6C;AAC7C,yCAAqC;AACrC,yCAAqC;AACrC,+CAA0C;AAC1C,2CAAuC;AACvC,uCAAmC;AACnC,iCAAsC;AACtC,+CAA2C;AAC3C,2CAAuC;AACvC,qCAAiC;AACjC,+CAA+C;AAC/C,6DAA+C;AAC/C,yCAAqC;AACrC,yCAAqC;AACrC,yCAAqC;AACrC,yCAAqC;AACrC,2CAAuC;AACvC,yCAAqC;AACrC,uCAAmC;AACnC,uCAAmC;AACnC,uCAAmC;AACnC,+CAA2C;AAC3C,+CAA2C;AAC3C,iDAA6C;AAC7C,+BAA2B;AAC3B,yCAAqC;AACrC,uCAAmC;AAEnC,sDAAuC;AACvC,uDAAkD;AAGrC,QAAA,QAAQ,GAAa,IAAI,CAAA;AAEzB,QAAA,UAAU,GAAG;IACxB,oFAAoF;IACpF,4CAA4C;IAC5C,aAAa;IACb,aAAK;IACL,2BAAY;IACZ,qBAAS;IACT,mBAAQ;IACR,6BAAa;IACb,uBAAU;IACV,mBAAQ;IACR,yBAAW;IACX,mBAAQ;IACR,yBAAW;IACX,iBAAO;IACP,2BAAY;IACZ,gCAAc;IACd,mBAAQ;IACR,mBAAQ;IACR,wBAAU;IACV,SAAG;IACH,iBAAO;IACP,mBAAQ;IACR,qBAAS;IACT,iBAAO;IACP,oBAAa;IACb,yBAAW;IACX,qBAAS;IACT,yBAAW;IACX,mBAAQ;IACR,6BAAQ;IACR,mBAAQ;IACR,mBAAQ;IACR,qBAAS;IACT,eAAM;IACN,YAAY;IACZ,iBAAO;IACP,iBAAO;IACP,mBAAQ;IACR,iBAAO;CACR,CAAA"}
@@ -91,6 +91,10 @@
91
91
  "readme": "---\ntitle: Math\ndescription: This extension adds custom actions to your care flow for simple mathematical operations.\n---\n# Math\n\nThis extension adds custom actions to your care flow for simple mathematical operations.\n\n## Custom Actions\n\n### Generate random number\n\nGenerates a random (whole) number that falls between the ranges of two numbers [min, max].\n\n### Calculate date difference\n\nCalculate the difference between two dates where \"date left\" is the minuend and \"date right\" the subtrahend.\n\n**You can choose the unit in which you would like to see the difference expressed:**\n\n1. Seconds: get the number of seconds between the given dates. Fractional seconds are truncated towards zero.\n2. Minutes: get the signed number of full (rounded towards 0) minutes between the given dates. Fractional minutes are truncated towards zero.\n3. Hours: get the number of hours between the given dates. Fractional hours are truncated towards zero.\n4. Days: get the number of full day periods between two dates. Fractional days are truncated towards zero.\n5. Weeks: get the number of full weeks between two dates. Fractional weeks are truncated towards zero.\n6. Months: get the number of full months between the given dates. Fractional months are truncated towards zero.\n7. Years: get the number of full years between the given dates.\n",
92
92
  "changelog": "# Math changelog"
93
93
  },
94
+ "medplum": {
95
+ "readme": "---\ntitle: Medplum\ndescription: Medplum is the open source healthcare developer platform that helps you build, test, and deliver any healthcare product or service.\n---\n\n# Medplum\n\nMedplum is the open source healthcare developer platform that helps you build, test, and deliver any healthcare product or service.\n\n## Extension settings\n\nA client ID and client secret needs to be provided in order for the extension to authenticate with Medplum's API.\n",
96
+ "changelog": "# Medplum changelog\n"
97
+ },
94
98
  "messagebird": {
95
99
  "readme": "---\ntitle: MessageBird\ndescription: MessageBird is a cloud-based SMS marketing platform designed to help businesses engage with customers across a variety of channels including WhatsApp, voice, live chat and more.\n---\n# MessageBird\n\nMessageBird is a cloud-based SMS marketing platform designed to help businesses engage with customers across a variety of channels including WhatsApp, voice, live chat and more.\n\n## Extension settings\n\nIn order to set up this extension, you will need to provide a MessageBird [API key](https://developers.messagebird.com/quickstarts/voice-calling/test-credits-api-keys/#get-your-api-keys) and [report URL](https://support.messagebird.com/hc/en-us/articles/360001854898-Receiving-Delivery-Reports-DLRs-#:~:text=To%20configure%20the%20status%20report,need%20to%20be%20sent%20to.) (only required if you want to use WhatsApp messaging).\n\n## Custom Actions\n\n### Send SMS\n\nMessageBird's Programmable SMS API enables you to programmatically send SMS messages from within a care flow.\n\n[Read the official documentation](https://developers.messagebird.com/api/sms-messaging/#send-outbound-sms)\n\n### Send voice (text-to-speech) message\n\nMessageBird's Voice Messaging API enables you to transform text messages into voice messages to any country.\n\n[Read the official documentation](https://developers.messagebird.com/api/voice-messaging/#send-a-voice-message)\n\n### Send WhatsApp message\n\nSend a message to a recipient via WhatsApp. If an active conversation already exists for the recipient, the conversation will be resumed. In case there's no active conversation a new one is created.\n\n[Learn how to get started with MessageBird and WhatsApp](https://messagebird.com/omnichannel/whatsapp)",
96
100
  "changelog": "# MessageBird changelog"
@@ -0,0 +1,6 @@
1
+ export declare const dataPoints: {
2
+ patientId: {
3
+ key: string;
4
+ valueType: "string";
5
+ };
6
+ };
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.dataPoints = void 0;
4
+ exports.dataPoints = {
5
+ patientId: {
6
+ key: 'patientId',
7
+ valueType: 'string',
8
+ },
9
+ };
10
+ //# sourceMappingURL=dataPoints.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dataPoints.js","sourceRoot":"","sources":["../../../../../../extensions/medplum/actions/createPatient/config/dataPoints.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG;IACxB,SAAS,EAAE;QACT,GAAG,EAAE,WAAW;QAChB,SAAS,EAAE,QAAQ;KACpB;CAC4C,CAAA"}
@@ -0,0 +1,119 @@
1
+ import { FieldType, StringType } from '@awell-health/extensions-core';
2
+ import { type ZodObject, type ZodTypeAny } from 'zod';
3
+ export declare const fields: {
4
+ firstName: {
5
+ id: string;
6
+ label: string;
7
+ description: string;
8
+ type: FieldType.STRING;
9
+ required: false;
10
+ };
11
+ lastName: {
12
+ id: string;
13
+ label: string;
14
+ description: string;
15
+ type: FieldType.STRING;
16
+ required: false;
17
+ };
18
+ mobilePhone: {
19
+ id: string;
20
+ label: string;
21
+ description: string;
22
+ type: FieldType.STRING;
23
+ stringType: StringType.PHONE;
24
+ required: false;
25
+ };
26
+ email: {
27
+ id: string;
28
+ label: string;
29
+ description: string;
30
+ type: FieldType.STRING;
31
+ required: false;
32
+ };
33
+ birthDate: {
34
+ id: string;
35
+ label: string;
36
+ description: string;
37
+ type: FieldType.DATE;
38
+ required: false;
39
+ };
40
+ gender: {
41
+ id: string;
42
+ label: string;
43
+ description: string;
44
+ type: FieldType.STRING;
45
+ required: false;
46
+ };
47
+ address: {
48
+ id: string;
49
+ label: string;
50
+ description: string;
51
+ type: FieldType.STRING;
52
+ required: false;
53
+ };
54
+ city: {
55
+ id: string;
56
+ label: string;
57
+ description: string;
58
+ type: FieldType.STRING;
59
+ required: false;
60
+ };
61
+ state: {
62
+ id: string;
63
+ label: string;
64
+ description: string;
65
+ type: FieldType.STRING;
66
+ required: false;
67
+ };
68
+ country: {
69
+ id: string;
70
+ label: string;
71
+ description: string;
72
+ type: FieldType.STRING;
73
+ required: false;
74
+ };
75
+ postalCode: {
76
+ id: string;
77
+ label: string;
78
+ description: string;
79
+ type: FieldType.STRING;
80
+ required: false;
81
+ };
82
+ };
83
+ export declare const FieldsValidationSchema: ZodObject<{
84
+ firstName: import("zod").ZodOptional<import("zod").ZodString>;
85
+ lastName: import("zod").ZodOptional<import("zod").ZodString>;
86
+ email: import("zod").ZodOptional<import("zod").ZodString>;
87
+ mobilePhone: import("zod").ZodUnion<[import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, import("libphonenumber-js").PhoneNumber | import("libphonenumber-js").ParseError, string>, import("libphonenumber-js").PhoneNumber | import("libphonenumber-js").ParseError, string>, import("libphonenumber-js").E164Number, string>>, import("zod").ZodEffects<import("zod").ZodLiteral<"">, undefined, "">]>;
88
+ birthDate: import("zod").ZodUnion<[import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodDate, string, Date>>, import("zod").ZodEffects<import("zod").ZodLiteral<"">, undefined, "">]>;
89
+ gender: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"male">, import("zod").ZodLiteral<"female">, import("zod").ZodLiteral<"other">, import("zod").ZodLiteral<"unknown">]>>;
90
+ address: import("zod").ZodOptional<import("zod").ZodString>;
91
+ city: import("zod").ZodOptional<import("zod").ZodString>;
92
+ state: import("zod").ZodOptional<import("zod").ZodString>;
93
+ country: import("zod").ZodOptional<import("zod").ZodString>;
94
+ postalCode: import("zod").ZodOptional<import("zod").ZodString>;
95
+ }, "strip", ZodTypeAny, {
96
+ firstName?: string | undefined;
97
+ lastName?: string | undefined;
98
+ email?: string | undefined;
99
+ mobilePhone?: import("libphonenumber-js").E164Number | undefined;
100
+ birthDate?: string | undefined;
101
+ gender?: "unknown" | "other" | "male" | "female" | undefined;
102
+ address?: string | undefined;
103
+ city?: string | undefined;
104
+ state?: string | undefined;
105
+ country?: string | undefined;
106
+ postalCode?: string | undefined;
107
+ }, {
108
+ firstName?: string | undefined;
109
+ lastName?: string | undefined;
110
+ email?: string | undefined;
111
+ mobilePhone?: string | undefined;
112
+ birthDate?: "" | Date | undefined;
113
+ gender?: "unknown" | "other" | "male" | "female" | undefined;
114
+ address?: string | undefined;
115
+ city?: string | undefined;
116
+ state?: string | undefined;
117
+ country?: string | undefined;
118
+ postalCode?: string | undefined;
119
+ }>;
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FieldsValidationSchema = exports.fields = void 0;
4
+ const extensions_core_1 = require("@awell-health/extensions-core");
5
+ const schemas_1 = require("../../../fhir/schemas");
6
+ exports.fields = {
7
+ firstName: {
8
+ id: 'firstName',
9
+ label: 'First name',
10
+ description: '',
11
+ type: extensions_core_1.FieldType.STRING,
12
+ required: false,
13
+ },
14
+ lastName: {
15
+ id: 'lastName',
16
+ label: 'Last name',
17
+ description: '',
18
+ type: extensions_core_1.FieldType.STRING,
19
+ required: false,
20
+ },
21
+ mobilePhone: {
22
+ id: 'mobilePhone',
23
+ label: 'Mobile phone',
24
+ description: '',
25
+ type: extensions_core_1.FieldType.STRING,
26
+ stringType: extensions_core_1.StringType.PHONE,
27
+ required: false,
28
+ },
29
+ email: {
30
+ id: 'email',
31
+ label: 'Email',
32
+ description: '',
33
+ type: extensions_core_1.FieldType.STRING,
34
+ required: false,
35
+ },
36
+ birthDate: {
37
+ id: 'birthDate',
38
+ label: 'Birth date',
39
+ description: '',
40
+ type: extensions_core_1.FieldType.DATE,
41
+ required: false,
42
+ },
43
+ gender: {
44
+ id: 'gender',
45
+ label: 'Gender',
46
+ description: 'Valid values are "male", "female", "other", "unknown"',
47
+ type: extensions_core_1.FieldType.STRING,
48
+ required: false,
49
+ },
50
+ address: {
51
+ id: 'address',
52
+ label: 'Address',
53
+ description: '',
54
+ type: extensions_core_1.FieldType.STRING,
55
+ required: false,
56
+ },
57
+ city: {
58
+ id: 'city',
59
+ label: 'City',
60
+ description: '',
61
+ type: extensions_core_1.FieldType.STRING,
62
+ required: false,
63
+ },
64
+ state: {
65
+ id: 'state',
66
+ label: 'State',
67
+ description: '',
68
+ type: extensions_core_1.FieldType.STRING,
69
+ required: false,
70
+ },
71
+ country: {
72
+ id: 'country',
73
+ label: 'Country',
74
+ description: '',
75
+ type: extensions_core_1.FieldType.STRING,
76
+ required: false,
77
+ },
78
+ postalCode: {
79
+ id: 'postalCode',
80
+ label: 'Postal code',
81
+ description: '',
82
+ type: extensions_core_1.FieldType.STRING,
83
+ required: false,
84
+ },
85
+ };
86
+ exports.FieldsValidationSchema = schemas_1.PatientSchema;
87
+ //# sourceMappingURL=fields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../extensions/medplum/actions/createPatient/config/fields.ts"],"names":[],"mappings":";;;AAAA,mEAIsC;AAEtC,mDAAqD;AAExC,QAAA,MAAM,GAAG;IACpB,SAAS,EAAE;QACT,EAAE,EAAE,WAAW;QACf,KAAK,EAAE,YAAY;QACnB,WAAW,EAAE,EAAE;QACf,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,KAAK;KAChB;IACD,QAAQ,EAAE;QACR,EAAE,EAAE,UAAU;QACd,KAAK,EAAE,WAAW;QAClB,WAAW,EAAE,EAAE;QACf,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,KAAK;KAChB;IACD,WAAW,EAAE;QACX,EAAE,EAAE,aAAa;QACjB,KAAK,EAAE,cAAc;QACrB,WAAW,EAAE,EAAE;QACf,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,UAAU,EAAE,4BAAU,CAAC,KAAK;QAC5B,QAAQ,EAAE,KAAK;KAChB;IACD,KAAK,EAAE;QACL,EAAE,EAAE,OAAO;QACX,KAAK,EAAE,OAAO;QACd,WAAW,EAAE,EAAE;QACf,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,KAAK;KAChB;IACD,SAAS,EAAE;QACT,EAAE,EAAE,WAAW;QACf,KAAK,EAAE,YAAY;QACnB,WAAW,EAAE,EAAE;QACf,IAAI,EAAE,2BAAS,CAAC,IAAI;QACpB,QAAQ,EAAE,KAAK;KAChB;IACD,MAAM,EAAE;QACN,EAAE,EAAE,QAAQ;QACZ,KAAK,EAAE,QAAQ;QACf,WAAW,EAAE,uDAAuD;QACpE,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,KAAK;KAChB;IACD,OAAO,EAAE;QACP,EAAE,EAAE,SAAS;QACb,KAAK,EAAE,SAAS;QAChB,WAAW,EAAE,EAAE;QACf,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,KAAK;KAChB;IACD,IAAI,EAAE;QACJ,EAAE,EAAE,MAAM;QACV,KAAK,EAAE,MAAM;QACb,WAAW,EAAE,EAAE;QACf,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,KAAK;KAChB;IACD,KAAK,EAAE;QACL,EAAE,EAAE,OAAO;QACX,KAAK,EAAE,OAAO;QACd,WAAW,EAAE,EAAE;QACf,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,KAAK;KAChB;IACD,OAAO,EAAE;QACP,EAAE,EAAE,SAAS;QACb,KAAK,EAAE,SAAS;QAChB,WAAW,EAAE,EAAE;QACf,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,KAAK;KAChB;IACD,UAAU,EAAE;QACV,EAAE,EAAE,YAAY;QAChB,KAAK,EAAE,aAAa;QACpB,WAAW,EAAE,EAAE;QACf,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,KAAK;KAChB;CAC8B,CAAA;AAEpB,QAAA,sBAAsB,GAAG,uBAErC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './dataPoints';
2
+ export * from './fields';
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./dataPoints"), exports);
18
+ __exportStar(require("./fields"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../extensions/medplum/actions/createPatient/config/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA4B;AAC5B,2CAAwB"}
@@ -0,0 +1,4 @@
1
+ import { type Action } from '@awell-health/extensions-core';
2
+ import { type settings } from '../../settings';
3
+ import { fields, dataPoints } from './config';
4
+ export declare const createPatient: Action<typeof fields, typeof settings, keyof typeof dataPoints>;
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createPatient = void 0;
4
+ const extensions_core_1 = require("@awell-health/extensions-core");
5
+ const config_1 = require("./config");
6
+ const utils_1 = require("../../utils");
7
+ const lodash_1 = require("lodash");
8
+ exports.createPatient = {
9
+ key: 'createPatient',
10
+ category: extensions_core_1.Category.EHR_INTEGRATIONS,
11
+ title: 'Create patient',
12
+ description: 'Create a patient in Medplum',
13
+ fields: config_1.fields,
14
+ previewable: false,
15
+ dataPoints: config_1.dataPoints,
16
+ onActivityCreated: async (payload, onComplete, onError) => {
17
+ var _a;
18
+ const { fields: input, medplumSdk, patient, } = await (0, utils_1.validateAndCreateSdkClient)({
19
+ fieldsSchema: config_1.FieldsValidationSchema,
20
+ payload,
21
+ });
22
+ const mobilePhone = !(0, lodash_1.isEmpty)(input.mobilePhone)
23
+ ? {
24
+ system: 'phone',
25
+ value: input.mobilePhone,
26
+ use: 'mobile',
27
+ }
28
+ : null;
29
+ const email = !(0, lodash_1.isEmpty)(input.email)
30
+ ? {
31
+ system: 'email',
32
+ value: input.email,
33
+ use: 'home',
34
+ }
35
+ : null;
36
+ const addressLine = !(0, lodash_1.isEmpty)(input.address) ? [(_a = input.address) !== null && _a !== void 0 ? _a : ''] : [];
37
+ /**
38
+ * We only create the patient in Medplum if that patient
39
+ * doesn't exist yet.
40
+ */
41
+ const res = await medplumSdk.createResourceIfNoneExist({
42
+ resourceType: 'Patient',
43
+ identifier: [
44
+ {
45
+ system: 'https://www.awellhealth.com/',
46
+ value: patient.id,
47
+ assigner: {
48
+ display: 'Awell',
49
+ },
50
+ },
51
+ ],
52
+ name: [
53
+ {
54
+ use: 'official',
55
+ family: input.lastName,
56
+ given: (0, lodash_1.isEmpty)(input.firstName) ? [] : [String(input.firstName)],
57
+ },
58
+ ],
59
+ telecom: [
60
+ ...((mobilePhone != null) ? [mobilePhone] : []),
61
+ ...((email != null) ? [email] : []),
62
+ ],
63
+ birthDate: input.birthDate,
64
+ gender: input.gender,
65
+ address: [
66
+ {
67
+ use: 'home',
68
+ line: addressLine,
69
+ city: input.city,
70
+ state: input.state,
71
+ postalCode: input.postalCode,
72
+ country: input.country,
73
+ },
74
+ ],
75
+ }, `identifier=${utils_1.AWELL_IDENTIFIER_SYSTEM}|${patient.id}`);
76
+ await onComplete({
77
+ data_points: {
78
+ // @ts-expect-error id is not included in the response type?
79
+ patientId: res.id,
80
+ },
81
+ });
82
+ },
83
+ };
84
+ //# sourceMappingURL=createPatient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createPatient.js","sourceRoot":"","sources":["../../../../../extensions/medplum/actions/createPatient/createPatient.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AAErE,qCAAqE;AACrE,uCAGoB;AACpB,mCAAgC;AAGnB,QAAA,aAAa,GAItB;IACF,GAAG,EAAE,eAAe;IACpB,QAAQ,EAAE,0BAAQ,CAAC,gBAAgB;IACnC,KAAK,EAAE,gBAAgB;IACvB,WAAW,EAAE,6BAA6B;IAC1C,MAAM,EAAN,eAAM;IACN,WAAW,EAAE,KAAK;IAClB,UAAU,EAAV,mBAAU;IACV,iBAAiB,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAiB,EAAE;;QACvE,MAAM,EACJ,MAAM,EAAE,KAAK,EACb,UAAU,EACV,OAAO,GACR,GAAG,MAAM,IAAA,kCAA0B,EAAC;YACnC,YAAY,EAAE,+BAAsB;YACpC,OAAO;SACR,CAAC,CAAA;QAEF,MAAM,WAAW,GAAwB,CAAC,IAAA,gBAAO,EAAC,KAAK,CAAC,WAAW,CAAC;YAClE,CAAC,CAAC;gBACE,MAAM,EAAE,OAAO;gBACf,KAAK,EAAE,KAAK,CAAC,WAAW;gBACxB,GAAG,EAAE,QAAQ;aACd;YACH,CAAC,CAAC,IAAI,CAAA;QAER,MAAM,KAAK,GAAwB,CAAC,IAAA,gBAAO,EAAC,KAAK,CAAC,KAAK,CAAC;YACtD,CAAC,CAAC;gBACE,MAAM,EAAE,OAAO;gBACf,KAAK,EAAE,KAAK,CAAC,KAAK;gBAClB,GAAG,EAAE,MAAM;aACZ;YACH,CAAC,CAAC,IAAI,CAAA;QAER,MAAM,WAAW,GAAG,CAAC,IAAA,gBAAO,EAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,MAAA,KAAK,CAAC,OAAO,mCAAI,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;QAExE;;;WAGG;QACH,MAAM,GAAG,GAAG,MAAM,UAAU,CAAC,yBAAyB,CACpD;YACE,YAAY,EAAE,SAAS;YACvB,UAAU,EAAE;gBACV;oBACE,MAAM,EAAE,8BAA8B;oBACtC,KAAK,EAAE,OAAO,CAAC,EAAE;oBACjB,QAAQ,EAAE;wBACR,OAAO,EAAE,OAAO;qBACjB;iBACF;aACF;YACD,IAAI,EAAE;gBACJ;oBACE,GAAG,EAAE,UAAU;oBACf,MAAM,EAAE,KAAK,CAAC,QAAQ;oBACtB,KAAK,EAAE,IAAA,gBAAO,EAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;iBACjE;aACF;YACD,OAAO,EAAE;gBACP,GAAG,CAAC,CAAC,WAAW,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;gBAC/C,GAAG,CAAC,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;aACpC;YACD,SAAS,EAAE,KAAK,CAAC,SAAS;YAC1B,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,OAAO,EAAE;gBACP;oBACE,GAAG,EAAE,MAAM;oBACX,IAAI,EAAE,WAAW;oBACjB,IAAI,EAAE,KAAK,CAAC,IAAI;oBAChB,KAAK,EAAE,KAAK,CAAC,KAAK;oBAClB,UAAU,EAAE,KAAK,CAAC,UAAU;oBAC5B,OAAO,EAAE,KAAK,CAAC,OAAO;iBACvB;aACF;SACF,EACD,cAAc,+BAAuB,IAAI,OAAO,CAAC,EAAE,EAAE,CACtD,CAAA;QAED,MAAM,UAAU,CAAC;YACf,WAAW,EAAE;gBACX,4DAA4D;gBAC5D,SAAS,EAAE,GAAG,CAAC,EAAE;aAClB;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA"}
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const _1 = require(".");
4
+ const tests_1 = require("../../../../src/tests");
5
+ const __mocks__1 = require("../../__mocks__");
6
+ jest.mock('@medplum/core', () => {
7
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
8
+ const { MedplumClient: MedplumMockClient } = require('../../__mocks__');
9
+ return {
10
+ MedplumClient: MedplumMockClient,
11
+ };
12
+ });
13
+ describe('Medplum - Create patient', () => {
14
+ const onComplete = jest.fn();
15
+ const onError = jest.fn();
16
+ beforeEach(() => {
17
+ jest.clearAllMocks();
18
+ });
19
+ test('Should create a patient', async () => {
20
+ const mockOnActivityCreateParams = (0, tests_1.generateTestPayload)({
21
+ fields: {
22
+ firstName: 'Awell',
23
+ lastName: 'Demo',
24
+ mobilePhone: '+1 888 206 20 11',
25
+ email: 'test@awellhealth.com',
26
+ birthDate: '1993-11-30',
27
+ gender: 'male',
28
+ address: 'Awell Street',
29
+ city: 'Awell City',
30
+ postalCode: '1111',
31
+ state: 'Awell State',
32
+ country: 'Awellien',
33
+ },
34
+ patient: {
35
+ id: 'test-id',
36
+ },
37
+ settings: __mocks__1.mockSettings,
38
+ });
39
+ await _1.createPatient.onActivityCreated(mockOnActivityCreateParams, onComplete, onError);
40
+ expect(onComplete).toHaveBeenCalledWith({
41
+ data_points: {
42
+ patientId: __mocks__1.mockCreatePatientResponse.id,
43
+ },
44
+ });
45
+ });
46
+ });
47
+ //# sourceMappingURL=createPatient.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createPatient.test.js","sourceRoot":"","sources":["../../../../../extensions/medplum/actions/createPatient/createPatient.test.ts"],"names":[],"mappings":";;AAAA,wBAAiC;AACjC,iDAA2D;AAC3D,8CAAyE;AAEzE,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,GAAG,EAAE;IAC9B,8DAA8D;IAC9D,MAAM,EAAE,aAAa,EAAE,iBAAiB,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAA;IAEvE,OAAO;QACL,aAAa,EAAE,iBAAiB;KACjC,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,QAAQ,CAAC,0BAA0B,EAAE,GAAG,EAAE;IACxC,MAAM,UAAU,GAAG,IAAI,CAAC,EAAE,EAAE,CAAA;IAC5B,MAAM,OAAO,GAAG,IAAI,CAAC,EAAE,EAAE,CAAA;IAEzB,UAAU,CAAC,GAAG,EAAE;QACd,IAAI,CAAC,aAAa,EAAE,CAAA;IACtB,CAAC,CAAC,CAAA;IAEF,IAAI,CAAC,yBAAyB,EAAE,KAAK,IAAI,EAAE;QACzC,MAAM,0BAA0B,GAAG,IAAA,2BAAmB,EAAC;YACrD,MAAM,EAAE;gBACN,SAAS,EAAE,OAAO;gBAClB,QAAQ,EAAE,MAAM;gBAChB,WAAW,EAAE,kBAAkB;gBAC/B,KAAK,EAAE,sBAAsB;gBAC7B,SAAS,EAAE,YAAY;gBACvB,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE,cAAc;gBACvB,IAAI,EAAE,YAAY;gBAClB,UAAU,EAAE,MAAM;gBAClB,KAAK,EAAE,aAAa;gBACpB,OAAO,EAAE,UAAU;aACpB;YACD,OAAO,EAAE;gBACP,EAAE,EAAE,SAAS;aACd;YACD,QAAQ,EAAE,uBAAY;SACvB,CAAC,CAAA;QAEF,MAAM,gBAAa,CAAC,iBAAiB,CACnC,0BAA0B,EAC1B,UAAU,EACV,OAAO,CACR,CAAA;QAED,MAAM,CAAC,UAAU,CAAC,CAAC,oBAAoB,CAAC;YACtC,WAAW,EAAE;gBACX,SAAS,EAAE,oCAAyB,CAAC,EAAE;aACxC;SACF,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -0,0 +1 @@
1
+ export { createPatient } from './createPatient';
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createPatient = void 0;
4
+ var createPatient_1 = require("./createPatient");
5
+ Object.defineProperty(exports, "createPatient", { enumerable: true, get: function () { return createPatient_1.createPatient; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../extensions/medplum/actions/createPatient/index.ts"],"names":[],"mappings":";;;AAAA,iDAA+C;AAAtC,8GAAA,aAAa,OAAA"}
@@ -0,0 +1,6 @@
1
+ export declare const dataPoints: {
2
+ serviceRequestId: {
3
+ key: string;
4
+ valueType: "string";
5
+ };
6
+ };
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.dataPoints = void 0;
4
+ exports.dataPoints = {
5
+ serviceRequestId: {
6
+ key: 'serviceRequestId',
7
+ valueType: 'string',
8
+ },
9
+ };
10
+ //# sourceMappingURL=dataPoints.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dataPoints.js","sourceRoot":"","sources":["../../../../../../extensions/medplum/actions/createServiceRequest/config/dataPoints.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG;IACxB,gBAAgB,EAAE;QAChB,GAAG,EAAE,kBAAkB;QACvB,SAAS,EAAE,QAAQ;KACpB;CAC4C,CAAA"}
@@ -0,0 +1,48 @@
1
+ import { FieldType } from '@awell-health/extensions-core';
2
+ import { type ZodObject, type ZodTypeAny } from 'zod';
3
+ export declare const fields: {
4
+ patientId: {
5
+ id: string;
6
+ label: string;
7
+ description: string;
8
+ type: FieldType.STRING;
9
+ required: true;
10
+ };
11
+ status: {
12
+ id: string;
13
+ label: string;
14
+ description: string;
15
+ type: FieldType.STRING;
16
+ required: true;
17
+ };
18
+ intent: {
19
+ id: string;
20
+ label: string;
21
+ description: string;
22
+ type: FieldType.STRING;
23
+ required: true;
24
+ };
25
+ priority: {
26
+ id: string;
27
+ label: string;
28
+ description: string;
29
+ type: FieldType.STRING;
30
+ required: false;
31
+ };
32
+ };
33
+ export declare const FieldsValidationSchema: ZodObject<{
34
+ patientId: import("zod").ZodString;
35
+ status: import("zod").ZodUnion<[import("zod").ZodLiteral<"draft">, import("zod").ZodLiteral<"active">, import("zod").ZodLiteral<"on-hold">, import("zod").ZodLiteral<"revoked">, import("zod").ZodLiteral<"completed">, import("zod").ZodLiteral<"entered-in-error">, import("zod").ZodLiteral<"unknown">]>;
36
+ intent: import("zod").ZodUnion<[import("zod").ZodLiteral<"proposal">, import("zod").ZodLiteral<"plan">, import("zod").ZodLiteral<"directive">, import("zod").ZodLiteral<"order">, import("zod").ZodLiteral<"original-order">, import("zod").ZodLiteral<"reflex-order">, import("zod").ZodLiteral<"filler-order">, import("zod").ZodLiteral<"instance-order">, import("zod").ZodLiteral<"option">]>;
37
+ priority: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"routine">, import("zod").ZodLiteral<"urgent">, import("zod").ZodLiteral<"asap">, import("zod").ZodLiteral<"stat">]>>;
38
+ }, "strip", ZodTypeAny, {
39
+ status: "active" | "unknown" | "completed" | "draft" | "on-hold" | "entered-in-error" | "revoked";
40
+ patientId: string;
41
+ intent: "order" | "option" | "plan" | "proposal" | "original-order" | "reflex-order" | "filler-order" | "instance-order" | "directive";
42
+ priority?: "routine" | "urgent" | "asap" | "stat" | undefined;
43
+ }, {
44
+ status: "active" | "unknown" | "completed" | "draft" | "on-hold" | "entered-in-error" | "revoked";
45
+ patientId: string;
46
+ intent: "order" | "option" | "plan" | "proposal" | "original-order" | "reflex-order" | "filler-order" | "instance-order" | "directive";
47
+ priority?: "routine" | "urgent" | "asap" | "stat" | undefined;
48
+ }>;
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FieldsValidationSchema = exports.fields = void 0;
4
+ const extensions_core_1 = require("@awell-health/extensions-core");
5
+ const serviceRequest_schema_1 = require("../../../fhir/schemas/resources/serviceRequest.schema");
6
+ exports.fields = {
7
+ patientId: {
8
+ id: 'patientId',
9
+ label: 'Patient ID',
10
+ description: 'ID of the patient in Medplum',
11
+ type: extensions_core_1.FieldType.STRING,
12
+ required: true,
13
+ },
14
+ status: {
15
+ id: 'status',
16
+ label: 'Status',
17
+ description: 'The status of the order. Allowed values: draft | active | on-hold | revoked | completed | entered-in-error | unknown',
18
+ type: extensions_core_1.FieldType.STRING,
19
+ required: true,
20
+ },
21
+ intent: {
22
+ id: 'intent',
23
+ label: 'Mobile phone',
24
+ description: 'Whether the request is a proposal, plan, an original order or a reflex order. Allowed values: proposal | plan | directive | order | original-order | reflex-order | filler-order | instance-order | option',
25
+ type: extensions_core_1.FieldType.STRING,
26
+ required: true,
27
+ },
28
+ priority: {
29
+ id: 'priority',
30
+ label: 'Priority',
31
+ description: 'Allowed values: routine | urgent | asap | stat',
32
+ type: extensions_core_1.FieldType.STRING,
33
+ required: false,
34
+ },
35
+ };
36
+ exports.FieldsValidationSchema = serviceRequest_schema_1.CreateServiceRequestSchema;
37
+ //# sourceMappingURL=fields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fields.js","sourceRoot":"","sources":["../../../../../../extensions/medplum/actions/createServiceRequest/config/fields.ts"],"names":[],"mappings":";;;AAAA,mEAAqE;AAErE,iGAAkG;AAErF,QAAA,MAAM,GAAG;IACpB,SAAS,EAAE;QACT,EAAE,EAAE,WAAW;QACf,KAAK,EAAE,YAAY;QACnB,WAAW,EAAE,8BAA8B;QAC3C,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;IACD,MAAM,EAAE;QACN,EAAE,EAAE,QAAQ;QACZ,KAAK,EAAE,QAAQ;QACf,WAAW,EACT,sHAAsH;QACxH,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;IACD,MAAM,EAAE;QACN,EAAE,EAAE,QAAQ;QACZ,KAAK,EAAE,cAAc;QACrB,WAAW,EACT,4MAA4M;QAC9M,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,IAAI;KACf;IACD,QAAQ,EAAE;QACR,EAAE,EAAE,UAAU;QACd,KAAK,EAAE,UAAU;QACjB,WAAW,EAAE,gDAAgD;QAC7D,IAAI,EAAE,2BAAS,CAAC,MAAM;QACtB,QAAQ,EAAE,KAAK;KAChB;CAC8B,CAAA;AAEpB,QAAA,sBAAsB,GACjC,kDAEC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './dataPoints';
2
+ export * from './fields';
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./dataPoints"), exports);
18
+ __exportStar(require("./fields"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../extensions/medplum/actions/createServiceRequest/config/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA4B;AAC5B,2CAAwB"}
@@ -0,0 +1,4 @@
1
+ import { type Action } from '@awell-health/extensions-core';
2
+ import { type settings } from '../../settings';
3
+ import { fields, dataPoints } from './config';
4
+ export declare const createServiceRequest: Action<typeof fields, typeof settings, keyof typeof dataPoints>;